Fix PartitionAlarm
This commit is contained in:
parent
4728a18dcb
commit
71d05dade9
|
@ -13,8 +13,8 @@ const (
|
||||||
ArmedPartition_Armed = true
|
ArmedPartition_Armed = true
|
||||||
ArmedPartition_Unrmed = false
|
ArmedPartition_Unrmed = false
|
||||||
|
|
||||||
PartitionAlarm_Alarm = false
|
PartitionAlarm_Alarm = true
|
||||||
PartitionAlarm_AlarmCancelled = true
|
PartitionAlarm_AlarmCancelled = false
|
||||||
)
|
)
|
||||||
|
|
||||||
type SatelNameGetter interface {
|
type SatelNameGetter interface {
|
||||||
|
@ -50,7 +50,7 @@ func getSatelMessageContent(messages []satel.BasicEventElement, s SatelNameGette
|
||||||
}
|
}
|
||||||
|
|
||||||
func (self SatelMsgContent) GetName() string {
|
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
|
// 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))
|
name, err := self.s.GetName(satel.DeviceType_Partition, byte(self.SatelEvent.Index+1))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue