From 4b30a951f5ef7da589ae5935bbe3f8aa905980b9 Mon Sep 17 00:00:00 2001 From: sieja Date: Tue, 20 May 2025 18:06:46 +0200 Subject: [PATCH] =?UTF-8?q?Wersja=20z=20uproszczon=C4=85=20pr=C4=99dko?= =?UTF-8?q?=C5=9Bci=C4=85=20z=20pozostawion=C4=85=20reszt=C4=85=20funkcjon?= =?UTF-8?q?alno=C5=9Bci?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ESP32/ESP_AutomatedGearShifter/ESP_AutomatedGearShifter.ino | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ESP32/ESP_AutomatedGearShifter/ESP_AutomatedGearShifter.ino b/ESP32/ESP_AutomatedGearShifter/ESP_AutomatedGearShifter.ino index ea4719f..34e8822 100644 --- a/ESP32/ESP_AutomatedGearShifter/ESP_AutomatedGearShifter.ino +++ b/ESP32/ESP_AutomatedGearShifter/ESP_AutomatedGearShifter.ino @@ -10,7 +10,7 @@ #include #include -#define Version "2.0.1" +#define Version "2.1.0" ////2DO: //diagnostyka i/lub przeciwdziałanie skokom predkosci //dlaczego wskaznik odnosi sie do poprawnego biegu a w tym czasie bieg jest zly? bo czas ponizej 2s? @@ -228,7 +228,7 @@ void loop() { raw_speed = 0.0; //przejście w tryb uśpienia za pomocą odpowiedniego ustawienia koła i magnesu - if ((digitalRead(Btn2) == HIGH)|| (sleepSpd >= LongTimeToSleep)) { + if ((digitalRead(PinInSpeed) == LOW)||(digitalRead(Btn2) == HIGH)|| (sleepSpd >= LongTimeToSleep)) { display.fillCircle(75, 10, 10, SSD1306_WHITE); if (sleepSpd >= TimeToSleep) { prepareTurnOff(); @@ -275,7 +275,7 @@ void loop() { display.setTextSize(2); - gearBarHeight = 64 - int(((speed4Gear - currentGearRangeLower) / (currentGearRangeUpper - currentGearRangeLower)) * 64) - 5; + gearBarHeight = 64 - int(((calcSpeedMain - currentGearRangeLower) / (currentGearRangeUpper - currentGearRangeLower)) * 64) - 5; display.setCursor(115, gearBarHeight); display.write(16); display.setTextSize(3);