Removed commented line in controller.hpp

Added missing ')' to closed_loop_test.py
Invalid enum definitions in uart_ascii_test.py fixed.
This commit is contained in:
PAJohnson
2020-06-26 18:37:22 +01:00
parent e476b95536
commit 193dddad00
3 changed files with 3 additions and 4 deletions
-1
View File
@@ -22,7 +22,6 @@ public:
ControlMode control_mode = CONTROL_MODE_POSITION_CONTROL; //see: ControlMode_t
InputMode input_mode = INPUT_MODE_PASSTHROUGH; //see: InputMode_t
float pos_gain = 20.0f; // [(rad/s) / rad]
//float vel_gain = 0.2f / 10000.0f; // [Nm/(rad/s)]
float vel_gain = 0.2f / 7.7f; // [Nm/(rad/s)]
// float vel_gain = 0.2f / 200.0f, // [Nm/(rad/s)] <sensorless example>
float vel_integrator_gain = 0.4f / 7.7f; // [Nm/(rad/s * s)]
+1 -1
View File
@@ -180,7 +180,7 @@ class TestRegenProtection(TestClosedLoopControlBase):
# Accept a bit of noise on Ibus
axis_ctx.parent.handle.config.dc_max_negative_current = -0.2
logger.debug(f'Brake control test from {nominal_rps} rounds/s...'
logger.debug(f'Brake control test from {nominal_rps} rounds/s...')
axis_ctx.handle.controller.config.vel_limit = 2.0 * pi * 15.0 # max 15 rps
axis_ctx.handle.motor.config.current_lim = max_current
+2 -2
View File
@@ -105,7 +105,7 @@ class TestUartAscii():
ser.write(b'c 0 12.5\n')
test_assert_eq(ser.readline(), b'')
test_assert_eq(odrive.handle.axis0.controller.input_torque, 12.5, accuracy=0.001)
test_assert_eq(odrive.handle.axis0.controller.config.control_mode, CONTROL_MODE_CURRENT_CONTROL)
test_assert_eq(odrive.handle.axis0.controller.config.control_mode, CONTROL_MODE_TORQUE_CONTROL)
odrive.handle.axis0.controller.input_vel = 0
odrive.handle.axis0.controller.input_torque = 0
@@ -132,7 +132,7 @@ class TestUartAscii():
test_assert_eq(ser.readline(), b'')
test_assert_eq(odrive.handle.axis0.controller.input_pos, 123.4, accuracy=0.001)
test_assert_eq(odrive.handle.axis0.controller.config.vel_limit, 567.8, accuracy=0.001)
test_assert_eq(odrive.handle.axis0.motor.config.current_lim, 12.5, accuracy=0.001)
test_assert_eq(odrive.handle.axis0.motor.config.torque_lim, 12.5, accuracy=0.001)
test_assert_eq(odrive.handle.axis0.controller.config.control_mode, CONTROL_MODE_POSITION_CONTROL)
ser.write(b'f 0\n')