Skip to content

Instantly share code, notes, and snippets.

@brentpicasso
Created October 4, 2018 16:48
Show Gist options
  • Select an option

  • Save brentpicasso/71831c112c9ec3fca34de7db75c7701c to your computer and use it in GitHub Desktop.

Select an option

Save brentpicasso/71831c112c9ec3fca34de7db75c7701c to your computer and use it in GitHub Desktop.
Test virtual channels (EngineTemp and OilTemp)
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