mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-08-20 22:14:34 +08:00
fix setter logic
This commit is contained in:
@@ -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(); }
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user