Closed pascalzauberzeug closed 1 month ago
@pascalzauberzeug If I recall correctly, the idea behind the waiting loop is to wait until hardware_time
exceeds the start time plus 3 seconds - or until the timeout is reached. This should work, because hardware_time
basically freezes during the flash process when no core message is received. Only after flashing and rebooting the ESP, new core messages lead to a time update and the loop exits.
But I can imagine that this logic is rather fragile. Waiting for "Replica complete" sounds like a more robust approach.
@falkoschindler yes, you are correct. It does freeze. But then I don't understand why it doesn't work. We have to look into that
While working on https://github.com/zauberzeug/rosys/issues/156 we noticed that flashing p0 via ui does not work correctly. The boot sequence of p0 still showed the old version. However flashing p0 via monitor.py worked perfectly fine.
The whole waiting loop should be reworked, because it just waits for 3 seconds and then tells the user that it's finished.
A quick fix would be to wait for a longer duration (I measured 43 seconds to flash p0), but the better way would be to wait for
I (100726) replicator: Replica complete.
on the serial with an emergency timeout.