fix setter logic

This commit is contained in:
Oskar Weigl
2022-05-05 13:58:33 -07:00
parent 6444197251
commit 4ca99a62c8
2 changed files with 2 additions and 2 deletions
+1
View File
@@ -58,6 +58,7 @@ public:
Controller* parent;
void set_input_filter_bandwidth(float value) { input_filter_bandwidth = value; parent->update_filter_gains(); }
void set_steps_per_circular_range(uint32_t value) { steps_per_circular_range = value > 0 ? value : steps_per_circular_range; }
void set_control_mode(ControlMode value) { control_mode = value; parent->control_mode_updated(); }
};
+1 -2
View File
@@ -1069,7 +1069,7 @@ interfaces:
enable_overspeed_error:
type: bool
doc: Enables the velocity controller's overspeed error
control_mode: ControlMode
control_mode: {type: ControlMode, c_setter: set_control_mode}
input_mode: InputMode
pos_gain:
type: float32
@@ -1591,7 +1591,6 @@ valuetypes:
doc: MagAlpha MA732 magnetic encoder
ODrive.Controller.ControlMode:
c_setter: set_setpoint_to_estimate
values:
# Note: these should be sorted from lowest level of control to
# highest level of control, to allow "<" style comparisons.