Index: tests/peter/test_hd_records.py =================================================================== diff -u -r6286da1bcfac5f1d43659196fb1baf27af50d746 -rdc3b97933c58b8854781f2984083a2f8eccd3217 --- tests/peter/test_hd_records.py (.../test_hd_records.py) (revision 6286da1bcfac5f1d43659196fb1baf27af50d746) +++ tests/peter/test_hd_records.py (.../test_hd_records.py) (revision dc3b97933c58b8854781f2984083a2f8eccd3217) @@ -47,10 +47,14 @@ while not observer.received: sleep(0.2) + #print(hd.calibration_record.hd_calibration_record) + + """ # store the old record after reading it from fw record_old_formatted = pprint.pformat(hd.calibration_record.hd_calibration_record, indent=4) with open("/home/fw/projects/dialin/tests/peter/hd_cal_record.log", 'w') as f: f.write(record_old_formatted) + """ hd.calibration_record.hd_calibration_record["accelerometer_sensor"]["accelerometer"]["y_offset"][1] = 2.0 hd.calibration_record.hd_calibration_record["accelerometer_sensor"]["accelerometer"]["cal_time"][1] = \ @@ -70,6 +74,7 @@ hd.calibration_record.cmd_set_hd_calibration_record(hd.calibration_record.hd_calibration_record) + def test_hd_reset_calibration_record(): hd = HD(log_level="DEBUG") if hd.cmd_log_in_to_hd(resend=False): @@ -96,10 +101,10 @@ hd = HD(log_level="DEBUG") if hd.cmd_log_in_to_hd(resend=False): - hd.calibration_record.cmd_reset_hd_calibration_record() + #hd.calibration_record.cmd_reset_hd_calibration_record() #print(hd.calibration_record.hd_calibration_record) #hd.system_record.cmd_reset_hd_system_record() - #hd.service_record.cmd_reset_hd_service_record() + hd.service_record.cmd_reset_hd_service_record() #print(hd.service_record.hd_service_record) @@ -136,8 +141,8 @@ #hd.sw_configs.cmd_reset_hd_sw_config_record() #sleep(2) - #hd.sw_configs.cmd_get_hd_sw_config_record('/home/fw/') - hd.sw_configs.cmd_update_hd_sw_config_record('/home/fw/projects/HD_NV_Records/2022-01-26-SW-CONFIGS-Record.xlsx') + hd.sw_configs.cmd_get_hd_sw_config_record() + #hd.sw_configs.cmd_update_hd_sw_config_record('/home/fw/projects/HD_NV_Records/2022-02-03-HD-SW-CONFIGS-Record.xlsx') #dg.sw_configs.cmd_set_dg_sw_config_record('/home/fw/DG_NV_Records/2022-01-22-SW-CONFIGS-Record.xlsx') """ @@ -154,10 +159,10 @@ if __name__ == "__main__": - test_hd_reset_record_record() - #test_hd_sw_config_record() + #test_hd_reset_record_record() + test_hd_sw_config_record() #test_hd_calibration_record() - # test_hd_service_record() + #test_hd_service_record() #test_hd_reset_system_record() #test_hd_system_record() # test_crc()