You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was porting uPyEcho to latest MicroPython (June 2020-- 1.12_2 ) to run on the TinPICO.
As part of that, I had to change all the references to clock.gmtime() to clock.datetime() when composing the date_str. as gmtime() is not available on my MP port.
After this format_timetuple_and_zone was hitting index out of range errors and my devices were intermittently discoverable AND always unresponsive after they did work (On and Off).
I tracked that down to changing the timetuple[6] in the day of the week section to [timetuple[4].
This is the corrected function which worked for me.
I don't know why this happened. I'm not sure if the time.gmtime() on your ports of MicroPython just has different looking tuples, if the timetuple changed in MicroPython or if this was always a bug. But for me on 1.12 on the TinyPICO this works.
I thought I'd share in case others hit this this as well.
Thanks!
The text was updated successfully, but these errors were encountered:
I was porting uPyEcho to latest MicroPython (June 2020-- 1.12_2 ) to run on the TinPICO.
As part of that, I had to change all the references to
clock.gmtime()
toclock.datetime()
when composing the date_str. as gmtime() is not available on my MP port.After this
format_timetuple_and_zone
was hitting index out of range errors and my devices were intermittently discoverable AND always unresponsive after they did work (On and Off).I tracked that down to changing the
timetuple[6]
in the day of the week section to[timetuple[4]
.This is the corrected function which worked for me.
I don't know why this happened. I'm not sure if the time.gmtime() on your ports of MicroPython just has different looking tuples, if the timetuple changed in MicroPython or if this was always a bug. But for me on 1.12 on the TinyPICO this works.
I thought I'd share in case others hit this this as well.
Thanks!
The text was updated successfully, but these errors were encountered: