Index: dialin/common/dg_defs.py =================================================================== diff -u -rd155e227e226d875054c35dd83eb612158c8fd7e -rb031f612a81d0333bf78a7e4675e5d0a0aeb6d1d --- dialin/common/dg_defs.py (.../dg_defs.py) (revision d155e227e226d875054c35dd83eb612158c8fd7e) +++ dialin/common/dg_defs.py (.../dg_defs.py) (revision b031f612a81d0333bf78a7e4675e5d0a0aeb6d1d) @@ -24,7 +24,7 @@ DG_MODE_INIT = 2 # Initialization & POST mode DG_MODE_STAN = 3 # Standby mode - connected to HD DG_MODE_SOLO = 4 # Standby Solo mode - no HD connected - DG_MODE_CIRC = 5 # Re-circulate mode + DG_MODE_GENE = 5 # Generation Idle mode DG_MODE_FILL = 6 # Fill mode DG_MODE_DRAI = 7 # Drain mode DG_MODE_FLUS = 8 # Flush mode Index: dialin/common/msg_ids.py =================================================================== diff -u -rb5ebd4c79b40e896e806e3495c7548466731bcd1 -rb031f612a81d0333bf78a7e4675e5d0a0aeb6d1d --- dialin/common/msg_ids.py (.../msg_ids.py) (revision b5ebd4c79b40e896e806e3495c7548466731bcd1) +++ dialin/common/msg_ids.py (.../msg_ids.py) (revision b031f612a81d0333bf78a7e4675e5d0a0aeb6d1d) @@ -304,6 +304,9 @@ MSG_ID_HD_PRE_TREATMENT_DATA_PUBLISH_INTERVAL_OVERRIDE = 0x8073 MSG_ID_HD_TREATMENT_DATA_PUBLISH_INTERVAL_OVERRIDE = 0x8074 MSG_ID_HD_POST_TREATMENT_DATA_PUBLISH_INTERVAL_OVERRIDE = 0x8075 + MSG_ID_HD_BLOCK_MESSAGE_TRANSMISSION = 0x8076 + MSG_ID_HD_SYRINGE_PUMP_FORCE_SENSOR_DAC_CALIBRATE = 0x8077 + MSG_ID_HD_STOP_RTC_CLOCK = 0x8078 MSG_ID_DG_TESTER_LOGIN_REQUEST = 0XA000 MSG_ID_DG_ALARM_STATE_OVERRIDE = 0XA001 MSG_ID_DG_WATCHDOG_TASK_CHECKIN_OVERRIDE = 0XA002 @@ -369,6 +372,7 @@ MSG_ID_DG_FLUSH_PUBLISH_INTERVAL_OVERRIDE = 0XA041 MSG_ID_FILTER_FLUSH_TIME_PERIOD_OVERRIDE = 0XA042 MSG_ID_DG_FANS_RPM_OVERRIDE = 0xA043 + MSG_ID_DG_STOP_RTC_CLOCK = 0xA045 MSG_ID_HD_DEBUG_EVENT = 0XFFF1 MSG_ID_DG_DEBUG_EVENT = 0XFFF2 MSG_ID_ACK_MESSAGE_THAT_REQUIRES_ACK = 0XFFFF Index: dialin/dg/dialysate_generator.py =================================================================== diff -u -r107697bd31dc87e450f18cca334025c631a6825d -rb031f612a81d0333bf78a7e4675e5d0a0aeb6d1d --- dialin/dg/dialysate_generator.py (.../dialysate_generator.py) (revision 107697bd31dc87e450f18cca334025c631a6825d) +++ dialin/dg/dialysate_generator.py (.../dialysate_generator.py) (revision b031f612a81d0333bf78a7e4675e5d0a0aeb6d1d) @@ -60,7 +60,7 @@ DG_OP_MODE_INIT_POST = 2 DG_OP_MODE_STANDBY = 3 DG_OP_MODE_STANDBY_SOLO = 4 - DG_OP_MODE_RECIRCULATE = 5 + DG_OP_MODE_GEN_IDLE = 5 DG_OP_MODE_FILL = 6 DG_OP_MODE_DRAIN = 7 DG_OP_MODE_FLUSH = 8 Index: dialin/dg/rtc.py =================================================================== diff -u -ra901fe931c08daea69337c1f44135637a764ce7a -rb031f612a81d0333bf78a7e4675e5d0a0aeb6d1d --- dialin/dg/rtc.py (.../rtc.py) (revision a901fe931c08daea69337c1f44135637a764ce7a) +++ dialin/dg/rtc.py (.../rtc.py) (revision b031f612a81d0333bf78a7e4675e5d0a0aeb6d1d) @@ -66,6 +66,36 @@ message['message'][MsgFieldPositions.START_POS_FIELD_1:MsgFieldPositions.END_POS_FIELD_1]))[0] self.rtc_epoch = epoch + def cmd_stop_rtc(self): + """ + Stops the DG RTC clock + + @return: None + """ + stop = 1 + payload = integer_to_bytearray(stop) + + message = DenaliMessage.build_message(channel_id=DenaliChannels.dialin_to_dg_ch_id, + message_id=MsgIds.MSG_ID_DG_STOP_RTC_CLOCK.value, + payload=payload) + + self.logger.debug("Stopping the DG RTC") + + # Send message + received_message = self.can_interface.send(message) + + # If there is content... + if received_message is not None: + + self.logger.debug(received_message) + self.logger.debug("RTC stop command was sent" + + str(received_message['message'][DenaliMessage.PAYLOAD_START_INDEX])) + # response payload is OK or not OK + return received_message['message'][DenaliMessage.PAYLOAD_START_INDEX] + else: + self.logger.debug("Timeout!!!!") + return False + def cmd_set_rtc_time_and_date(self, second: int, minute: int, hour: int, day: int, month: int, year: int) -> int: """ Sets the RTC time and date from the provided Index: dialin/hd/rtc.py =================================================================== diff -u -ra901fe931c08daea69337c1f44135637a764ce7a -rb031f612a81d0333bf78a7e4675e5d0a0aeb6d1d --- dialin/hd/rtc.py (.../rtc.py) (revision a901fe931c08daea69337c1f44135637a764ce7a) +++ dialin/hd/rtc.py (.../rtc.py) (revision b031f612a81d0333bf78a7e4675e5d0a0aeb6d1d) @@ -70,6 +70,36 @@ message['message'][MsgFieldPositions.START_POS_FIELD_1:MsgFieldPositions.END_POS_FIELD_1]))[0] self.rtc_epoch = epoch + def cmd_stop_rtc(self): + """ + Stops the HD RTC clock + + @return: None + """ + stop = 1 + payload = integer_to_bytearray(stop) + + message = DenaliMessage.build_message(channel_id=DenaliChannels.dialin_to_hd_ch_id, + message_id=MsgIds.MSG_ID_HD_STOP_RTC_CLOCK.value, + payload=payload) + + self.logger.debug("Stopping the HD RTC") + + # Send message + received_message = self.can_interface.send(message) + + # If there is content... + if received_message is not None: + + self.logger.debug(received_message) + self.logger.debug("RTC stop command was sent" + + str(received_message['message'][DenaliMessage.PAYLOAD_START_INDEX])) + # response payload is OK or not OK + return received_message['message'][DenaliMessage.PAYLOAD_START_INDEX] + else: + self.logger.debug("Timeout!!!!") + return False + def cmd_set_rtc_time_and_date(self, second: int, minute: int, hour: int, day: int, month: int, year: int) -> int: """ Sets the RTC time and date from the provided