This commit is contained in:
Nonoo 2020-10-30 10:04:23 +01:00
parent 48dc37504f
commit 13be2d47ee
3 changed files with 3 additions and 6 deletions

View file

@ -207,9 +207,8 @@ func (s *controlStream) handleRead(r []byte) error {
if bytes.Equal(r[48:51], []byte{0xff, 0xff, 0xff}) {
if !s.serialAndAudioStreamOpened {
return errors.New("auth failed, try rebooting the radio")
} else {
return errors.New("auth failed")
}
return errors.New("auth failed")
}
if bytes.Equal(r[48:51], []byte{0x00, 0x00, 0x00}) && r[64] == 0x01 {
return errors.New("got radio disconnected")