LUA API system.setControl as an integer value

  • andreobi
  • andreobi's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 19
  • Thank you received: 23

TPL_KUNENA_MESSAGE_CREATED LUA API system.setControl as an integer value

15 Oct 2021 11: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
The following user(s) said Thank You: Sepp62

Please Log in or Create an account to join the conversation.

  • Raf
  • Raf's Avatar
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 141
  • Thank you received: 192

TPL_KUNENA_MESSAGE_REPLIED_NEW LUA API system.setControl as an integer value

15 Oct 2021 22:03
#2
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
Voltario T30, Touch Switch, MicroVario, AMS, SE6
The following user(s) said Thank You: Thorn, IG-Modellbau

Please Log in or Create an account to join the conversation.

Time to create page: 0.300 seconds
Powered by Kunena Forum