Refactor Engine: remove begin() and dedupe helpers
Removed the empty Engine::begin() method and its declaration. Moved getRPM, getSpeedKmh, rpmToPwm, and setMotor implementations to the top of Engine.cpp and deleted their duplicate definitions at the bottom. Fixed wheel motor PWM calculation by using the raw wheelRPM instead of wheelRPM * 10.0f. Deleted the call to engine.begin() in the Arduino setup.
This commit is contained in:
@@ -46,7 +46,6 @@ void setup() {
|
||||
|
||||
rfid.begin();
|
||||
display.begin(LCD_COLS, LCD_ROWS);
|
||||
engine.begin();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
|
||||
Reference in New Issue
Block a user