Skip to content

Commit

Permalink
Add status msg for zones 33-64 bypass and fault/restore
Browse files Browse the repository at this point in the history
Contributed by Alviunta (https://github.com/Alviunta)
In taligentx#295
  • Loading branch information
kricon committed Jun 29, 2022
1 parent e60c462 commit febdee5
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions src/dscKeybusPrintData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1027,6 +1027,9 @@ void dscKeybusInterface::printPanelStatus5(byte panelByte) {
void dscKeybusInterface::printPanelStatus14(byte panelByte) {
#if !defined(__AVR__) // Excludes Arduino/AVR to conserve storage space
switch (panelData[panelByte]) {
// 0x40 - 0x5F: Zone fault restored, zones 33-64
// 0x60 - 0x7F: Zone fault, zones 33-64
// 0x80 - 0x9F: Zone bypassed, zones 33-64
// 0xA0 - 0xA3: PC5200 AC restore, slots 1-4
// 0xA4 - 0xA7: PC5200 AC trouble, slots 1-4
// 0xA8 - 0xAB: PC5200 Battery restore, slots 1-4
Expand All @@ -1039,6 +1042,48 @@ void dscKeybusInterface::printPanelStatus14(byte panelByte) {
case 0xC5: stream->print(F("TLink receiver restored")); return;
}

/*
* Zone fault restored, zones 33-64
*
* Command Partition YYY1YYY2 MMMMDD DDDHHHHH MMMMMM Status CRC
* 11101011 0 00000000 00100001 00010110 11000000 00110100 00010100 01011111 11111111 10001000 [0xEB] 2021.05.22 00:13 | Zone fault restored: 64
* 11101100 0 00000000 00100001 00010110 11000000 00110100 00010100 01011111 00001001 10010011 [0xEC] Event: 009 | 2021.05.22 00:13 | Zone fault restored: 64
* Byte 0 1 2 3 4 5 6 7 8 9 10
*/
if (panelData[panelByte] >= 0x40 && panelData[panelByte] <= 0x5F) {
stream->print(F("Zone fault restored: "));
printNumberOffset(panelByte, -31);
return;
}

/*
* Zone fault, zones 33-64
*
* Command Partition YYY1YYY2 MMMMDD DDDHHHHH MMMMMM Status CRC
* 11101011 0 00000000 00100001 00010110 11000000 00100100 00010100 01111111 11111111 10011000 [0xEB] 2021.05.22 00:09 | Zone fault: 64
* 11101100 0 00000000 00100001 00010110 11000000 00100100 00010100 01111111 00001011 10100101 [0xEC] Event: 011 | 2021.05.22 00:09 | Zone fault: 64
* Byte 0 1 2 3 4 5 6 7 8 9 10
*/
if (panelData[panelByte] >= 0x60 && panelData[panelByte] <= 0x7F) {
stream->print(F("Zone fault: "));
printNumberOffset(panelByte, -63);
return;
}

/*
* Zones bypassed, zones 33-64
*
* Command Partition YYY1YYY2 MMMMDD DDDHHHHH MMMMMM Status CRC
* 11101011 0 00000001 00100001 00010110 11000000 00011000 00010100 10011111 00000000 10101110 [0xEB] 2021.05.22 00:06 | Partition 1 | Zone bypassed: 64
* 11101100 0 00000001 00100001 00010110 11000000 00011000 00010100 10011111 00010011 11000010 [0xEC] Event: 019 | 2021.05.22 00:06 | Partition 1 | Zone bypassed: 64
* Byte 0 1 2 3 4 5 6 7 8 9 10
*/
if (panelData[panelByte] >= 0x80 && panelData[panelByte] <= 0x9F) {
stream->print(F("Zone bypassed: "));
printNumberOffset(panelByte, -95);
return;
}

/*
* PC5200 AC restore: 1-4
*/
Expand Down

0 comments on commit febdee5

Please sign in to comment.