add current command to Arduino code

This commit is contained in:
Oskar Weigl
2019-01-03 18:17:12 -08:00
parent 68372a901e
commit 5cd64f2d4f
2 changed files with 5 additions and 0 deletions

View File

@@ -38,6 +38,10 @@ void ODriveArduino::SetVelocity(int motor_number, float velocity, float current_
serial_ << "v " << motor_number << " " << velocity << " " << current_feedforward << "\n";
}
void ODriveArduino::SetCurrent(int motor_number, float current) {
serial_ << "c" << motor_number << " " << current << "\n";
}
float ODriveArduino::readFloat() {
return readString().toFloat();
}