In the "on system#boot do" event the initial text "System time %systime%" is displayed, and in the "on rules#timer=4 do" only the time is overwritten with the current timebonti69 wrote: ↑16 May 2021, 16:27 PS: tried "LCD,1,1,DateTime" but does not display "Datetime:2021-05-16 17:43:41" which results in console, only "Datetime"...what's the correct synthax?
Or: let,1,Datetime ...then LCD,1,1,[var#1]
''The <text> parameter must be a single command parameter. Meaning, it must be wrapped in quotes when using a space or comma as text.
If double quote characters are needed, wrap the parameter in single quotes or back quotes.
All template notations can be used, like system variables, or reference to a task value.''
I copied both events here so you can easily find them.
Code: Select all
on rules#timer=4 do // Called often so placed at top
if %v1%=1 // If display is on
if %v2%=0 and %v4%=1
asyncEvent,DisplaySet1 // Add to queue
endif
if %v2%=1 and %v5%=1
asyncEvent,DisplaySet2 // Add to queue
endif
LCD,4,13,"%systime%" // update time only on line 4
endif
endon
on system#boot do
lcdcmd,clear
event,switch#state=1 // display on and start timer (time-out disabled)
let,2,1 // second mode
event,switch#state=11 // flip mode showing 1st set, start time-out timer
LoopTimerSet,4,1 // 1 second timer
LCD,4,1,"System time %systime%" // Show time on line 4
endon
NB: Just found a few small typo's in my code (I forgot to add the standard disclaimer: Untested code!), but I've fixed them here (can't seem to edit the previous post, for some reason ).
The "on rules#timer=4 do" event should be replaced by the one that's here, there are a few 'endon' statements where an 'endif' should be.