LUA API system.setControl as an integer value
- andreobi
- Offline Autor
- Neues Mitglied
- Beiträge: 19
- Dank erhalten: 23
LUA API system.setControl as an integer value wurde erstellt von andreobi
Posted 15 Okt. 2021 13:57 #1
Hello,
today I can use system.setControl to set an value between -1 and 1 that is basicly okay, but if I wand to send an exact value on the exbus it is not possible because of the floatingpoint rounding. My request is to expand the system.setControl API to system.setControlInt(controlNo,value) so I can send a value from 0-0xffff or if there are linitations in the receiver or in the system at least in the range of 0-0x3fff maybe with a fix offset.
The wish is to receive an exact value on the exbus which is identical to the defined value in the lua app.
Regards
Andre
today I can use system.setControl to set an value between -1 and 1 that is basicly okay, but if I wand to send an exact value on the exbus it is not possible because of the floatingpoint rounding. My request is to expand the system.setControl API to system.setControlInt(controlNo,value) so I can send a value from 0-0xffff or if there are linitations in the receiver or in the system at least in the range of 0-0x3fff maybe with a fix offset.
The wish is to receive an exact value on the exbus which is identical to the defined value in the lua app.
Regards
Andre
von andreobi
Folgende Benutzer bedankten sich: Sepp62
Bitte Anmelden oder Registrieren um der Konversation beizutreten.
- Raf
- Offline
- Premium Mitglied
- Beiträge: 137
- Dank erhalten: 184
Many requests for Lua enhancement. I hope that at least some of them will be implemented
The EX Bus value is calculated from float in this way:
result = lroundf(valuef * 4000) + 12000
The EX Bus value is calculated from float in this way:
result = lroundf(valuef * 4000) + 12000
Voltario T30, Touch Switch, MicroVario, AMS, SE6
von Raf
Folgende Benutzer bedankten sich: Thorn, IG-Modellbau
Bitte Anmelden oder Registrieren um der Konversation beizutreten.
Ladezeit der Seite: 0.978 Sekunden