Skip to content

Commit

Permalink
Send status of "Präsenztaste" also when in QAA50 mode
Browse files Browse the repository at this point in the history
  • Loading branch information
fredlcore committed Dec 15, 2024
1 parent 1166730 commit 5c458f8
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions BSB_LAN/include/pps_handling.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ uint16_t pps_bus_handling(byte *msg) {
tx_msg[7] = pps_values[PPS_BA];
break;
case 6:
tx_msg[1] = 0x4C; // Präsenz
tx_msg[7] = pps_values[PPS_AW];
break;
case 7:
{
if (pps_values[PPS_AW] == 0) { // Set destination temperature (comfort + knob for heating period, otherwise reduced temperature)
pps_values[PPS_RTZ] = pps_values[PPS_RTA];
Expand All @@ -45,11 +49,11 @@ uint16_t pps_bus_handling(byte *msg) {
tx_msg[7] = pps_values[PPS_RTZ] & 0xFF;
break;
}
case 7:
case 8:
tx_msg[1] = 0x56;
tx_msg[7] = 0x00;
break;
case 8:
case 9:
{
if (pps_time_set == true) {
bool found = false;
Expand Down Expand Up @@ -97,25 +101,21 @@ uint16_t pps_bus_handling(byte *msg) {
}
}
// break;
case 9:
case 10:
tx_msg[1] = 0x08; // Raumtemperatur Soll
tx_msg[6] = pps_values[PPS_RTS] >> 8;
tx_msg[7] = pps_values[PPS_RTS] & 0xFF;
break;
case 10:
case 11:
tx_msg[1] = 0x09; // Raumtemperatur Abwesenheit Soll
tx_msg[6] = pps_values[PPS_RTA] >> 8;
tx_msg[7] = pps_values[PPS_RTA] & 0xFF;
break;
case 11:
case 12:
tx_msg[1] = 0x0B; // Trinkwassertemperatur Soll
tx_msg[6] = pps_values[PPS_TWS] >> 8;
tx_msg[7] = pps_values[PPS_TWS] & 0xFF;
break;
case 12:
tx_msg[1] = 0x4C; // Präsenz
tx_msg[7] = pps_values[PPS_AW];
break;
case 13:
tx_msg[1] = 0x1E; // Trinkwassertemperatur Reduziert Soll
tx_msg[6] = pps_values[PPS_TWR] >> 8;
Expand Down Expand Up @@ -244,7 +244,7 @@ uint16_t pps_bus_handling(byte *msg) {
break;
}
msg_cycle++;
if (msg_cycle > 25 || (pps_values[PPS_QTP] == 0x52 && msg_cycle > 5)) { // QAA50 sends fewer parameters
if (msg_cycle > 25 || (pps_values[PPS_QTP] == 0x52 && msg_cycle > 6)) { // QAA50 sends fewer parameters
printFmtToDebug("Resetting msg_cycle from %d to 0", msg_cycle);
msg_cycle = 0;
}
Expand Down Expand Up @@ -286,9 +286,9 @@ printFmtToDebug("Restoring msg_cycle to %d", saved_msg_cycle);
printFmtToDebug("Saving msg_cycle %d", saved_msg_cycle);
}
switch (msg[1]) {
case 0x08: msg_cycle = 9; break;
case 0x09: msg_cycle = 10; break;
case 0x0B: msg_cycle = 11; break;
case 0x08: msg_cycle = 10; break;
case 0x09: msg_cycle = 11; break;
case 0x0B: msg_cycle = 12; break;
case 0x38: msg_cycle = 0; break;
case 0x3A: msg_cycle = 27; break;
case 0x48: msg_cycle = 1; break;
Expand Down

0 comments on commit 5c458f8

Please sign in to comment.