mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-09-23 00:59:54 +08:00
fix calibration and sensor tests
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user