Skip to content

Commit

Permalink
Weather Interface Refactor (#2025)
Browse files Browse the repository at this point in the history
* Initial weather refactor

* More progress on weather interface migration

* Fix weather refactor issues and update drivers

* Fix include
  • Loading branch information
knro authored Mar 13, 2024
1 parent f5b4ea4 commit ae26512
Show file tree
Hide file tree
Showing 8 changed files with 178 additions and 216 deletions.
6 changes: 3 additions & 3 deletions drivers/auxiliary/pegasus_ppb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -469,9 +469,9 @@ bool PegasusPPB::getSensorData()
lastSensorData[PA_DEW_POINT] != result[PA_DEW_POINT])
{
if (WI::syncCriticalParameters())
IDSetLight(&critialParametersLP, nullptr);
ParametersNP.s = IPS_OK;
IDSetNumber(&ParametersNP, nullptr);
critialParametersLP.apply();
ParametersNP.setState(IPS_OK);
ParametersNP.apply();
}

// Power Status
Expand Down
6 changes: 3 additions & 3 deletions drivers/auxiliary/pegasus_ppba.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -729,9 +729,9 @@ bool PegasusPPBA::getSensorData()
lastSensorData[PA_DEW_POINT] != result[PA_DEW_POINT])
{
if (WI::syncCriticalParameters())
IDSetLight(&critialParametersLP, nullptr);
ParametersNP.s = IPS_OK;
IDSetNumber(&ParametersNP, nullptr);
critialParametersLP.apply();
ParametersNP.setState(IPS_OK);
ParametersNP.apply();
}

// Power Status
Expand Down
6 changes: 3 additions & 3 deletions drivers/auxiliary/pegasus_spb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -789,9 +789,9 @@ bool PegasusSPB::getSensorData()
lastSensorData[PA_DEW_POINT] != result[PA_DEW_POINT])
{
if (WI::syncCriticalParameters())
IDSetLight(&critialParametersLP, nullptr);
ParametersNP.s = IPS_OK;
IDSetNumber(&ParametersNP, nullptr);
critialParametersLP.apply();
ParametersNP.setState(IPS_OK);
ParametersNP.apply();
}

// Power Quad Status
Expand Down
6 changes: 3 additions & 3 deletions drivers/auxiliary/pegasus_upb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1400,9 +1400,9 @@ bool PegasusUPB::getSensorData()
if (sensorUpdated(result, 4, 6))
{
if (WI::syncCriticalParameters())
IDSetLight(&critialParametersLP, nullptr);
ParametersNP.s = IPS_OK;
IDSetNumber(&ParametersNP, nullptr);
critialParametersLP.apply();
ParametersNP.setState(IPS_OK);
ParametersNP.apply();
}

// Port Status
Expand Down
6 changes: 3 additions & 3 deletions drivers/telescope/lx200_OnStep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3274,9 +3274,9 @@ bool LX200_OnStep::ReadScopeStatus()
WI::updateProperties();

if (WI::syncCriticalParameters())
IDSetLight(&critialParametersLP, nullptr);
ParametersNP.s = IPS_OK;
IDSetNumber(&ParametersNP, nullptr);
critialParametersLP.apply();
ParametersNP.setState(IPS_OK);
ParametersNP.apply();

if (TMCDrivers)
{
Expand Down
1 change: 1 addition & 0 deletions libs/indibase/defaultdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,7 @@ class DefaultDevice : public ParentDevice
friend class Connection::TCP;
friend class FilterInterface;
friend class FocuserInterface;
friend class WeatherInterface;

protected:
DefaultDevice(const std::shared_ptr<DefaultDevicePrivate> &dd);
Expand Down
Loading

0 comments on commit ae26512

Please sign in to comment.