1
0
Fork 0

Fix PartitionAlarm

This commit is contained in:
Michał Rudowicz 2024-03-06 19:47:26 +01:00
parent 4728a18dcb
commit 71d05dade9
1 changed files with 3 additions and 3 deletions

View File

@ -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 {