|
|
|
@ -136,16 +136,6 @@ func TestDev_Sense_error(t *testing.T) {
|
|
|
|
opts: DefaultOpts,
|
|
|
|
opts: DefaultOpts,
|
|
|
|
error: &DataCorruptionError{0x7F, 0x7E},
|
|
|
|
error: &DataCorruptionError{0x7F, 0x7E},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
|
|
|
|
name: "read timeout",
|
|
|
|
|
|
|
|
data: []byte{bitInitialized | bitBusy, 0x75, 0x52, 0x05, 0x8E, 0x40, 0x16},
|
|
|
|
|
|
|
|
opts: Opts{
|
|
|
|
|
|
|
|
MeasurementReadTimeout: 1,
|
|
|
|
|
|
|
|
MeasurementWaitInterval: -1,
|
|
|
|
|
|
|
|
ValidateData: true,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
error: &ReadTimeoutError{1},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
name: "not initialized",
|
|
|
|
name: "not initialized",
|
|
|
|
data: []byte{0x00, 0x75, 0x52, 0x05, 0x8E, 0x40, 0x20},
|
|
|
|
data: []byte{0x00, 0x75, 0x52, 0x05, 0x8E, 0x40, 0x20},
|
|
|
|
|