mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-10-11 22:54:45 +08:00
added control mode setters (current and velocity)
This commit is contained in:
@@ -46,6 +46,14 @@ void ODriveArduino::TrapezoidalMove(int motor_number, float position){
|
||||
serial_ << "t " << motor_number << " " << position << "\n";
|
||||
}
|
||||
|
||||
void ODriveArduino::SetControlModeCurrent(int motor_number){
|
||||
serial_<< "w axis" << motor_number << ".controller.config.control_mode " << 1 << "\n";
|
||||
}
|
||||
|
||||
void ODriveArduino::SetControlModeVelocity(int motor_number){
|
||||
serial_<< "w axis" << motor_number << ".controller.config.control_mode " << 2 << "\n";
|
||||
}
|
||||
|
||||
float ODriveArduino::readFloat() {
|
||||
return readString().toFloat();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user