I have a problem when selected 00:00 is recognized by function t.hasStartTime() = false, it should detect 00:00 as a valid hour, and --:-- (reset) as not established.
In other words, the correct functioning should be:
- when I selected 00:00 t.hasStartTime() = true
- when I selected --:-- (reset) t.hasStartTime() = false
since the time 00:00 is a valid time selectable
Exactly what time widget are you using? There are a few and the Time Input one doesn’t work quite the way you are describing.
To reset both start and stop times in time input widget, i must enter and select reset in two hours, It would be more comfortable to erase both start and stop times from the outside with a long press and a confirmation dialog.
I don’t think you clearly understand the Time Input Widget… it sends data to the sketch only ONCE… when you press OK, after entering your time info.
From there on the data is in your sketch to manipulate as required… if you want to stop, delay, clear it, etc. (the data in the code), then simply code up another button or something to do so.
As for how the widget works, it does precisely what it is designed to do… INPUT time data to the sketch that one time when asked to.
If you are looking for a different type of Timer option… there is the Timer or timer option in the Eventor.
My Time input widgets were functioning perfectly yesterday, on two different projects. This morning nothing works, Serial monitor is telling me that it’s 01.01.1970. and 00:01 today. RTC problems again?
Edit: problem raised when I reset time values in Time input widget. After that, it seems that I have to wait some time for clocks to sync again, after that everything works fine.
I believe “resetting” the Time Input widget simply clears the prior setting out of it… but doesn’t send anything to the MCU.
However, any data that does get sent to the MCU is a UI number that will need to get processed and requires a valid RTC sync in order to make “sense”, as it is the number of seconds of the day from midnight (as per RTC/Server) that corresponds to the time set in the widget.