Index: dialin/dg/drain_pump.py =================================================================== diff -u -r171cfe518f3441e140b2995fbaa790d322697b38 -r90fd2bc1daa3ff18c14dd2bee592d8c05487e460 --- dialin/dg/drain_pump.py (.../drain_pump.py) (revision 171cfe518f3441e140b2995fbaa790d322697b38) +++ dialin/dg/drain_pump.py (.../drain_pump.py) (revision 90fd2bc1daa3ff18c14dd2bee592d8c05487e460) @@ -57,7 +57,7 @@ self.dac_value = 0 self.drain_pump_state = 0 self.current_drain_pump_rpm = 0 - self.target_drain_pump_outlet_pressure = 0.0 + self.target_drain_pump_outlet_flow_lpm = 0.0 self.drain_pump_current_A = 0.0 self.drain_pump_direction = 0 @@ -94,7 +94,7 @@ return self.current_drain_pump_rpm @publish(["target_drain_pump_rpm", "dac_value", "drain_pump_state", "current_drain_pump_rpm", - "drain_pump_current_A", "drain_pump_direction"]) + "drain_pump_current_A", "drain_pump_direction", "target_drain_pump_outlet_flow_lpm"]) def _handler_drain_pump_sync(self, message): """ Handles published drain pump data messages. Drain pump data are captured @@ -111,7 +111,7 @@ message['message'][MsgFieldPositions.START_POS_FIELD_3:MsgFieldPositions.END_POS_FIELD_3]))[0] self.current_drain_pump_rpm = struct.unpack('i', bytearray( message['message'][MsgFieldPositions.START_POS_FIELD_4:MsgFieldPositions.END_POS_FIELD_4]))[0] - self.target_drain_pump_outlet_pressure = struct.unpack('f', bytearray( + self.target_drain_pump_outlet_flow_lpm = struct.unpack('f', bytearray( message['message'][MsgFieldPositions.START_POS_FIELD_5:MsgFieldPositions.END_POS_FIELD_5]))[0] self.drain_pump_current_A = struct.unpack('f', bytearray( message['message'][MsgFieldPositions.START_POS_FIELD_6:MsgFieldPositions.END_POS_FIELD_6]))[0] Index: dialin/dg/heaters.py =================================================================== diff -u -r171cfe518f3441e140b2995fbaa790d322697b38 -r90fd2bc1daa3ff18c14dd2bee592d8c05487e460 --- dialin/dg/heaters.py (.../heaters.py) (revision 171cfe518f3441e140b2995fbaa790d322697b38) +++ dialin/dg/heaters.py (.../heaters.py) (revision 90fd2bc1daa3ff18c14dd2bee592d8c05487e460) @@ -254,19 +254,19 @@ There must be a minimum flow available for the heaters (FMP for primary and FMD for trimmer) @param heater the heater to override its value (primary, trimmer) - @param duty_cycle the duty cycle value to override + @param duty_cycle the duty cycle value to override in percent @param reset: (int) 1 to reset a previous override, 0 to override @returns 1 if successful, zero otherwise """ reset_value = integer_to_bytearray(reset) heater_name = integer_to_bytearray(heater) - duty = float_to_bytearray(duty_cycle) + duty = float_to_bytearray(duty_cycle/100) payload = reset_value + heater_name + duty message = DenaliMessage.build_message(channel_id=DenaliChannels.dialin_to_dg_ch_id, message_id=MsgIds.MSG_ID_DG_HEATERS_DUTY_CYCLE_OVERRIDE.value, payload=payload) - self.logger.debug("Overriding {} heater's duty cycle to {:5.3f}".format(HeatersNames(heater).name, duty_cycle)) + self.logger.debug("Overriding {} heater's duty cycle to {:5.3f} %".format(HeatersNames(heater).name, duty_cycle)) # Send message received_message = self.can_interface.send(message) Index: tests/dg_nvm_scripts.py =================================================================== diff -u -r1c23b35158467567fa49da4e06024e9a73b1e7d2 -r90fd2bc1daa3ff18c14dd2bee592d8c05487e460 --- tests/dg_nvm_scripts.py (.../dg_nvm_scripts.py) (revision 1c23b35158467567fa49da4e06024e9a73b1e7d2) +++ tests/dg_nvm_scripts.py (.../dg_nvm_scripts.py) (revision 90fd2bc1daa3ff18c14dd2bee592d8c05487e460) @@ -70,7 +70,7 @@ # in your computer. #dg.system_record.cmd_get_dg_system_record_report() - dg.system_record.cmd_set_dg_system_record_excel_to_fw('/home/fw/projects/DG_NV_Records/2022-12-19-DG-Record.xlsx') + dg.system_record.cmd_set_dg_system_record_excel_to_fw('/home/fw/projects/DG_NV_Records/2023-01-03-DG-Record.xlsx') # For resetting the system record to benign values, use the function below #dg.system_record.cmd_reset_dg_system_record() @@ -114,9 +114,9 @@ #run_sw_configs_commands() - run_calibration_commands() + #run_calibration_commands() - #run_system_commands() + run_system_commands() #run_usage_info_commands() Index: tests/dg_tests.py =================================================================== diff -u -r171cfe518f3441e140b2995fbaa790d322697b38 -r90fd2bc1daa3ff18c14dd2bee592d8c05487e460 --- tests/dg_tests.py (.../dg_tests.py) (revision 171cfe518f3441e140b2995fbaa790d322697b38) +++ tests/dg_tests.py (.../dg_tests.py) (revision 90fd2bc1daa3ff18c14dd2bee592d8c05487e460) @@ -182,12 +182,12 @@ def get_drain_states_info(): info = ('Drain, {}, DAC, {}, Tgt_RPM, {}, Curr_RPM, {}, PRd, {:5.3f}, PDr, {:5.3f}, Baro, {:5.3f}, ' - 'Drain_curr_A, {:5.3f}, Drain_dir, {}, ' + 'Drain_curr_A, {:5.3f}, Drain_dir, {}, Target_flow_lpm, {:5.3f}, ' .format(DrainPumpStates(dg.drain_pump.drain_pump_state).name, dg.drain_pump.dac_value, dg.drain_pump.target_drain_pump_rpm, dg.drain_pump.current_drain_pump_rpm, dg.pressures.drain_pump_inlet_pressure, dg.pressures.drain_pump_outlet_pressure, dg.pressures.barometric_pressure, dg.drain_pump.drain_pump_current_A, - dg.drain_pump.drain_pump_direction)) + dg.drain_pump.drain_pump_direction, dg.drain_pump.target_drain_pump_outlet_flow_lpm)) return info @@ -719,7 +719,7 @@ #collect_hd_treatment() #while True: - #print(get_hd_fans_info(), get_dg_fans_info(), get_temperature_sensors_info()) + # print(get_hd_fans_info(), get_dg_fans_info(), get_temperature_sensors_info()) # print(get_dg_valves_states()) # sleep(1) @@ -740,4 +740,5 @@ #hd.ui.cmd_ui_set_dg_service_time() + #dg.heaters.cmd_heater_duty_cycle_override(1, 10, reset=1)