Index: leahi_dialin/common/msg_ids.py =================================================================== diff -u -r8ead998adef3ac00b1a27a8d8231562b59b7facc -r7412ecaf908e316c199518fe7f97256dc46b133b --- leahi_dialin/common/msg_ids.py (.../msg_ids.py) (revision 8ead998adef3ac00b1a27a8d8231562b59b7facc) +++ leahi_dialin/common/msg_ids.py (.../msg_ids.py) (revision 7412ecaf908e316c199518fe7f97256dc46b133b) @@ -262,8 +262,6 @@ TBD_EF = 0xEF MSG_ID_DD_PISTON_PUMP_CONTROL_DATA = 0xF0 - - MSG_ID_UI_TD_NVM_GET_RECORD_REQUEST = 0x100 MSG_ID_TD_NVM_SYSTEM_RECORD_RESPONSE = 0x101 MSG_ID_UI_TD_NVM_SET_SYSTEM_RECORD = 0x102 @@ -277,10 +275,46 @@ 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_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_UI_DD_NVM_GET_TEMPERATURE_SENSOR_CAL_RECORD_REQUEST = 0x11C + MSG_ID_DD_UI_NVM_GET_TEMPERATURE_SENSOR_CAL_RECORD_RESPONSE = 0x11D + MSG_ID_UI_DD_NVM_SET_TEMPERATURE_SENSOR_CAL_RECORD_REQUEST = 0x11E + MSG_ID_DD_UI_NVM_SET_TEMPERATURE_SENSOR_CAL_RECORD_RESPONSE = 0x11F + MSG_ID_UI_DD_NVM_GET_CONC_PUMP_CAL_RECORD_REQUEST = 0x120 + MSG_ID_DD_UI_NVM_GET_CONC_PUMP_CAL_RECORD_RESPONSE = 0x121 + MSG_ID_UI_DD_NVM_SET_CONC_PUMP_CAL_RECORD_REQUEST = 0x122 + MSG_ID_DD_UI_NVM_SET_CONC_PUMP_CAL_RECORD_RESPONSE = 0x123 + MSG_ID_UI_DD_NVM_GET_D12_PUMP_CAL_RECORD_REQUEST = 0x124 + MSG_ID_DD_UI_NVM_GET_D12_PUMP_CAL_RECORD_RESPONSE = 0x125 + MSG_ID_UI_DD_NVM_SET_D12_PUMP_CAL_RECORD_REQUEST = 0x126 + MSG_ID_DD_UI_NVM_SET_D12_PUMP_CAL_RECORD_RESPONSE = 0x127 + MSG_ID_UI_DD_NVM_GET_D48_PUMP_CAL_RECORD_REQUEST = 0x128 + MSG_ID_DD_UI_NVM_GET_D48_PUMP_CAL_RECORD_RESPONSE = 0x129 + MSG_ID_UI_DD_NVM_SET_D48_PUMP_CAL_RECORD_REQUEST = 0x12A + MSG_ID_DD_UI_NVM_SET_D48_PUMP_CAL_RECORD_RESPONSE = 0x12B + MSG_ID_UI_DD_NVM_GET_ACID_CONC_CAL_RECORD_REQUEST = 0x12C + MSG_ID_DD_UI_NVM_GET_ACID_CONC_CAL_RECORD_RESPONSE = 0x12D + MSG_ID_UI_DD_NVM_SET_ACID_CONC_CAL_RECORD_REQUEST = 0x12E + MSG_ID_DD_UI_NVM_SET_ACID_CONC_CAL_RECORD_RESPONSE = 0x12F + MSG_ID_UI_DD_NVM_GET_BICARB_CONC_CAL_RECORD_REQUEST = 0x130 + MSG_ID_DD_UI_NVM_GET_BICARB_CONC_CAL_RECORD_RESPONSE = 0x131 + MSG_ID_UI_DD_NVM_SET_BICARB_CONC_CAL_RECORD_REQUEST = 0x132 + MSG_ID_DD_UI_NVM_SET_BICARB_CONC_CAL_RECORD_RESPONSE = 0x133 + MSG_ID_UI_DD_NVM_GET_ACCEL_SENSOR_CAL_RECORD_REQUEST = 0x134 + MSG_ID_DD_UI_NVM_GET_ACCEL_SENSOR_CAL_RECORD_RESPONSE = 0x135 + MSG_ID_UI_DD_NVM_SET_ACCEL_SENSOR_CAL_RECORD_REQUEST = 0x136 + MSG_ID_DD_UI_NVM_SET_ACCEL_SENSOR_CAL_RECORD_RESPONSE = 0x137 + MSG_ID_UI_DD_NVM_GET_BLOOD_LEAK_SENSOR_CAL_RECORD_REQUEST = 0x138 + MSG_ID_DD_UI_NVM_GET_BLOOD_LEAK_SENSOR_CAL_RECORD_RESPONSE = 0x139 + MSG_ID_UI_DD_NVM_SET_BLOOD_LEAK_SENSOR_CAL_RECORD_REQUEST = 0x13A + MSG_ID_DD_UI_NVM_SET_BLOOD_LEAK_SENSOR_CAL_RECORD_RESPONSE = 0x13B + MSG_ID_UI_DD_NVM_GET_CONDUCTIVITY_SENSOR_CAL_RECORD_REQUEST = 0x13C + MSG_ID_DD_UI_NVM_GET_CONDUCTIVITY_SENSOR_CAL_RECORD_RESPONSE = 0x13D + MSG_ID_UI_DD_NVM_SET_CONDUCTIVITY_SENSOR_CAL_RECORD_REQUEST = 0x13E + MSG_ID_DD_UI_NVM_SET_CONDUCTIVITY_SENSOR_CAL_RECORD_RESPONSE = 0x13F MSG_ID_TD_TESTER_LOGIN_REQUEST = 0x8000 MSG_ID_TD_SOFTWARE_RESET_REQUEST = 0x8001 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