From 2ff2aed1144ef48aa93d8bef174ec2533b41807c Mon Sep 17 00:00:00 2001 From: Kamil Siejka Date: Sun, 13 Oct 2024 18:11:03 +0200 Subject: [PATCH] =?UTF-8?q?1.12.12=20korekta=20zapisu=20do=20eeprom=20w=20?= =?UTF-8?q?p=C4=99tli=20na=20ekranie=20u=C5=9Bpienia?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AutomatedGearShifter/AutomatedGearShifter.ino | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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);