Index: dialin/dg/events.py =================================================================== diff -u -r64a2533574c2d78aa143d2981a36eff04a0abf19 -r00355394c6248f1d228e97bf140aa651bf991175 --- dialin/dg/events.py (.../events.py) (revision 64a2533574c2d78aa143d2981a36eff04a0abf19) +++ dialin/dg/events.py (.../events.py) (revision 00355394c6248f1d228e97bf140aa651bf991175) @@ -174,9 +174,9 @@ event_data_2 = DGOpModes(event_data_2).name # Check if the event state name is sub mode change. elif event_state_name == DGEventList.DG_EVENT_SUB_MODE_CHANGE.name: - # Get the length of the list of the sub mode list + # Get the length of the list of the op mode list op_list_len = len(self._dg_event_dictionary[DGEventList.DG_EVENT_OP_MODE_CHANGE.name]) - # Get the last tuple of the sub mode + # Get the last tuple of the op mode # It is a list of tuples that each tuple is (timestamp, event type, prev op mode, current op mode) last_op_tuple = self._dg_event_dictionary[DGEventList.DG_EVENT_OP_MODE_CHANGE.name][op_list_len - 1] Index: dialin/hd/alarms.py =================================================================== diff -u -rf9af29dcdcd16cc88e7024f189397475de61a8c2 -r00355394c6248f1d228e97bf140aa651bf991175 --- dialin/hd/alarms.py (.../alarms.py) (revision f9af29dcdcd16cc88e7024f189397475de61a8c2) +++ dialin/hd/alarms.py (.../alarms.py) (revision 00355394c6248f1d228e97bf140aa651bf991175) @@ -56,9 +56,6 @@ START_POS_ALARMS_FLAGS = END_POS_ALARM_SILENCE_EXPIRES_IN END_POS_ALARMS_FLAGS = START_POS_ALARMS_FLAGS + 2 - START_POS_ALARM_ID = DenaliMessage.PAYLOAD_START_INDEX - END_POS_ALARM_ID = START_POS_ALARM_ID + 2 - def __init__(self, can_interface, logger: Logger): """ @param can_interface: Denali Can Messenger object @@ -103,8 +100,8 @@ self.alarm_priorities = [0] * 500 # alarm ranks based on received HD alarm activation messages self.alarm_ranks = [0] * 500 - # alarm clear top only properties based on received HD alarm activation messages - self.alarm_clr_top_only = [False] * 500 + # alarm clear top only flags based on received HD alarm activation messages + self.alarm_clear_top_only_flags = [False] * 500 # alarm information self.alarm_volume = 0 @@ -119,7 +116,7 @@ @return: (int) the current alarms state. """ - return self.alarms_state + return self.alarms_priority_state def get_alarm_states(self): """ @@ -147,7 +144,11 @@ def get_alarm_priority(self, alarm_id): """ - Gets alarm priority for given alarm + Gets alarm priority for given alarm. + 0=None + 1=Low + 2=Medium + 3=High @return: Alarm priority """ @@ -167,7 +168,7 @@ @return: Clear top only property (T/F) """ - return self.alarm_clr_top_only[alarm_id] + return self.alarm_clear_top_only_flags[alarm_id] def get_alarms_top(self): """ @@ -433,7 +434,7 @@ self.alarm_conditions[alarm_id[0]] = True self.alarm_priorities[alarm_id[0]] = alarm_priority[0] self.alarm_ranks[alarm_id[0]] = alarm_rank[0] - self.alarm_clr_top_only[alarm_id[0]] = True if alarm_cto[0] == 1 else False + self.alarm_clear_top_only_flags[alarm_id[0]] = True if alarm_cto[0] == 1 else False @publish(["alarm_states", "alarm_conditions"]) def _handler_alarm_clear(self, message): @@ -443,7 +444,7 @@ @param message: published HD alarm clear message @return: none """ - alarm_id = struct.unpack('