Created
October 4, 2018 16:48
-
-
Save brentpicasso/71831c112c9ec3fca34de7db75c7701c to your computer and use it in GitHub Desktop.
Test virtual channels (EngineTemp and OilTemp)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| maxEt = 300 | |
| maxOt = 300 | |
| etId = addChannel("EngineTemp", 10, 0, 0, maxEt) | |
| otId = addChannel("OilTemp", 10, 0, 0, maxOt) | |
| et = 0 | |
| ot = 0 | |
| setTickRate(50) | |
| function onTick() | |
| et=et+1 | |
| ot=ot+1 | |
| if et > maxEt then et=0 end | |
| if ot > maxOt then ot=0 end | |
| setChannel(etId, et) | |
| setChannel(otId, ot) | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment