I have another "reboot" scenario with OpenBK scripting, this time trying to give an off pulse of a few seconds at a configurable time.
I'm attempting to use a clock event to turn off the relay like this:
addClockEvent $CH5:$CH7 0xFF 567 turn_off_relay
with the CH5 and CH7 being configurable from the GUI, but I'm guessing from its behavior that the $CH5 and $CH7 are not being expanded. If I put in a readable time like 18:23 it works just fine.
I can of course just change the code to set a new time, but I'd like the client to be able to adjust this themselves.
Could someone confirm whether this expansion is possible somehow with the existing codebase? I haven't yet dug into the parser and interpreter enough to see how it's done.
Thanks!
I'm attempting to use a clock event to turn off the relay like this:
addClockEvent $CH5:$CH7 0xFF 567 turn_off_relay
with the CH5 and CH7 being configurable from the GUI, but I'm guessing from its behavior that the $CH5 and $CH7 are not being expanded. If I put in a readable time like 18:23 it works just fine.
I can of course just change the code to set a new time, but I'd like the client to be able to adjust this themselves.
Could someone confirm whether this expansion is possible somehow with the existing codebase? I haven't yet dug into the parser and interpreter enough to see how it's done.
Thanks!