From 2a686593b3921256f6e498e7f7cfc7bb3f199443 Mon Sep 17 00:00:00 2001 From: fredlcore Date: Thu, 31 Oct 2024 01:54:53 +0800 Subject: [PATCH] Removed pps_offset as it was no longer used. --- BSB_LAN/include/pps_handling.h | 40 +++++++++++++++++----------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/BSB_LAN/include/pps_handling.h b/BSB_LAN/include/pps_handling.h index 0a8d0231..b286bd3d 100644 --- a/BSB_LAN/include/pps_handling.h +++ b/BSB_LAN/include/pps_handling.h @@ -330,7 +330,7 @@ ich mir da nicht) } else if ((msg[0] & 0x0F) == 0x0D) { // Info-Telegramme von der Therme (0x1D) // uint8_t pps_offset = (msg[0] == 0x17 && pps_write != 1); - uint8_t pps_offset = 0; +// uint8_t pps_offset = 0; // uint16_t temp = (msg[6+pps_offset] << 8) + msg[7+pps_offset]; uint16_t temp = (msg[6] << 8) + msg[7]; uint16_t i = sizeof(cmdtbl)/sizeof(cmdtbl[0]) - 1; @@ -344,9 +344,9 @@ ich mir da nicht) i--; } uint16_t flags=cmdtbl[i].flags; - if (programIsreadOnly(flags) || pps_write != 1 || (msg[1+pps_offset] == 0x79 && pps_time_received == false)) { - switch (msg[1+pps_offset]) { - case 0x4F: log_now = setPPS(PPS_CON, msg[7+pps_offset]); saved_msg_cycle = msg_cycle; msg_cycle = 0; break; // Gerät an der Therme angemeldet? 0 = ja, 1 = nein + if (programIsreadOnly(flags) || pps_write != 1 || (msg[1] == 0x79 && pps_time_received == false)) { + switch (msg[1]) { + case 0x4F: log_now = setPPS(PPS_CON, msg[7]); saved_msg_cycle = msg_cycle; msg_cycle = 0; break; // Gerät an der Therme angemeldet? 0 = ja, 1 = nein case 0x08: pps_values[PPS_RTS] = temp; break; // Raumtemperatur Soll case 0x09: pps_values[PPS_RTA] = temp; break; // Raumtemperatur Abwesenheit Soll @@ -362,16 +362,16 @@ ich mir da nicht) case 0x2B: pps_values[PPS_TWI] = temp; break; // Trinkwassertemperatur Ist case 0x2C: pps_values[PPS_MVT] = temp; break; // Mischervorlauftemperatur case 0x2E: pps_values[PPS_KVT] = temp; break; // Vorlauftemperatur - case 0x38: pps_values[PPS_QTP] = msg[7+pps_offset]; break; // QAA type - case 0x49: log_now = setPPS(PPS_BA, msg[7+pps_offset]); break; // Betriebsart + case 0x38: pps_values[PPS_QTP] = msg[7]; break; // QAA type + case 0x49: log_now = setPPS(PPS_BA, msg[7]); break; // Betriebsart case 0x4A: pps_values[PPS_KVS] = temp; // Vorlauftemperatur-Soll bei MCBA-Systemen - pps_values[PPS_MOD] = msg[3+pps_offset]; // Brennermodulation bei MCBA-Systemen - setPPS(PPS_BRS, msg[5+pps_offset]); // Brennerstatus bei MCBA_Systemen + pps_values[PPS_MOD] = msg[3]; // Brennermodulation bei MCBA-Systemen + setPPS(PPS_BRS, msg[5]); // Brennerstatus bei MCBA_Systemen break; - case 0x4C: log_now = setPPS(PPS_AW, msg[7+pps_offset]); break; // Komfort-/Eco-Modus - case 0x4D: log_now = setPPS(PPS_BRS, msg[7+pps_offset]); break; // Brennerstatus - case 0x57: pps_values[PPS_ATG] = temp; log_now = setPPS(PPS_TWB, msg[2+pps_offset]); break; // gemischte Außentemperatur / Trinkwasserbetrieb + case 0x4C: log_now = setPPS(PPS_AW, msg[7]); break; // Komfort-/Eco-Modus + case 0x4D: log_now = setPPS(PPS_BRS, msg[7]); break; // Brennerstatus + case 0x57: pps_values[PPS_ATG] = temp; log_now = setPPS(PPS_TWB, msg[2]); break; // gemischte Außentemperatur / Trinkwasserbetrieb case 0x60: case 0x61: case 0x62: @@ -380,10 +380,10 @@ ich mir da nicht) case 0x65: case 0x66: { - uint8_t start_loop = PPS_S11+(msg[1+pps_offset]-0x60)*6; // PPS_S11 is the first slot in pps_values to store time progs. Each day has six slots. Telegram data is identified by 0x60 (Monday) to 0x66 (Sunday), so remove 0x60 from telegram data to know which date we need to save to. + uint8_t start_loop = PPS_S11+(msg[1]-0x60)*6; // PPS_S11 is the first slot in pps_values to store time progs. Each day has six slots. Telegram data is identified by 0x60 (Monday) to 0x66 (Sunday), so remove 0x60 from telegram data to know which date we need to save to. uint8_t end_loop = start_loop + 6; for (int j=start_loop; j