Remove debug prints, correct reverse gear, tidy loop

- Comment out all Serial debugging statements and the artificial delay
  in
  Engine::update.
- Change reverse gear detection from `gearIdx == 5` to `gearIdx == -1`.
- Simplify the main loop in Projekt.ino by removing unnecessary braces,
  eliminating temporary blink variables, and calling
  `display.updateDirection`
  directly with the pin reads.
This commit is contained in:
2026-06-16 17:32:31 +02:00
parent b957a0701b
commit febf1215db
2 changed files with 39 additions and 40 deletions
+4 -5
View File
@@ -30,13 +30,12 @@ void setup() {
}
void loop() {
if (gear.update()) {
if (gear.update())
display.updateGear(gear.getGearChar());
}
leftBlink = digitalRead(TS_LEFT);
rightBlink = digitalRead(TS_RIGHT);
display.updateDirection(leftBlink, rightBlink);
display.updateDirection(
digitalRead(TS_LEFT),
digitalRead(TS_RIGHT));
unsigned long now = millis();
float dt = (now - prevUpdate) / 1000.0f;