Appendix B: Lua extensions
Miscellaneous functions 77
BBBBB
Lua extensions
automatic: Optional parameter: Set to 1 to re-enable the automatic
handling of the power signals. If the parameter is left out
(or set to 0), the automatic handling is disabled.
Return values:
1) REMOTE_ON signal.
0 = Low / pulled down.
1 = High / disconnected
2) POWER_SAVE signal.
0 = Low / pulled down.
1 = High / disconnected
Example: r_on, pw_save = tcu_get_power_signals();
if r_on == 1 then
tcu_power_off_for(0);
end
tcu_sleep
Purpose: Suspend the LUA script. The script will continue after the
given time has elapsed. Other functions in the Terminal
Control Unit
- such as LED control - will continue unaffected while the
script
is suspended.
Format: tcu_sleep (time)
time: Time in milliseconds. Value: 2 - 2.147.483.647
Return value:
Error code: 0=OK, <0=error
Example: --wait for 5 seconds
tcu_sleep(5000);