Index: dialin/protocols/CAN.py =================================================================== diff -u -r7635412902a86cfda24e86fd2ac1f4a36390ece8 -r786d24b238743698b7dff28a64099985870fb41b --- dialin/protocols/CAN.py (.../CAN.py) (revision 7635412902a86cfda24e86fd2ac1f4a36390ece8) +++ dialin/protocols/CAN.py (.../CAN.py) (revision 786d24b238743698b7dff28a64099985870fb41b) @@ -617,12 +617,12 @@ if message_valid: if self.console_out: - print(complete_dialin_message) + self.do_console_out(complete_dialin_message) # Send an ack if required if DenaliMessage.get_sequence_number(complete_dialin_message) < 0: # ACK required. Send back the received message with the sequence sign bit flipped msg = DenaliMessage.create_ack_message(message=complete_dialin_message, - passive_mode=self.passive_mode) + passive_mode=False) if msg is not None: self.send(msg, 0, is_ack=True) @@ -772,3 +772,28 @@ else: with open(filename, 'a') as f: f.write("{0}\n".format(packet)) + + def do_console_out(self, complete_dialin_message: any) -> None: + """ + prints out the message in hex format similar to the candump + @param complete_dialin_message: the compele can bus message + @return: None + """ + print( + " " # can id + f"{(complete_dialin_message['channel_id']):0{3}X}" + " " # head tag + f"{(complete_dialin_message['message'][0]):0{2}X}" + " " # 2 bytes : seq + f"{(complete_dialin_message['message'][1]):0{2}X}" + f"{(complete_dialin_message['message'][2]):0{2}X}" + " " # 2 bytes : msg id + f"{(complete_dialin_message['message'][3]):0{2}X}" + f"{(complete_dialin_message['message'][4]):0{2}X}" + " " # 1 byte : len + f"{(complete_dialin_message['message'][5]):0{2}X}" + # TODO : add the payload here + # the complete message bytes listp + # , complete_dialin_message['message'] + ) + Index: dialin/ui/dg_simulator.py =================================================================== diff -u -r717213478a1176cd315e5f4006ce8aeacbc4c0dc -r786d24b238743698b7dff28a64099985870fb41b --- dialin/ui/dg_simulator.py (.../dg_simulator.py) (revision 717213478a1176cd315e5f4006ce8aeacbc4c0dc) +++ dialin/ui/dg_simulator.py (.../dg_simulator.py) (revision 786d24b238743698b7dff28a64099985870fb41b) @@ -28,8 +28,11 @@ def __init__(self, can_interface: str = "can0", log_level: str = None, console_out: bool = False, - passive_mode: bool = False): + passive_mode: bool = False, + auto_response: bool = False): + super().__init__() + DGSimulator.instance_count = DGSimulator.instance_count + 1 self._log_manager = LogManager(log_level=log_level, log_filepath=self.__class__.__name__ + ".log") self.logger = self._log_manager.logger @@ -42,47 +45,18 @@ self.can_interface.start() if self.can_interface is not None: - channel_id = DenaliChannels.ui_to_hd_ch_id - self.can_interface.register_receiving_publication_function(channel_id, - MsgIds.MSG_ID_UI_DG_SET_RTC_REQUEST.value, - self._handler_set_rtc_request) - self.can_interface.register_receiving_publication_function(DenaliChannels.ui_sync_broadcast_ch_id, - MsgIds.MSG_ID_REQUEST_FW_VERSIONS.value, - self._handler_request_dg_version) - self.can_interface.register_receiving_publication_function(DenaliChannels.ui_sync_broadcast_ch_id, - MsgIds.MSG_ID_UI_REQUEST_SERVICE_INFO.value, - self._handler_system_usage_response) + channel_id = DenaliChannels.ui_to_dg_ch_id + if auto_response: + self.can_interface.register_receiving_publication_function(channel_id, + MsgIds.MSG_ID_UI_DG_SET_RTC_REQUEST.value, + self._handler_set_rtc_request) + self.can_interface.register_receiving_publication_function(DenaliChannels.ui_sync_broadcast_ch_id, + MsgIds.MSG_ID_REQUEST_FW_VERSIONS.value, + self._handler_request_dg_version) + self.can_interface.register_receiving_publication_function(DenaliChannels.ui_sync_broadcast_ch_id, + MsgIds.MSG_ID_UI_REQUEST_SERVICE_INFO.value, + self._handler_system_usage_response) - def cmd_send_dg_post_single_result(self, result: int, test_num: int) -> None: - """ - Reports a single result for power on self test - @param result: success or fail, where success = 1, 0 = fail - @param test_num: the test index [0-n] - @return: None - """ - payload = integer_to_bytearray(result) - payload += integer_to_bytearray(test_num) - - message = DenaliMessage.build_message(channel_id=DenaliChannels.dg_sync_broadcast_ch_id, - message_id=MsgIds.MSG_ID_DG_POST_SINGLE_TEST_RESULT.value, - payload=payload) - - self.can_interface.send(message, 0) - - def cmd_send_dg_post_final_result(self, result: int) -> None: - """ - Reports a final result for power on self test - @param result: success or fail, where success = 1, 0 = fail - @return: None - """ - payload = integer_to_bytearray(result) - - message = DenaliMessage.build_message(channel_id=DenaliChannels.dg_sync_broadcast_ch_id, - message_id=MsgIds.MSG_ID_DG_POST_FINAL_TEST_RESULT.value, - payload=payload) - - self.can_interface.send(message, 0) - def _handler_system_usage_response(self) -> None: """ Handles a request for system usage @@ -496,12 +470,27 @@ payload += byte_to_bytearray(fpga_minor) payload += byte_to_bytearray(fpga_lab) - message = DenaliMessage.build_message(channel_id=DenaliChannels.dg_to_ui_ch_id, + message = DenaliMessage.build_message(channel_id=DenaliChannels.dg_sync_broadcast_ch_id, message_id=MsgIds.MSG_ID_DG_VERSION.value, payload=payload) self.can_interface.send(message, 0) + def cmd_send_serial_dg_data(self, serial: str): + """ + the dg version serial response message method + @param serial: serial number + @return: None + """ + + payload = bytes(serial, 'ascii') + b'\x00' + + message = DenaliMessage.build_message(channel_id=DenaliChannels.dg_to_ui_ch_id, + message_id=MsgIds.MSG_ID_DG_SERIAL_NUMBER.value, + payload=payload) + + self.can_interface.send(message, 0) + @staticmethod def build_dg_debug_text(text: str) -> list: """ @@ -514,7 +503,7 @@ msg = messageBuilder.buildMessage(GuiActionType.DGDebugText, 1 * (message_length + 1), False, txt) return messageBuilder.toFrames(msg) - def cmd_send_pre_treatment_filter_flush_progress_data(self, total, countdown) -> None: + def cmd_send_dg_pre_treatment_filter_flush_progress_data(self, total, countdown) -> None: """ send the pretreatment filter flush progress data @param total: (U32) Total time in second @@ -530,25 +519,6 @@ self.can_interface.send(message, 0) - def cmd_send_dg_disinfection_state(self, sub_mode: int, flush_mode: int, heat_mode: int, chemical_mode: int) -> None: - """ - Broadcasts the current DG disinfection mode - @param sub_mode: disinfect states - @param flush_mode: flush states - @param heat_mode: heat states - @param chemical_mode: chemical states - @return: - """ - payload = integer_to_bytearray(sub_mode) - payload += integer_to_bytearray(flush_mode) - payload += integer_to_bytearray(heat_mode) - payload += integer_to_bytearray(chemical_mode) - - message = DenaliMessage.build_message(channel_id=DenaliChannels.dg_sync_broadcast_ch_id, - message_id=MsgIds.MSG_ID_HD_DISINFECT_STANDBY_DATA.value, - payload=payload) - self.can_interface.send(message, 0) - def cmd_send_dg_disinfect_progress_time_flush(self, total: int, countdown: int) -> None: """ the broadcast progress water flush time @@ -581,6 +551,27 @@ self.can_interface.send(message, 0) + def cmd_send_dg_post(self, item: int, passed: bool, done: bool = False) -> None: + """ + send hd post message the single(item) or the final(done) + @param item: the post state/item index + @param passed: the post result single or final + @param done: if this is the final post message this should be true + @return: None + """ + payload = integer_to_bytearray(passed) + if not done: + payload += integer_to_bytearray(item) + + message = DenaliMessage.build_message(channel_id=DenaliChannels.dg_sync_broadcast_ch_id, + message_id=MsgIds.MSG_ID_DG_POST_FINAL_TEST_RESULT.value if done + else MsgIds.MSG_ID_DG_POST_SINGLE_TEST_RESULT.value, + payload=payload) + + self.can_interface.send(message, 0) + + # ------------------------------------------------ GENERAL MESSAGES ------------------------------------------------ + def cmd_send_dg_disinfect_progress_time_checmical(self, total: int, countdown: int) -> None: """ the broadcast progress chemical disinfect time @@ -597,7 +588,7 @@ self.can_interface.send(message, 0) - def cmd_send_general_dg_response(self, message_id: int, accepted: int, reason: int, + def cmd_send_dg_general_response(self, message_id: int, accepted: int, reason: int, is_pure_data: bool = False, has_parameters: bool = False, parameters_payload: any = 0x00) -> None: @@ -626,7 +617,7 @@ self.can_interface.send(message, 0) - def cmd_send_general_dg_progress_data(self, message_id: int, total: int, countdown: int) -> None: + def cmd_send_sg_general_progress_data(self, message_id: int, total: int, countdown: int) -> None: """ a general method t send any standard progress data message, by it's id @param message_id: the id of the message @@ -643,7 +634,7 @@ self.can_interface.send(message, 0) - def cmd_ack_send_dg(self, seq: int) -> None: + def cmd_send_dg_ack(self, seq: int) -> None: """ sending dg ack message by the sequence seq @param seq: the message sequence number Index: dialin/ui/hd_simulator.py =================================================================== diff -u -r717213478a1176cd315e5f4006ce8aeacbc4c0dc -r786d24b238743698b7dff28a64099985870fb41b --- dialin/ui/hd_simulator.py (.../hd_simulator.py) (revision 717213478a1176cd315e5f4006ce8aeacbc4c0dc) +++ dialin/ui/hd_simulator.py (.../hd_simulator.py) (revision 786d24b238743698b7dff28a64099985870fb41b) @@ -17,7 +17,6 @@ from time import sleep from . import messageBuilder -from .hd_simulator_alarms import HDAlarmsSimulator from ..common import * from ..protocols.CAN import (DenaliMessage, DenaliCanMessenger, @@ -28,7 +27,7 @@ class HDSimulator(AbstractSubSystem): NUM_TREATMENT_PARAMETERS = 18 - instanceCount = 0 + instance_count = 0 # UI version message field positions START_POS_MAJOR = DenaliMessage.PAYLOAD_START_INDEX @@ -45,7 +44,8 @@ def __init__(self, can_interface: str = "can0", log_level: bool = None, console_out: bool = False, - passive_mode: bool = False): + passive_mode: bool = False, + auto_response: bool = False): """ The HDSimulator constructor @@ -54,7 +54,7 @@ @param console_out: (bool) If True, write each dialin message to the console. """ super().__init__() - HDSimulator.instanceCount = HDSimulator.instanceCount + 1 + HDSimulator.instance_count = HDSimulator.instance_count + 1 self._log_manager = LogManager(log_level=log_level, log_filepath=self.__class__.__name__ + ".log") self.logger = self._log_manager.logger @@ -68,39 +68,38 @@ if self.can_interface is not None: channel_id = DenaliChannels.ui_to_hd_ch_id - self.can_interface.register_receiving_publication_function(channel_id, - MsgIds.MSG_ID_UI_INITIATE_TREATMENT_REQUEST.value, - self._handler_ui_initiate_treatment) - self.can_interface.register_receiving_publication_function(channel_id, - MsgIds.MSG_ID_UI_SET_UF_VOLUME_PARAMETER.value, - self._handler_ui_pre_treatment_uf_request) - self.can_interface.register_receiving_publication_function(channel_id, - MsgIds.MSG_ID_UI_NEW_TREATMENT_PARAMS.value, - self._handler_ui_validate_parameters) - self.can_interface.register_receiving_publication_function(channel_id, - MsgIds.MSG_ID_UI_USER_CONFIRM_TREATMENT_PARAMS.value, - self._handler_ui_confirm_treatment) - self.can_interface.register_receiving_publication_function(channel_id, - MsgIds.MSG_ID_UI_TX_END_CMD.value, - self._handler_ui_end_treatment) - self.can_interface.register_receiving_publication_function(channel_id, - MsgIds.MSG_ID_UI_HD_SET_RTC_REQUEST.value, - self._handler_set_rtc_request) - self.can_interface.register_receiving_publication_function(DenaliChannels.ui_sync_broadcast_ch_id, - MsgIds.MSG_ID_REQUEST_FW_VERSIONS.value, - self._handler_request_hd_version) - self.can_interface.register_receiving_publication_function(DenaliChannels.ui_sync_broadcast_ch_id, - MsgIds.MSG_ID_UI_REQUEST_SERVICE_INFO.value, - self._handler_system_usage_response) - self.can_interface.register_receiving_publication_function(DenaliChannels.ui_to_hd_ch_id, - MsgIds.MSG_ID_HD_UI_VERSION_INFO_RESPONSE.value, - self._handler_ui_post_ui_version_compatibility) - self.can_interface.register_receiving_publication_function(DenaliChannels.ui_to_hd_ch_id, - MsgIds.MSG_ID_HD_UI_VERSION_INFO_RESPONSE.value, - self._handler_ui_version) + if auto_response: + self.can_interface.register_receiving_publication_function(channel_id, + MsgIds.MSG_ID_UI_INITIATE_TREATMENT_REQUEST.value, + self._handler_ui_initiate_treatment) + self.can_interface.register_receiving_publication_function(channel_id, + MsgIds.MSG_ID_UI_SET_UF_VOLUME_PARAMETER.value, + self._handler_ui_pre_treatment_uf_request) + self.can_interface.register_receiving_publication_function(channel_id, + MsgIds.MSG_ID_UI_NEW_TREATMENT_PARAMS.value, + self._handler_ui_validate_parameters) + self.can_interface.register_receiving_publication_function(channel_id, + MsgIds.MSG_ID_UI_USER_CONFIRM_TREATMENT_PARAMS.value, + self._handler_ui_confirm_treatment) + self.can_interface.register_receiving_publication_function(channel_id, + MsgIds.MSG_ID_UI_TX_END_CMD.value, + self._handler_ui_end_treatment) + self.can_interface.register_receiving_publication_function(channel_id, + MsgIds.MSG_ID_UI_HD_SET_RTC_REQUEST.value, + self._handler_set_rtc_request) + self.can_interface.register_receiving_publication_function(DenaliChannels.ui_sync_broadcast_ch_id, + MsgIds.MSG_ID_REQUEST_FW_VERSIONS.value, + self._handler_request_hd_version) + self.can_interface.register_receiving_publication_function(DenaliChannels.ui_sync_broadcast_ch_id, + MsgIds.MSG_ID_UI_REQUEST_SERVICE_INFO.value, + self._handler_system_usage_response) + self.can_interface.register_receiving_publication_function(DenaliChannels.ui_to_hd_ch_id, + MsgIds.MSG_ID_HD_UI_VERSION_INFO_RESPONSE.value, + self._handler_ui_post_ui_version_compatibility) + self.can_interface.register_receiving_publication_function(DenaliChannels.ui_to_hd_ch_id, + MsgIds.MSG_ID_HD_UI_VERSION_INFO_RESPONSE.value, + self._handler_ui_version) - self.alarms_simulator = HDAlarmsSimulator(self.can_interface, self.logger) - self.treatment_parameter_rejections = TreatmentParameterRejections() # initialize variables that will be populated by UI version response @@ -114,36 +113,6 @@ """ return self.ui_version - def cmd_send_hd_post_single_result(self, result: int, test_num: int) -> None: - """ - Reports a single result for power on self test - @param result: success or fail, where success = 1, 0 = fail - @param test_num: the test index [0-n] - @return: None - """ - payload = integer_to_bytearray(result) - payload += integer_to_bytearray(test_num) - - message = DenaliMessage.build_message(channel_id=DenaliChannels.hd_sync_broadcast_ch_id, - message_id=MsgIds.MSG_ID_HD_POST_SINGLE_TEST_RESULT.value, - payload=payload) - - self.can_interface.send(message, 0) - - def cmd_send_hd_post_final_result(self, result: int) -> None: - """ - Reports a final result for power on self test - @param result: success or fail, where success = 1, 0 = fail - @return: None - """ - payload = integer_to_bytearray(result) - - message = DenaliMessage.build_message(channel_id=DenaliChannels.hd_sync_broadcast_ch_id, - message_id=MsgIds.MSG_ID_HD_POST_FINAL_TEST_RESULT.value, - payload=payload) - - self.can_interface.send(message, 0) - def _handler_system_usage_response(self) -> None: """ Handles a request for system usage @@ -1495,19 +1464,27 @@ payload += byte_to_bytearray(fpga_minor) payload += byte_to_bytearray(fpga_lab) - message = DenaliMessage.build_message(channel_id=DenaliChannels.hd_to_ui_ch_id, + message = DenaliMessage.build_message(channel_id=DenaliChannels.hd_sync_broadcast_ch_id, message_id=MsgIds.MSG_ID_HD_VERSION.value, payload=payload) self.can_interface.send(message, 0) - def alarm(self) -> HDAlarmsSimulator: + def cmd_send_serial_hd_data(self, serial: str): """ - Gets the alarm simulator object - @return: (HDAlarmsSimulator) the alarms simulator + the hd version serial response message method + @param serial: serial number + @return: None """ - return self.alarms_simulator + payload = bytes(serial, 'ascii') + b'\x00' + + message = DenaliMessage.build_message(channel_id=DenaliChannels.hd_to_ui_ch_id, + message_id=MsgIds.MSG_ID_HD_SERIAL_NUMBER.value, + payload=payload) + + self.can_interface.send(message, 0) + def cmd_send_pre_treatment_state_data(self, sub_mode: int, water_sample_state: int, @@ -1689,7 +1666,8 @@ sodium_concentration: int, dialysate_temperature: float, dialyzer_type: int, - treatment_date_time: int, + treatment_start_date_time: int, + treatment_end_date_time: int, average_blood_flow: float, average_dialysate_flow: float, dialysate_volume_used: float, @@ -1699,15 +1677,12 @@ target_uf_rate: float, actual_uf_rate: float, saline_bolus_volume: int, - heparin_type: int, - heparin_concentration: int, heparin_bolus_volume: float, heparin_dispense_rate: float, heparin_pre_stop: int, heparin_delivered_volume: float, average_arterial_pressure: float, average_venous_pressure: float, - end_treatment_early_alarm: int, device_id: int, water_sample_test_result: int ) -> None: @@ -1727,7 +1702,8 @@ @param sodium_concentration: sodium concentration @param dialysate_temperature: dialysate temperature @param dialyzer_type: dialyzer type - @param treatment_date_time: treatment date time + @param treatment_start_date_time: treatment start date time + @param treatment_end_date_time: treatment end date time @param average_blood_flow: average blood flow @param average_dialysate_flow: average dialysate flow @param dialysate_volume_used: dialysate volume used @@ -1737,18 +1713,15 @@ @param target_uf_rate: target uf rate @param actual_uf_rate: actual uf rate @param saline_bolus_volume: saline bolus volume - @param heparin_type: heparin type - @param heparin_concentration: heparin concentration @param heparin_bolus_volume: heparin bolus volume @param heparin_dispense_rate: heparin dispense rate @param heparin_pre_stop: heparin pre stop @param heparin_delivered_volume: heparin delivered volume @param average_arterial_pressure: average arterial pressure @param average_venous_pressure: average venous pressure - @param end_treatment_early_alarm: end treatment early alarm @param device_id: device id @param water_sample_test_result: water sample test result - @return: + @return: None """ payload = integer_to_bytearray(accepted) @@ -1765,7 +1738,8 @@ payload += unsigned_to_bytearray(int(sodium_concentration)) payload += float_to_bytearray(float(dialysate_temperature)) payload += unsigned_to_bytearray(int(dialyzer_type)) - payload += unsigned_to_bytearray(int(treatment_date_time)) + payload += unsigned_to_bytearray(int(treatment_start_date_time)) + payload += unsigned_to_bytearray(int(treatment_end_date_time)) payload += float_to_bytearray(float(average_blood_flow)) payload += float_to_bytearray(float(average_dialysate_flow)) payload += float_to_bytearray(float(dialysate_volume_used)) @@ -1775,15 +1749,12 @@ payload += float_to_bytearray(float(target_uf_rate)) payload += float_to_bytearray(float(actual_uf_rate)) payload += unsigned_to_bytearray(int(saline_bolus_volume)) - payload += unsigned_to_bytearray(int(heparin_type)) - payload += unsigned_to_bytearray(int(heparin_concentration)) payload += float_to_bytearray(float(heparin_bolus_volume)) payload += float_to_bytearray(float(heparin_dispense_rate)) payload += unsigned_to_bytearray(int(heparin_pre_stop)) payload += float_to_bytearray(float(heparin_delivered_volume)) payload += float_to_bytearray(float(average_arterial_pressure)) payload += float_to_bytearray(float(average_venous_pressure)) - payload += unsigned_to_bytearray(int(end_treatment_early_alarm)) payload += unsigned_to_bytearray(int(device_id)) payload += unsigned_to_bytearray(int(water_sample_test_result)) @@ -1852,6 +1823,25 @@ self.can_interface.send(message, 0) + def cmd_send_hd_disinfection_state(self, sub_mode: int, flush_mode: int, heat_mode: int, chemical_mode: int) -> None: + """ + Broadcasts the current DG disinfection mode + @param sub_mode: (int) disinfect states + @param flush_mode: (int) flush states + @param heat_mode: (int) heat states + @param chemical_mode: (int) chemical states + @return: None + """ + payload = integer_to_bytearray(sub_mode) + payload += integer_to_bytearray(flush_mode) + payload += integer_to_bytearray(heat_mode) + payload += integer_to_bytearray(chemical_mode) + + message = DenaliMessage.build_message(channel_id=DenaliChannels.hd_sync_broadcast_ch_id, + message_id=MsgIds.MSG_ID_HD_DISINFECT_STANDBY_DATA.value, + payload=payload) + self.can_interface.send(message, 0) + def cmd_send_hd_disinfect_response(self, accepted: bool, reason: int) -> None: """ the HD response to the request from UI to initiate a disinfection/flush @@ -1908,19 +1898,37 @@ def cmd_send_hd_request_ui_version(self) -> None: """ - the HD response to the UI sending the user chimical disinfection steps confirm. + send HD request for UI version @return: None """ message = DenaliMessage.build_message(channel_id=DenaliChannels.hd_to_ui_ch_id, message_id=MsgIds.MSG_ID_HD_UI_VERSION_INFO_REQUEST.value, payload=None) + self.can_interface.send(message, 0) + def cmd_send_hd_post(self, item: int, passed: bool, done: bool = False) -> None: + """ + send HD post message the single(item) or the final(done) + @param item: the post state/item index + @param passed: the post result single or final + @param done: if this is the final post message this should be true + @return: None + """ + payload = integer_to_bytearray(passed) + if not done: + payload += integer_to_bytearray(item) + + message = DenaliMessage.build_message(channel_id=DenaliChannels.hd_sync_broadcast_ch_id, + message_id=MsgIds.MSG_ID_HD_POST_FINAL_TEST_RESULT.value if done + else MsgIds.MSG_ID_HD_POST_SINGLE_TEST_RESULT.value, + payload=payload) + self.can_interface.send(message, 0) # ------------------------------------------------ GENERAL MESSAGES ------------------------------------------------ - def cmd_send_general_hd_response(self, message_id: int, accepted: int, reason: int, + def cmd_send_hd_general_response(self, message_id: int, accepted: int, reason: int, is_pure_data: bool = False, has_parameters: bool = False, parameters_payload: any = 0x00) -> None: @@ -1949,7 +1957,7 @@ self.can_interface.send(message, 0) - def cmd_send_general_hd_progress_data(self, message_id: int, total: int, countdown: int) -> None: + def cmd_send_hd_general_progress_data(self, message_id: int, total: int, countdown: int) -> None: """ a general method t send any standard progress data message, by it's id @param message_id: the id of the message @@ -1965,7 +1973,7 @@ payload=payload) self.can_interface.send(message, 0) - def cmd_ack_send_hd(self, seq: int) -> None: + def cmd_send_hd_ack(self, seq: int) -> None: """ sending hd ack message by the sequence seq @param seq: the message sequence number Index: dialin/ui/hd_simulator_alarms.py =================================================================== diff -u -rf990c9bb863683c74bbe78c71932a14d7cf35422 -r786d24b238743698b7dff28a64099985870fb41b --- dialin/ui/hd_simulator_alarms.py (.../hd_simulator_alarms.py) (revision f990c9bb863683c74bbe78c71932a14d7cf35422) +++ dialin/ui/hd_simulator_alarms.py (.../hd_simulator_alarms.py) (revision 786d24b238743698b7dff28a64099985870fb41b) @@ -103,14 +103,14 @@ class HDAlarmsSimulator(AbstractSubSystem): - instanceCount = 0 + instance_count = 0 def __init__(self, can_interface: DenaliCanMessenger, logger: Logger): """ @param can_interface: Denali Can Messenger object """ super().__init__() - HDAlarmsSimulator.instanceCount = HDAlarmsSimulator.instanceCount + 1 + HDAlarmsSimulator.instance_count = HDAlarmsSimulator.instance_count + 1 self.can_interface = can_interface self.logger = logger