Index: tests/set_accels_cal.py =================================================================== diff -u -ra2cdbc7e007c6bd73e12344b4c89356a20b53f4f -rdd42e4d9cfe821b0a755ccc86cc1a4a2a3dd2f37 --- tests/set_accels_cal.py (.../set_accels_cal.py) (revision a2cdbc7e007c6bd73e12344b4c89356a20b53f4f) +++ tests/set_accels_cal.py (.../set_accels_cal.py) (revision dd42e4d9cfe821b0a755ccc86cc1a4a2a3dd2f37) @@ -24,26 +24,26 @@ # create an HD object called hd hd = HD() # create an DG object called hd - #dg = DG() + #hd = DG() sleep(2) # log in to HD and DG as tester if hd.cmd_log_in_to_hd() == 0: exit(1) - #if dg.cmd_log_in_to_dg() == 0: + #if hd.cmd_log_in_to_dg() == 0: # exit(1) sleep(1) #reset calibrations hd.accel.cmd_set_accel_calibration(0, 0, 0) - #dg.accel.cmd_set_accel_calibration(0, 0, 0) + #hd.accel.cmd_set_accel_calibration(0, 0, 0) #wait for new readings after calibration_record reset sleep(5) #calculate offsets (assuming HD and DG systems are level) hd_offsets = hd.accel.get_accel_vector() - #dg_offsets = dg.accel.get_accel_vector() + #dg_offsets = hd.accel.get_accel_vector() hd_offsets.x *= -1.0 hd_offsets.y *= -1.0 hd_offsets.z -= 1.0 @@ -55,6 +55,6 @@ #set new offsets hd.accel.cmd_set_accel_calibration(hd_offsets.x, hd_offsets.y, hd_offsets.z) - #dg.accel.cmd_set_accel_calibration(dg_offsets.x, dg_offsets.y, dg_offsets.z) + #hd.accel.cmd_set_accel_calibration(dg_offsets.x, dg_offsets.y, dg_offsets.z) exit(0)