Index: dialin/dg/load_cells.py =================================================================== diff -u -r49828431dbc46be811bef6423b0c8794df5f64a8 -rb52b3ab5fc442effe18b0575560080fb39fff5b3 --- dialin/dg/load_cells.py (.../load_cells.py) (revision 49828431dbc46be811bef6423b0c8794df5f64a8) +++ dialin/dg/load_cells.py (.../load_cells.py) (revision b52b3ab5fc442effe18b0575560080fb39fff5b3) @@ -58,6 +58,11 @@ self.load_cell_B1 = 0.0 self.load_cell_B2 = 0.0 + self.load_cell_A1_raw = 0.0 + self.load_cell_A2_raw = 0.0 + self.load_cell_B1_raw = 0.0 + self.load_cell_B2_raw = 0.0 + def get_load_cells(self): """ Gets the current load cell weights @@ -76,20 +81,23 @@ @return: None """ - a1 = struct.unpack('f', bytearray( - message['message'][MsgFieldPositions.START_POS_FIELD_1:MsgFieldPositions.END_POS_FIELD_1])) - a2 = struct.unpack('f', bytearray( - message['message'][MsgFieldPositions.START_POS_FIELD_2:MsgFieldPositions.END_POS_FIELD_2])) - b1 = struct.unpack('f', bytearray( - message['message'][MsgFieldPositions.START_POS_FIELD_3:MsgFieldPositions.END_POS_FIELD_3])) - b2 = struct.unpack('f', bytearray( - message['message'][MsgFieldPositions.START_POS_FIELD_4:MsgFieldPositions.END_POS_FIELD_4])) + self.load_cell_A1 = struct.unpack('f', bytearray( + message['message'][MsgFieldPositions.START_POS_FIELD_1:MsgFieldPositions.END_POS_FIELD_1]))[0] + self.load_cell_A2 = struct.unpack('f', bytearray( + message['message'][MsgFieldPositions.START_POS_FIELD_2:MsgFieldPositions.END_POS_FIELD_2]))[0] + self.load_cell_B1 = struct.unpack('f', bytearray( + message['message'][MsgFieldPositions.START_POS_FIELD_3:MsgFieldPositions.END_POS_FIELD_3]))[0] + self.load_cell_B2 = struct.unpack('f', bytearray( + message['message'][MsgFieldPositions.START_POS_FIELD_4:MsgFieldPositions.END_POS_FIELD_4]))[0] + self.load_cell_A1_raw = struct.unpack('f', bytearray( + message['message'][MsgFieldPositions.START_POS_FIELD_5:MsgFieldPositions.END_POS_FIELD_5]))[0] + self.load_cell_A2_raw = struct.unpack('f', bytearray( + message['message'][MsgFieldPositions.START_POS_FIELD_6:MsgFieldPositions.END_POS_FIELD_6]))[0] + self.load_cell_B1_raw = struct.unpack('f', bytearray( + message['message'][MsgFieldPositions.START_POS_FIELD_7:MsgFieldPositions.END_POS_FIELD_7]))[0] + self.load_cell_B2_raw = struct.unpack('f', bytearray( + message['message'][MsgFieldPositions.START_POS_FIELD_8:MsgFieldPositions.END_POS_FIELD_8]))[0] - self.load_cell_A1 = a1[0] - self.load_cell_A2 = a2[0] - self.load_cell_B1 = b1[0] - self.load_cell_B2 = b2[0] - def cmd_load_cell_override(self, sensor: int, grams: float, add_reservoir_weight: bool = False, reset: int = NO_RESET) -> int: """ Constructs and sends the load cell override command Index: tests/dg_tests.py =================================================================== diff -u -r34fce4de74f1e249b691f6b8a7618cf0f1454115 -rb52b3ab5fc442effe18b0575560080fb39fff5b3 --- tests/dg_tests.py (.../dg_tests.py) (revision 34fce4de74f1e249b691f6b8a7618cf0f1454115) +++ tests/dg_tests.py (.../dg_tests.py) (revision b52b3ab5fc442effe18b0575560080fb39fff5b3) @@ -686,9 +686,9 @@ # print(get_new_ro_info(), get_ro_info()) # sleep(1) - while True: - print(dg.rtc.get_rtc_epoch(), hd.rtc.get_rtc_epoch()) - sleep(1) + #while True: + # print(dg.rtc.get_rtc_epoch(), hd.rtc.get_rtc_epoch()) + # sleep(1) #test_dg_fans_alarms() @@ -709,3 +709,5 @@ # print(get_heaters_info()) # sleep(1) + dg.ro_pump.cmd_set_ro_flow_rate(0.6) + Index: tests/hd_nvm_scripts.py =================================================================== diff -u -r34fce4de74f1e249b691f6b8a7618cf0f1454115 -rb52b3ab5fc442effe18b0575560080fb39fff5b3 --- tests/hd_nvm_scripts.py (.../hd_nvm_scripts.py) (revision 34fce4de74f1e249b691f6b8a7618cf0f1454115) +++ tests/hd_nvm_scripts.py (.../hd_nvm_scripts.py) (revision b52b3ab5fc442effe18b0575560080fb39fff5b3) @@ -55,7 +55,7 @@ # Use cmd_set_hd_calibration_excel_to_fw() set the changes back to firmware # This function requires an address for the excel report. Use the absolute address of your excel report like the # example below - hd.calibration_record.cmd_set_hd_calibration_excel_to_fw('/home/fw/projects/HD_NV_Records/2022-07-26-HD-Record.xlsx') + hd.calibration_record.cmd_set_hd_calibration_excel_to_fw('/home/fw/projects/HD_NV_Records/2022-08-13-HD-Record.xlsx') # For resetting the calibration record to benign values, use the function below hd.calibration_record.cmd_reset_hd_calibration_record() @@ -68,8 +68,8 @@ if hd.cmd_log_in_to_hd(): # Comment this function if not needed - run_sw_configs_commands() + #run_sw_configs_commands() # Comment this function if not needed - #run_calibration_commands() + run_calibration_commands()