Index: leahi_dialin/dd/modules/drybicart.py =================================================================== diff -u -r78b7d4b47c77f390fdb0c796e4861cc9abb343fd -r4fc29aead7deff5ba3ddb4c9e1290fc0d5b2b6e8 --- leahi_dialin/dd/modules/drybicart.py (.../drybicart.py) (revision 78b7d4b47c77f390fdb0c796e4861cc9abb343fd) +++ leahi_dialin/dd/modules/drybicart.py (.../drybicart.py) (revision 4fc29aead7deff5ba3ddb4c9e1290fc0d5b2b6e8) @@ -54,7 +54,7 @@ self.dd_dry_bicart_timestamp = 0.0 #: The timestamp of the last message self.dd_dry_bicart_fill_execution_state = 0 #: The Dry Bicart fill execution state self.dd_bicarb_chamber_fill_execution_state = 0 #: The Bicarb chamber fill execution state - self.dd_dry_bicart_drain_execution_state = 0.0 #: The Dry Bicart drain execution state + self.dd_dry_bicart_drain_execution_state = 0 #: The Dry Bicart drain execution state self.dd_dry_bicart_fill_cycle_counter = 0 #: The Dry Bicart fill cycle counter self.dd_dry_bicart_max_fill_cycle_count = 0 #: The Dry Bicart max fill cycle state self.dd_dry_bicart_fill_request = 0 #: Is fill requested for Dry Bicart or not @@ -83,7 +83,7 @@ msg_list = [] msg_list.append(('self.dd_dry_bicart_fill_execution_state', DataTypes.U32)) msg_list.append(('self.dd_bicarb_chamber_fill_execution_state', DataTypes.U32)) - msg_list.append(('self.dd_dry_bicart_drain_execution_state', DataTypes.F32)) + msg_list.append(('self.dd_dry_bicart_drain_execution_state', DataTypes.U32)) msg_list.append(('self.dd_dry_bicart_fill_cycle_counter', DataTypes.U32)) msg_list.append(('self.dd_dry_bicart_max_fill_cycle_count', DataTypes.U32)) msg_list.append(('self.dd_dry_bicart_fill_request', DataTypes.U32)) @@ -240,3 +240,26 @@ override_text=str(small_large), logger=self.logger, can_interface=self.can_interface) + + def cmd_dry_bicart_depressurise_override(self, depressurise: int, reset: int = NO_RESET) -> int: + """ + Constructs and sends the dry bicart depressurise override command + Constraints: + Must be logged into DD. + + @param depressurise: int - value for depressurise ( depressurise = 1 + @return: 1 if successful, zero otherwise + """ + depressurise = integer_to_bytearray(depressurise) + reset_byte_array = integer_to_bytearray(reset) + payload = reset_byte_array + depressurise + + return cmd_generic_override( + payload=payload, + reset=reset, + channel_id=CanChannels.dialin_to_dd_ch_id, + msg_id=MsgIds.MSG_ID_DD_BICART_DEPRESSURISE_REQUEST_OVERRIDE_REQUEST, + entity_name='Bicart Depressurise', + override_text=str(depressurise), + logger=self.logger, + can_interface=self.can_interface)