Skip to content

Commit

Permalink
Rename current -> torque mode vel limit
Browse files Browse the repository at this point in the history
  • Loading branch information
Wetmelon committed Aug 4, 2021
1 parent dd44ab3 commit 759c85c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Firmware/MotorControl/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ bool Controller::update() {
}

// Velocity limiting in current mode
if (config_.control_mode < CONTROL_MODE_VELOCITY_CONTROL && config_.enable_current_mode_vel_limit) {
if (config_.control_mode < CONTROL_MODE_VELOCITY_CONTROL && config_.enable_torque_mode_vel_limit) {
if (!vel_estimate.has_value()) {
set_error(ERROR_INVALID_ESTIMATE);
return false;
Expand Down
2 changes: 1 addition & 1 deletion Firmware/MotorControl/controller.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Controller : public ODriveIntf::ControllerIntf {
bool enable_gain_scheduling = false;
bool enable_vel_limit = true;
bool enable_overspeed_error = true;
bool enable_current_mode_vel_limit = true; // enable velocity limit in current control mode (requires a valid velocity estimator)
bool enable_torque_mode_vel_limit = true; // enable velocity limit in current control mode (requires a valid velocity estimator)
uint8_t axis_to_mirror = -1;
float mirror_ratio = 1.0f;
float torque_mirror_ratio = 0.0f;
Expand Down
4 changes: 2 additions & 2 deletions Firmware/odrive-interface.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -900,9 +900,9 @@ interfaces:
attributes:
gain_scheduling_width: float32
enable_vel_limit: bool
enable_current_mode_vel_limit:
enable_torque_mode_vel_limit:
type: bool
doc: Enable velocity limit in current control mode (requires a valid velocity estimator).
doc: Enable velocity limit in torque control mode (requires a valid velocity estimator).
enable_gain_scheduling: bool
enable_overspeed_error: bool
control_mode: ControlMode
Expand Down

0 comments on commit 759c85c

Please sign in to comment.