ThingPulse / esp8266-weather-station-color

ESP8266 Weather Station in Color using ILI9341 TFT 240x320 display
https://thingpulse.com/product/esp8266-wifi-color-display-kit-2-4/
MIT License
565 stars 221 forks source link

Better way to change screens #129

Closed TiVoHomeUser closed 2 years ago

TiVoHomeUser commented 3 years ago

Missing feature

Screens only change in one direction on screen press. I would like to press:

Justification

Better user interaction

Workarounds

in loop() replace

    screen = (screen + 1) % screenCount;

with

    if (p.y < top) {
        IS_STYLE_12HR = !IS_STYLE_12HR;
    } else if (p.y > bottom) {    // Go to page 0
        screen = 0;
    } else if (p.x > middle) {    // Previous page
        if (screen == 0) {          // Note type uint16_t is unsigned
            screen = screenCount; // Last screen is max -1
        }
        screen--;
    } else {                      // Next page
        screen = (screen + 1) % screenCount;
    }
TiVoHomeUser commented 3 years ago

Should be else if (p.x > middle)

TiVoHomeUser commented 2 years ago

Added to pull request for Allow user to force a screen re-calibration