Currently, error information is often printed to the debug console immediately after the error is identified.
Some error conditions like undervoltage may persist for a longer period of time, resulting in lots of prints to the console. Also, errors often occur / are detected in an ISR context, where printing something is not ideal.
Possible improvement: Only set an error flag and offload error reporting to a different (lower priority) thread, possibly even the main thread. The error reporting checks if a flag has changed compared to previous check and prints the information about a new (or resolved) error only once.
Currently, error information is often printed to the debug console immediately after the error is identified.
Some error conditions like undervoltage may persist for a longer period of time, resulting in lots of prints to the console. Also, errors often occur / are detected in an ISR context, where printing something is not ideal.
Possible improvement: Only set an error flag and offload error reporting to a different (lower priority) thread, possibly even the main thread. The error reporting checks if a flag has changed compared to previous check and prints the information about a new (or resolved) error only once.