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);