From 71d05dade97177679d796c6fbb1656e9582ed509 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Rudowicz?= Date: Wed, 6 Mar 2024 19:47:26 +0100 Subject: [PATCH] Fix PartitionAlarm --- message_contents.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/message_contents.go b/message_contents.go index 21b71b0..f26fb5a 100644 --- a/message_contents.go +++ b/message_contents.go @@ -13,8 +13,8 @@ const ( ArmedPartition_Armed = true ArmedPartition_Unrmed = false - PartitionAlarm_Alarm = false - PartitionAlarm_AlarmCancelled = true + PartitionAlarm_Alarm = true + PartitionAlarm_AlarmCancelled = false ) type SatelNameGetter interface { @@ -50,7 +50,7 @@ func getSatelMessageContent(messages []satel.BasicEventElement, s SatelNameGette } func (self SatelMsgContent) GetName() string { - if self.SatelEvent.Type == satel.ArmedPartition { + if self.SatelEvent.Type == satel.ArmedPartition || self.SatelEvent.Type == satel.PartitionAlarm { // Satel has 1-based indexes of partitions, go-satel has 0-based name, err := self.s.GetName(satel.DeviceType_Partition, byte(self.SatelEvent.Index+1)) if err != nil {