diff --git a/scd4x/scd4x.go b/scd4x/scd4x.go index 2fa435d..14128fe 100644 --- a/scd4x/scd4x.go +++ b/scd4x/scd4x.go @@ -313,7 +313,7 @@ func (d *Dev) SetConfiguration(newCfg *DevConfig) error { if currentConfig.ASCInitialPeriod != newCfg.ASCInitialPeriod { if newCfg.ASCInitialPeriod%4 != 0 { - return fmt.Errorf("scd4x: invalid initial period %d. must be a mulitple of 4", newCfg.ASCInitialPeriod) + return fmt.Errorf("scd4x: invalid initial period %d. must be a multiple of 4", newCfg.ASCInitialPeriod) } w[0] = uint16(newCfg.ASCInitialPeriod / time.Hour) _, err := d.sendCommand(cmdSetASCInitialPeriod, w) @@ -324,7 +324,7 @@ func (d *Dev) SetConfiguration(newCfg *DevConfig) error { if currentConfig.ASCStandardPeriod != newCfg.ASCStandardPeriod { if newCfg.ASCStandardPeriod%4 != 0 { - return fmt.Errorf("scd4x: invalid standard period %d. must be a mulitple of 4", newCfg.ASCStandardPeriod) + return fmt.Errorf("scd4x: invalid standard period %d. must be a multiple of 4", newCfg.ASCStandardPeriod) } w[0] = uint16(newCfg.ASCStandardPeriod / time.Hour) _, err := d.sendCommand(cmdSetASCStandardPeriod, w) diff --git a/scd4x/scd4x_test.go b/scd4x/scd4x_test.go index 0f31f3a..76bc555 100644 --- a/scd4x/scd4x_test.go +++ b/scd4x/scd4x_test.go @@ -334,7 +334,7 @@ func TestGetSetConfiguration(t *testing.T) { // SCDRESET. Running this test will destructively clear customized values // previously programmed into the device. func TestPersistAndResetFactory(t *testing.T) { - if liveDevice && os.Getenv("SCDRESET") == "" { + if !liveDevice || os.Getenv("SCDRESET") == "" { t.Skip("using live device and SCDRESET not defined. skipping") } dev, err := getDev(t)