Index: leahi_dialin/common/msg_ids.py =================================================================== diff -u -rd710522ba28b7ea7534904a42940c2c41f3558e4 -r8ead998adef3ac00b1a27a8d8231562b59b7facc --- leahi_dialin/common/msg_ids.py (.../msg_ids.py) (revision d710522ba28b7ea7534904a42940c2c41f3558e4) +++ leahi_dialin/common/msg_ids.py (.../msg_ids.py) (revision 8ead998adef3ac00b1a27a8d8231562b59b7facc) @@ -277,6 +277,11 @@ MSG_ID_UI_TD_NVM_SET_CAL_RECORD = 0x10A MSG_ID_TD_NVM_RECORD_CRC_OVERRIDE_REQUEST = 0x10B + MSG_ID_UI_DD_NVM_GET_PRESSURE_SENSOR_CAL_RECORD_REQUEST = 0x118 + MSG_ID_DD_UI_NVM_GET_PRESSURE_SENSOR_CAL_RECORD_RESPONSE = 0x119 + MSG_ID_UI_DD_NVM_SET_PRESSURE_SENSOR_CAL_RECORD_REQUEST = 0x11A + MSG_ID_DD_UI_NVM_SET_PRESSURE_SENSOR_CAL_RECORD_RESPONSE = 0x11B + MSG_ID_TD_TESTER_LOGIN_REQUEST = 0x8000 MSG_ID_TD_SOFTWARE_RESET_REQUEST = 0x8001 MSG_ID_TD_SEND_TEST_CONFIGURATION = 0x8002 Index: leahi_dialin/ui/dd_messaging.py =================================================================== diff -u -r14c136038e5f676ae99487381c13b88223f37c6f -r8ead998adef3ac00b1a27a8d8231562b59b7facc --- leahi_dialin/ui/dd_messaging.py (.../dd_messaging.py) (revision 14c136038e5f676ae99487381c13b88223f37c6f) +++ leahi_dialin/ui/dd_messaging.py (.../dd_messaging.py) (revision 8ead998adef3ac00b1a27a8d8231562b59b7facc) @@ -729,4 +729,76 @@ channel_id=CAN.CanChannels.dd_sync_broadcast_ch_id, message_id=msg_ids.MsgIds.MSG_ID_DD_ADJUST_RO_WATER_MODE_RESPONSE.value, payload=payload) + self.can_interface.send(message, 0) + + + def dd_get_calibration_pressure_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 ) + 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, + message_id=msg_ids.MsgIds.MSG_ID_DD_UI_NVM_GET_PRESSURE_SENSOR_CAL_RECORD_RESPONSE.value, + payload=payload) + + self.can_interface.send(message, 0) + + + def dd_set_calibration_pressure_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.float_to_bytearray (gainRejection ) + payload += conversions.float_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_PRESSURE_SENSOR_CAL_RECORD_RESPONSE.value, + payload=payload) + self.can_interface.send(message, 0) \ No newline at end of file