From 730e55e6c659d0df9c65d63780ce3ac04385040b Mon Sep 17 00:00:00 2001 From: Claude Code Date: Mon, 9 Nov 2026 12:17:42 +0100 Subject: [PATCH] fix: set CMT radio type for HMS inverters with 1410 serial and fix duration_reserve index HMS-1000-2T with a leading 1410 serial (#1845) never got ivRadioType set (stayed UNKNOWN), so CMT specific handling in Communication.h (frequency switching, timeouts) was skipped. In addition duration_reserve[] had only 2 entries while it is indexed by the 3 value INV_RADIO_TYPE enum (UNKNOWN, NRF, CMT), so CMT read out of bounds and NRF/UNKNOWN were shifted. Co-Authored-By: Claude Sonnet 5.5 --- src/hm/hmDefines.h | 2 +- src/hm/hmSystem.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hm/hmDefines.h b/src/hm/hmDefines.h index 4287d26e..c91639c7 100644 --- a/src/hm/hmDefines.h +++ b/src/hm/hmDefines.h @@ -119,7 +119,7 @@ enum {INV_RADIO_TYPE_UNKNOWN = 0, INV_RADIO_TYPE_NRF, INV_RADIO_TYPE_CMT}; #define DURATION_TXFRAME 85 // timeout parameter for first transmission and first expected frame (time to first channel switch from tx start!) (ms) #define DURATION_LISTEN_MIN 5 // time to stay at least on a listening channel (ms) #define DURATION_PAUSE_LASTFR 45 // how long to pause after last frame (ms) -const uint8_t duration_reserve[2] = {65, 115}; +const uint8_t duration_reserve[3] = {65, 65, 115}; // index = INV_RADIO_TYPE_(UNKNOWN, NRF, CMT) #define LIMIT_FAST_IV 85 // time limit to qualify an inverter as very fast answering inverter #define LIMIT_VERYFAST_IV 70 // time limit to qualify an inverter as very fast answering inverter diff --git a/src/hm/hmSystem.h b/src/hm/hmSystem.h index 9657d0d4..9e1e72ca 100644 --- a/src/hm/hmSystem.h +++ b/src/hm/hmSystem.h @@ -78,6 +78,7 @@ class HmSystem { iv->ivRadioType = INV_RADIO_TYPE_CMT; } else if(iv->config->serial.b[5] == 0x14) { iv->ivGen = IV_HMS; + iv->ivRadioType = INV_RADIO_TYPE_CMT; if(iv->config->serial.b[4] == 0x10) iv->type = INV_TYPE_2CH; } else if(iv->config->serial.u64 != 0ULL) {