fix calibration and sensor tests

This commit is contained in:
Samuel Sadok
2021-01-08 11:28:38 +01:00
parent dea443e63c
commit a9b234979f
2 changed files with 5 additions and 4 deletions
+4 -3
View File
@@ -25,9 +25,10 @@ class TestMotorCalibration():
def run_test(self, axis_ctx: ODriveAxisComponent, motor_ctx: MotorComponent, logger: Logger):
# reset old calibration values
if axis_ctx.handle.encoder.config.mode != ENCODER_MODE_INCREMENTAL:
axis_ctx.handle.encoder.config.mode = ENCODER_MODE_INCREMENTAL
axis_ctx.parent.save_config_and_reboot()
axis_ctx.parent.erase_config_and_reboot()
#if axis_ctx.handle.encoder.config.mode != ENCODER_MODE_INCREMENTAL:
# axis_ctx.handle.encoder.config.mode = ENCODER_MODE_INCREMENTAL
# axis_ctx.parent.save_config_and_reboot()
axis_ctx.handle.motor.config.phase_resistance = 0.0
axis_ctx.handle.motor.config.phase_inductance = 0.0
+1 -1
View File
@@ -30,7 +30,7 @@ components:
brake-resistance: 2.0
usb: auto
can: main_canbus
vbus-voltage: 24 # [V]
vbus-voltage: 20.5 # [V]
max-brake-power: 150 # [W]
encoder0: virtual_encoder0
encoder1: virtual_encoder1