Change ERROR_CURRENT_UNSTABLE to ERROR_CURRENT_LIMIT_VIOLATION

This commit is contained in:
Oskar Weigl
2019-08-09 20:37:07 -07:00
parent b0a16b87cf
commit 87e83bd4ba
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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;
}
+1 -1
View File
@@ -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 {
+1 -1
View File
@@ -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