Replies: 2 comments 1 reply
|
Hubs should never freeze. If it does, it is a bug in the firmware and can't be detected because some MicroPython function is blocking forever and never returns. There are still some places, e.g. in some Bluetooth functions, where we have not found and fixed all of the bugs like this. If you have code you can share that could help reproduce such a problem, that would help us find and fix it faster. For example, if you can remove all of the motor and sensor stuff from your program and just do Bluetooth and still reproduce the issue. When a lot of Bluetooth things are going on at the same time, sometimes the Bluetooth chip on the City and Technic hubs will freeze up (like due to out of memory error). This is likely what causes the firmware bugs since in most places, we assume that the Bluetooth always works and doesn't die. |
|
A frozen program cannot detect that it is frozen — that is what frozen means, and there is no timer that will run to tell you. The detection has to come from the other hub: send a heartbeat every N ms and treat two missed beats as a fault, then stop the motors from that side. That also covers the case where the hub is alive but the program logic is stuck, which an internal watchdog would not catch either. |


Uh oh!
There was an error while loading. Please reload this page.
Hello!
Is there any way that my program can detect if it is frozen? Sometimes one of the secondary hubs of my crane becomes frozen and it is problematic while a motor is running. Is there any way the program detects it and stops the program immediately? Program is 20Hz cyclic.
I think this might happen due to false observed data from the main hub where the xbox controller is connected.
Thank you in advance!
All reactions