Skip to content

Commit bf45b6a

Browse files
committed
FIX phase resitence not changing voltage_limit
1 parent b5dccfb commit bf45b6a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/communication/Commander.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,8 @@ void Commander::motor(FOCMotor* motor, char* user_command) {
159159
printVerbose(F("curr: "));
160160
if(!GET){
161161
motor->current_limit = value;
162-
// if phase resistance is set, change the voltage limit as well.
163-
if(_isset(motor->phase_resistance)) motor->voltage_limit = value*motor->phase_resistance;
164162
// if phase resistance specified or the current control is on set the current limit to the velocity PID
165-
if(_isset(motor->phase_resistance) || motor->torque_controller != TorqueControlType::voltage ) motor->PID_velocity.limit = value;
163+
if(_isset(motor->phase_resistance) || motor->torque_controller != TorqueControlType::voltage ) motor->PID_velocity.limit = value;
166164
}
167165
println(motor->current_limit);
168166
break;

0 commit comments

Comments
 (0)