Skip to content

Commit 1ea57be

Browse files
committed
Fix compile errors
1 parent 872daea commit 1ea57be

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

drivers/power/cheapodc.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,7 @@ bool CheapoDC::SetPowerPort(size_t port, bool enabled)
758758

759759
bool CheapoDC::SetDewPort(size_t port, bool enabled, double dutyCycle)
760760
{
761+
INDI_UNUSED(enabled);
761762
if (port == 0) // Main dew output
762763
{
763764
return setOutput(static_cast<int>(dutyCycle));
@@ -1518,7 +1519,7 @@ bool CheapoDC::readSettings()
15181519

15191520
if (ok == 1)
15201521
{
1521-
DewChannelsSP[0].setValue(output);
1522+
DewChannelsSP[0].setState(output > 0 ? ISS_ON : ISS_OFF);
15221523
DewChannelsSP.setState(IPS_OK);
15231524
DewChannelsSP.apply();
15241525
}

drivers/power/usb_dewpoint.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -549,9 +549,9 @@ bool USBDewpoint::readSettings()
549549
DewpointNP.setState(IPS_OK);
550550
DewpointNP.apply();
551551

552-
DewChannelsSP[0].setValue(output1);
553-
DewChannelsSP[1].setValue(output2);
554-
DewChannelsSP[2].setValue(output3);
552+
DewChannelsSP[0].setState(output1 > 0 ? ISS_ON : ISS_OFF);
553+
DewChannelsSP[1].setState(output2 > 0 ? ISS_ON : ISS_OFF);
554+
DewChannelsSP[2].setState(output3 > 0 ? ISS_ON : ISS_OFF);
555555
DewChannelsSP.setState(IPS_OK);
556556
DewChannelsSP.apply();
557557

0 commit comments

Comments
 (0)