reconnects are slightly improved
I don't really like the reset thing with the delay. I need to implement something better later on
This commit is contained in:
@@ -34,6 +34,7 @@ const (
|
||||
sendDataCMDID types.Command = 7
|
||||
newLayoutCMDID types.Command = 8
|
||||
healthCheckCMDID types.Command = 9
|
||||
resetCMDID types.Command = 10
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -404,6 +405,17 @@ func (d *CDashDisplay) UnloadLayout() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (cds *CDashDisplay) reset() error {
|
||||
err := cds.WT.SendCommand(resetCMDID, []byte{0x01, 0x02, 0x03, 0x04}, nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
time.Sleep(3000 * time.Millisecond)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (d *CDashDisplay) SendData(data *telemetry.TelemetryData) error {
|
||||
packet := d.encodePacket(data)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user