Fix UART hang after master restart from the dashboard.

ReadFrame now returns on serial timeout instead of looping forever, and
serve closes and reopens the port after a master reboot so polling and
API commands can resume.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-31 16:45:57 +02:00
co-authored by Cursor
parent e4ce18edd8
commit ab1844ac32
5 changed files with 44 additions and 7 deletions
+8 -1
View File
@@ -417,9 +417,16 @@ func (m *managedSerial) FindMe(clientID uint32) error {
}
func (m *managedSerial) Restart(clientID uint32) error {
return m.withPort(func(sp *serialPort) error {
err := m.withPort(func(sp *serialPort) error {
return runRestartClient(sp, clientID)
})
if err != nil {
return err
}
if clientID == 0 {
m.recoverAfterMasterRestart()
}
return nil
}
func (s *serialPort) ledRingProgress(req *pb.LedRingProgressRequest) (*pb.LedRingProgressResponse, error) {