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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user