From 41bdfebda229ecc2772d016227ec8cbd25c0f3eb Mon Sep 17 00:00:00 2001 From: BamaHodl Date: Fri, 16 Jul 2021 15:36:22 -0500 Subject: [PATCH 1/2] Corrected pool temp flashing when in dual mode and spa pump on. Corrected spa temp flashing when in dual mode and pool pump off. --- aqualinkd.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/aqualinkd.c b/aqualinkd.c index 1ccbd30e..0910e7c4 100644 --- a/aqualinkd.c +++ b/aqualinkd.c @@ -750,7 +750,10 @@ bool process_packet(unsigned char *packet, int length) if (_aqualink_data.aqbuttons[PUMP_INDEX].led->state == OFF) { _aqualink_data.pool_temp = TEMP_UNKNOWN; - _aqualink_data.spa_temp = TEMP_UNKNOWN; + if(isSINGLE_DEV_PANEL == true) + { + _aqualink_data.spa_temp = TEMP_UNKNOWN; + } //_aqualink_data.spa_temp = _aqconfig_.report_zero_spa_temp?-18:TEMP_UNKNOWN; } else if (_aqualink_data.aqbuttons[SPA_INDEX].led->state == OFF && isSINGLE_DEV_PANEL != true) @@ -758,7 +761,7 @@ bool process_packet(unsigned char *packet, int length) //_aqualink_data.spa_temp = _aqconfig_.report_zero_spa_temp?-18:TEMP_UNKNOWN; _aqualink_data.spa_temp = TEMP_UNKNOWN; } - else if (_aqualink_data.aqbuttons[SPA_INDEX].led->state == ON && isSINGLE_DEV_PANEL != true) + else if (_aqualink_data.aqbuttons[SPA_INDEX].led->state == ON && isSINGLE_DEV_PANEL == true) { _aqualink_data.pool_temp = TEMP_UNKNOWN; } From df1d9487f76965b1fb032b4b3bbc7495d93f5ebc Mon Sep 17 00:00:00 2001 From: BamaHodl Date: Fri, 16 Jul 2021 17:18:17 -0500 Subject: [PATCH 2/2] Corrected - set spa temp to unknown whenever spa is off regardless of pool pump status --- aqualinkd.c | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/aqualinkd.c b/aqualinkd.c index 0910e7c4..a7812a43 100644 --- a/aqualinkd.c +++ b/aqualinkd.c @@ -747,23 +747,30 @@ bool process_packet(unsigned char *packet, int length) //LOG(AQRS_LOG,LOG_DEBUG_SERIAL, "RS Received STATUS length %d.\n", length); memcpy(_aqualink_data.raw_status, packet + 4, AQ_PSTLEN); processLEDstate(); - if (_aqualink_data.aqbuttons[PUMP_INDEX].led->state == OFF) + if (_aqualink_data.aqbuttons[SPA_INDEX].led->state == OFF) { - _aqualink_data.pool_temp = TEMP_UNKNOWN; - if(isSINGLE_DEV_PANEL == true) - { - _aqualink_data.spa_temp = TEMP_UNKNOWN; - } - //_aqualink_data.spa_temp = _aqconfig_.report_zero_spa_temp?-18:TEMP_UNKNOWN; + _aqualink_data.spa_temp = TEMP_UNKNOWN; + //_aqualink_data.spa_temp = _aqconfig_.report_zero_spa_temp?-18:TEMP_UNKNOWN; } - else if (_aqualink_data.aqbuttons[SPA_INDEX].led->state == OFF && isSINGLE_DEV_PANEL != true) + if(isSINGLE_DEV_PANEL) { - //_aqualink_data.spa_temp = _aqconfig_.report_zero_spa_temp?-18:TEMP_UNKNOWN; - _aqualink_data.spa_temp = TEMP_UNKNOWN; + if (_aqualink_data.aqbuttons[PUMP_INDEX].led->state == OFF) + { + _aqualink_data.pool_temp = TEMP_UNKNOWN; + _aqualink_data.spa_temp = TEMP_UNKNOWN; + //_aqualink_data.spa_temp = _aqconfig_.report_zero_spa_temp?-18:TEMP_UNKNOWN; + } + else if (_aqualink_data.aqbuttons[SPA_INDEX].led->state == ON) + { + _aqualink_data.pool_temp = TEMP_UNKNOWN; + } } - else if (_aqualink_data.aqbuttons[SPA_INDEX].led->state == ON && isSINGLE_DEV_PANEL == true) + else // isSINGLE_DEV_PANEL == false { - _aqualink_data.pool_temp = TEMP_UNKNOWN; + if (_aqualink_data.aqbuttons[PUMP_INDEX].led->state == OFF) + { + _aqualink_data.pool_temp = TEMP_UNKNOWN; + } } // COLOR MODE programming relies on state changes, so let any threads know