Replaced old inline enum with autogenerated enum header

Deleted the manually added enum in the ODriveArduino class. Removed the scope resolution operator from the ODriveArduinoTest.ino file to access enums as it can be accessed from the global namespace.
This commit is contained in:
Aaron de los Santos
2021-06-13 17:28:10 -07:00
parent b104671642
commit e59ee5cda1
2 changed files with 4 additions and 15 deletions

View File

@@ -75,15 +75,15 @@ void loop() {
int motornum = c-'0';
int requested_state;
requested_state = ODriveArduino::AXIS_STATE_MOTOR_CALIBRATION;
requested_state = AXIS_STATE_MOTOR_CALIBRATION;
Serial << "Axis" << c << ": Requesting state " << requested_state << '\n';
if(!odrive.run_state(motornum, requested_state, true)) return;
requested_state = ODriveArduino::AXIS_STATE_ENCODER_OFFSET_CALIBRATION;
requested_state = AXIS_STATE_ENCODER_OFFSET_CALIBRATION;
Serial << "Axis" << c << ": Requesting state " << requested_state << '\n';
if(!odrive.run_state(motornum, requested_state, true, 25.0f)) return;
requested_state = ODriveArduino::AXIS_STATE_CLOSED_LOOP_CONTROL;
requested_state = AXIS_STATE_CLOSED_LOOP_CONTROL;
Serial << "Axis" << c << ": Requesting state " << requested_state << '\n';
if(!odrive.run_state(motornum, requested_state, false /*don't wait*/)) return;
}