This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Translating code between Lua and JS
#1
Hi,

I am currently translate some code which I've created in NodeJS for controlling Somfy blinds into Lua to use it by LM. Could you help me with translate some functions?

Code:
parseInt(hexValue[i], 16)

toString(16) // e.g. decimalChecksum.toString(16)

And also how can I convert hex string to hex?


Code:
'7FF2FAB843FA000000FFFE065D' => string.char(0x7F,0xF2,0xFA,0xB8,0x43,0xFA,0x00,0x00,0x00,0xFF,0xFE,0x06,0x5D)
Done is better than perfect
Reply


Messages In This Thread
Translating code between Lua and JS - by buuuudzik - 06.09.2018, 07:40

Forum Jump: