Index: leahi_dialin/ui/dd_messaging.py =================================================================== diff -u -r37c01c44ce0a00a15331510b72c0a483eee37776 -r7412ecaf908e316c199518fe7f97256dc46b133b --- leahi_dialin/ui/dd_messaging.py (.../dd_messaging.py) (revision 37c01c44ce0a00a15331510b72c0a483eee37776) +++ leahi_dialin/ui/dd_messaging.py (.../dd_messaging.py) (revision 7412ecaf908e316c199518fe7f97256dc46b133b) @@ -758,8 +758,6 @@ payload += conversions.float_to_bytearray (gain ) payload += conversions.float_to_bytearray (offset ) payload += conversions.integer_to_bytearray(calibrationTime ) - print("dd_get_calibration_pressure_sensor_record") - print(msg_ids.MsgIds.MSG_ID_DD_UI_NVM_GET_PRESSURE_SENSOR_CAL_RECORD_RESPONSE.value) message = CAN.CanMessage.build_message( channel_id=CAN.CanChannels.dd_sync_broadcast_ch_id, @@ -801,4 +799,200 @@ message_id=msg_ids.MsgIds.MSG_ID_DD_UI_NVM_SET_PRESSURE_SENSOR_CAL_RECORD_RESPONSE.value, payload=payload) + self.can_interface.send(message, 0) + + + def dd_get_calibration_temperature_sensor_record(self, + accept : int , + rejectionReason : int , + index : int , + gain : float , + offset : float , + calibrationTime : int ): + + """ + Broadcasts DD calibration_pressure_sensor_record + Args: + @param accept (int ): accept + @param rejectionReason (int ): Rejection Reason + @param index (int ):index + @param gain (float): calibration gain + @param offset (float): calibration offset + @param calibrationTime (int ): calibration time epoch + + @return: None + """ + payload = conversions.integer_to_bytearray(accept ) + payload += conversions.integer_to_bytearray(rejectionReason ) + payload += conversions.integer_to_bytearray(index ) + payload += conversions.float_to_bytearray (gain ) + payload += conversions.float_to_bytearray (offset ) + payload += conversions.integer_to_bytearray(calibrationTime ) + + message = CAN.CanMessage.build_message( + channel_id=CAN.CanChannels.dd_sync_broadcast_ch_id, + message_id=msg_ids.MsgIds.MSG_ID_DD_UI_NVM_GET_TEMPERATURE_SENSOR_CAL_RECORD_RESPONSE.value, + payload=payload) + + self.can_interface.send(message, 0) + + + def dd_set_calibration_temperature_sensor_record(self, + accept : int , + rejectionReason : int , + index : int , + gainRejection : float , + offsetRejection : float , + calibrationTimeRejection : int ): + + """ + Broadcasts DD calibration_pressure_sensor_record + Args: + @param accept (int ): accept + @param rejectionReason (int ): Rejection Reason + @param index (int ):index + @param gain (float): calibration gain + @param offset (float): calibration offset + @param calibrationTime (int ): calibration time epoch + + @return: None + """ + payload = conversions.integer_to_bytearray(accept ) + payload += conversions.integer_to_bytearray(rejectionReason ) + payload += conversions.integer_to_bytearray(index ) + payload += conversions.integer_to_bytearray(gainRejection ) + payload += conversions.integer_to_bytearray(offsetRejection ) + payload += conversions.integer_to_bytearray(calibrationTimeRejection ) + + message = CAN.CanMessage.build_message( + channel_id=CAN.CanChannels.dd_sync_broadcast_ch_id, + message_id=msg_ids.MsgIds.MSG_ID_DD_UI_NVM_SET_TEMPERATURE_SENSOR_CAL_RECORD_RESPONSE.value, + payload=payload) + + self.can_interface.send(message, 0) + + + def dd_get_calibration_ConcPump_sensor_record(self, + accept : int , + rejectionReason : int , + index : int , + gain : float , + offset : float , + calibrationTime : int ): + + """ + Broadcasts DD calibration_pressure_sensor_record + Args: + @param accept (int ): accept + @param rejectionReason (int ): Rejection Reason + @param index (int ):index + @param gain (float): calibration gain + @param offset (float): calibration offset + @param calibrationTime (int ): calibration time epoch + + @return: None + """ + payload = conversions.integer_to_bytearray(accept ) + payload += conversions.integer_to_bytearray(rejectionReason ) + payload += conversions.integer_to_bytearray(index ) + payload += conversions.float_to_bytearray (gain ) + payload += conversions.float_to_bytearray (offset ) + payload += conversions.integer_to_bytearray(calibrationTime ) + + message = CAN.CanMessage.build_message( + channel_id=CAN.CanChannels.dd_sync_broadcast_ch_id, + message_id=msg_ids.MsgIds.MSG_ID_DD_UI_NVM_GET_CONC_PUMP_CAL_RECORD_RESPONSE.value, + payload=payload) + + self.can_interface.send(message, 0) + + + def dd_set_calibration_ConcPump_sensor_record(self, + accept : int , + rejectionReason : int , + index : int , + gainRejection : float , + offsetRejection : float , + calibrationTimeRejection : int ): + + """ + Broadcasts DD calibration_pressure_sensor_record + Args: + @param accept (int ): accept + @param rejectionReason (int ): Rejection Reason + @param index (int ):index + @param gain (float): calibration gain + @param offset (float): calibration offset + @param calibrationTime (int ): calibration time epoch + + @return: None + """ + payload = conversions.integer_to_bytearray(accept ) + payload += conversions.integer_to_bytearray(rejectionReason ) + payload += conversions.integer_to_bytearray(index ) + payload += conversions.integer_to_bytearray(gainRejection ) + payload += conversions.integer_to_bytearray(offsetRejection ) + payload += conversions.integer_to_bytearray(calibrationTimeRejection ) + + message = CAN.CanMessage.build_message( + channel_id=CAN.CanChannels.dd_sync_broadcast_ch_id, + message_id=msg_ids.MsgIds.MSG_ID_DD_UI_NVM_SET_CONC_PUMP_CAL_RECORD_RESPONSE.value, + payload=payload) + + self.can_interface.send(message, 0) + + + def dd_get_calibration_D12Pump_sensor_record(self, + accept : int , + rejectionReason : int , + TargetPumpSpeed : float , + calibrationTime : int ): + """ + Broadcasts DD calibration_pressure_sensor_record + Args: + @param accept (int ): accept + @param rejectionReason (int ): Rejection Reason + @param offset (float): calibration offset + @param calibrationTime (int ): calibration time epoch + + @return: None + """ + payload = conversions.integer_to_bytearray(accept ) + payload += conversions.integer_to_bytearray(rejectionReason ) + payload += conversions.float_to_bytearray (TargetPumpSpeed ) + payload += conversions.integer_to_bytearray(calibrationTime ) + + message = CAN.CanMessage.build_message( + channel_id=CAN.CanChannels.dd_sync_broadcast_ch_id, + message_id=msg_ids.MsgIds.MSG_ID_DD_UI_NVM_GET_D12_PUMP_CAL_RECORD_RESPONSE.value, + payload=payload) + + self.can_interface.send(message, 0) + + + def dd_set_calibration_D12Pump_sensor_record(self, + accept : int , + rejectionReason : int , + TargetPumpSpeedRejection : float , + calibrationTimeRejection : int ): + """ + Broadcasts DD calibration_pressure_sensor_record + Args: + @param accept (int ): accept + @param rejectionReason (int ): Rejection Reason + @param offset (float): calibration offset + @param calibrationTime (int ): calibration time epoch + + @return: None + """ + payload = conversions.integer_to_bytearray(accept ) + payload += conversions.integer_to_bytearray(rejectionReason ) + payload += conversions.integer_to_bytearray(TargetPumpSpeedRejection ) + payload += conversions.integer_to_bytearray(calibrationTimeRejection ) + + message = CAN.CanMessage.build_message( + channel_id=CAN.CanChannels.dd_sync_broadcast_ch_id, + message_id=msg_ids.MsgIds.MSG_ID_DD_UI_NVM_SET_D12_PUMP_CAL_RECORD_RESPONSE.value, + payload=payload) + self.can_interface.send(message, 0) \ No newline at end of file