Skip to content

Commit 7279574

Browse files
Konstantin Sinitsynclaude
andcommitted
Set time variables only on timestamp messages
Upstream PR taligentx#339 (frankonski): call processTime() for 0xA5 and 0xEB only when the message is an actual timestamp (panelData[6]/[7] == 0), avoiding decoding time from non-timestamp panel data. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 3f61e1d commit 7279574

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

src/dscKeybusProcessData.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -499,10 +499,9 @@ void dscKeybusInterface::processPanel_0x87() {
499499
void dscKeybusInterface::processPanel_0xA5() {
500500
if (!validCRC()) return;
501501

502-
processTime(2);
503-
504502
// Timestamp
505503
if (panelData[6] == 0 && panelData[7] == 0) {
504+
processTime(2);
506505
statusChanged = true;
507506
timestampChanged = true;
508507
return;
@@ -579,7 +578,13 @@ void dscKeybusInterface::processPanel_0xEB() {
579578
if (!validCRC()) return;
580579
if (dscPartitions < 3) return;
581580

582-
processTime(3);
581+
// Timestamp
582+
if (panelData[6] == 0 && panelData[7] == 0) {
583+
processTime(3);
584+
statusChanged = true;
585+
timestampChanged = true;
586+
return;
587+
}
583588

584589
byte partition;
585590
switch (panelData[2]) {

0 commit comments

Comments
 (0)