diff --git a/LeonardoProMicro/AutomatedGearShifter/AutomatedGearShifter.ino b/LeonardoProMicro/AutomatedGearShifter/AutomatedGearShifter.ino index 8976da8..a30ecfc 100644 --- a/LeonardoProMicro/AutomatedGearShifter/AutomatedGearShifter.ino +++ b/LeonardoProMicro/AutomatedGearShifter/AutomatedGearShifter.ino @@ -6,7 +6,7 @@ #include #include -#define Version "1.12.11" +#define Version "1.12.12" ////2DO: #define SCREEN_WIDTH 128 @@ -403,6 +403,10 @@ void prepareTurnOff() { myservo.write(servoCurrPos); delay(30); } + eeprom_write_block(&totalDist,totalDistMemLocation,2); + totalDistWrited = totalDist; + loop_cnt = 0; + for (; 1000 < (millis() - lastMillisSpd);) { digitalWrite(ServoSwitch, LOW); digitalWrite(ServoPin, LOW); @@ -429,9 +433,6 @@ void prepareTurnOff() { display.setCursor(10, 13); display.println(Version); //DST - eeprom_write_block(&totalDist,totalDistMemLocation,2); - totalDistWrited = totalDist; - loop_cnt = 0; display.setCursor(45, 0); display.println("Spins: "); display.setCursor(80, 0);