mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-09-22 08:04:07 +08:00
Change ERROR_CURRENT_UNSTABLE to ERROR_CURRENT_LIMIT_VIOLATION
This commit is contained in:
@@ -360,7 +360,7 @@ bool Motor::FOC_current(float Id_des, float Iq_des, float I_phase, float pwm_pha
|
||||
// Check for violation of current limit
|
||||
float I_trip = config_.current_lim_tolerance * effective_current_lim();
|
||||
if (SQ(Id) + SQ(Iq) > SQ(I_trip)) {
|
||||
set_error(ERROR_CURRENT_UNSTABLE);
|
||||
set_error(ERROR_CURRENT_LIMIT_VIOLATION);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ public:
|
||||
ERROR_UNEXPECTED_TIMER_CALLBACK = 0x0200,
|
||||
ERROR_CURRENT_SENSE_SATURATION = 0x0400,
|
||||
ERROR_INVERTER_OVER_TEMP = 0x0800,
|
||||
ERROR_CURRENT_UNSTABLE = 0x1000
|
||||
ERROR_CURRENT_LIMIT_VIOLATION = 0x1000
|
||||
};
|
||||
|
||||
enum MotorType_t {
|
||||
|
||||
@@ -42,7 +42,7 @@ class errors:
|
||||
ERROR_BRAKE_DEADTIME_VIOLATION = 0x0100
|
||||
ERROR_UNEXPECTED_TIMER_CALLBACK = 0x0200
|
||||
ERROR_CURRENT_SENSE_SATURATION = 0x0400
|
||||
ERROR_CURRENT_UNSTABLE = 0x1000
|
||||
ERROR_CURRENT_LIMIT_VIOLATION = 0x1000
|
||||
|
||||
class encoder:
|
||||
ERROR_NONE = 0
|
||||
|
||||
Reference in New Issue
Block a user