Skip to content

Commit

Permalink
Fix broken humidity reading after reconnect of device (indilib#933)
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-englmaier authored Jun 18, 2024
1 parent e333c40 commit 440a6bf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions indi-aagcloudwatcher-ng/indi_aagcloudwatcher_ng.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,11 @@ bool AAGCloudWatcher::Handshake()

if (m_FirmwareVersion >= 5.6)
{
addParameter("WEATHER_HUMIDITY", "Relative Humidity (%)", 0, 100, 10);
setCriticalParameter("WEATHER_HUMIDITY");
// add humidity parameter, if not already present
if (!ParametersNP.findWidgetByName("WEATHER_HUMIDITY")) {
addParameter("WEATHER_HUMIDITY", "Relative Humidity (%)", 0, 100, 10);
setCriticalParameter("WEATHER_HUMIDITY");
}
}

return true;
Expand Down

0 comments on commit 440a6bf

Please sign in to comment.