From 440a6bfce867833a325c3005ff2e9ce49a3e35db Mon Sep 17 00:00:00 2001 From: Peter Englmaier Date: Tue, 18 Jun 2024 09:01:04 +0200 Subject: [PATCH] Fix broken humidity reading after reconnect of device (#933) --- indi-aagcloudwatcher-ng/indi_aagcloudwatcher_ng.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/indi-aagcloudwatcher-ng/indi_aagcloudwatcher_ng.cpp b/indi-aagcloudwatcher-ng/indi_aagcloudwatcher_ng.cpp index b3a7ce09d..27cb2d9bc 100644 --- a/indi-aagcloudwatcher-ng/indi_aagcloudwatcher_ng.cpp +++ b/indi-aagcloudwatcher-ng/indi_aagcloudwatcher_ng.cpp @@ -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;