tonarino / panel-firmware

Firmware for the volume control hardware, targeting an STM32F4 board
MIT License
75 stars 10 forks source link

Use panic-reset instead of panic-halt #12

Closed bschwind closed 3 years ago

bschwind commented 3 years ago

@skywhale please review

In general we should reduce the amount of panics as much as possible, though with our current protocol it may be better to simply panic and reset on an unrecognized message instead of attempting to recover.

Between halting or resetting though, I would definitely prefer resetting as that gives us a better chance of not needing physical access to the device if something goes wrong.

skywhale commented 3 years ago

Would a reset result in re-establishment of the connection?

bschwind commented 3 years ago

Would a reset result in re-establishment of the connection?

I haven't tested it yet, but a reset should close the TTY on the host side, and then the firmware should re-establish a USB connection as it's starting up.