Update README for version 7.2 UI screen control fixes

This commit is contained in:
2026-08-08 23:29:03 +02:00
committed by GitHub
parent 0933a06973
commit 20bff8b00a
+43 -8
View File
@@ -11,12 +11,45 @@ This project is an ArduinoIDEfriendly firmware for the **Seeed XIAO ESP32
- Uses a white LED and an optional presence sensor to give quick visual feedback. - Uses a white LED and an optional presence sensor to give quick visual feedback.
- Stores daily price data in **NVS** to survive reboots and reduce API calls. - Stores daily price data in **NVS** to survive reboots and reduce API calls.
The latest sketch implements **Version 7.1** with separate provider fee support for negative spot prices. The latest sketch implements **Version 7.2** — a bug-fix release that
restores primary-screen scrolling, fixes double-click → secondary-screen
switching on the ESP32-C3, and stabilises end-of-day behaviour when no
tomorrow data is available yet. The v7.1 negative-price provider fee logic
is preserved unchanged.
--- ---
## Version Highlights ## Version Highlights
### v7.2 - Button Robustness & Screen-Control Fixes (2026-08-04)
Bug-fix release. Resolves the three control glitches reported for v7.1:
"cannot scroll the primary screen at 20:35", "double-click does not switch
to the secondary screen", and "strange end-of-day behaviour at 22:15 with
no tomorrow data". No fee/VAT math, NVS layout, API scheduling or
48-hour scrolling behaviour was changed.
- **Fix 1 Primary-screen scroll** works at any hour of the day:
past-hour blanking in `displayPriceRow()` simplified from
`currentHour < 22` to a plain `localHourIndex < currentHour`, and the
`currentHour >= 21` override in `displayPrimaryList()` removed.
- **Fix 2 Double-click** reliably toggles to the secondary screen.
A new `bool buttonEverReleased` flag prevents a false
"Long press detected!" from firing right after every reset on the
ESP32-C3 (floating button pin + `buttonPressStartTime = 0` was making
the long-press detector trip on phantom 3-second holds during boot).
- **Fix 3 End-of-day scroll** is stable with no tomorrow data. The
`allowedAhead = 2` hack in `advanceDisplayOffset()` is gone, so the
user can no longer scroll into "24:00 / 25:00" and wrap back to 00:00.
- **Fix 4 (bonus) Auto-return timer** now resets on every click, so
scrolling the secondary status page no longer jumps back to the primary
view mid-read.
See [`VERSION.md`](./VERSION.md) for the highlights and
[`CHANGELOG.md`](./CHANGELOG.md) for full implementation details.
---
### v7.1 - Negative Price Provider Fee (2026-04-06) ### v7.1 - Negative Price Provider Fee (2026-04-06)
Added a separate configurable provider fee for negative spot prices, correctly Added a separate configurable provider fee for negative spot prices, correctly
@@ -229,7 +262,7 @@ if (dataIndex == lowIdx) {
--- ---
## Behavior & Display States (v7.1) ## Behavior & Display States (v7.2)
The display changes based on which data buffer is being used and the status of the fetch: The display changes based on which data buffer is being used and the status of the fetch:
@@ -238,7 +271,7 @@ The display changes based on which data buffer is being used and the status of t
| **Normal (Today)** | Shows current prices and 15-min details. Hours are marked as HH:00. | White LED reflects current price status (Breathe, Solid, or Blink). | | **Normal (Today)** | Shows current prices and 15-min details. Hours are marked as HH:00. | White LED reflects current price status (Breathe, Solid, or Blink). |
| **Scrolling (Tomorrow)** | Future prices are displayed. Hours are marked with HH:>> to indicate "Tomorrow". | **Pinned to Today:** The LEDs continue showing the _actual current_ price status even while browsing future hours. | | **Scrolling (Tomorrow)** | Future prices are displayed. Hours are marked with HH:>> to indicate "Tomorrow". | **Pinned to Today:** The LEDs continue showing the _actual current_ price status even while browsing future hours. |
| **No Data** | Displays: "No data for today, Press & hold to, refresh manually." | White LED is turned **OFF** to avoid misleading price signals. | | **No Data** | Displays: "No data for today, Press & hold to, refresh manually." | White LED is turned **OFF** to avoid misleading price signals. |
| **Connecting** | "Elec. Rate SI v7.1" followed by "Connecting..." and progress dots. | Built-in LED is **OFF** until connection is established. | | **Connecting** | "Elec. Rate SI v7.2" followed by "Connecting..." and progress dots. | Built-in LED is **OFF** until connection is established. |
### Key UX Principle: LEDs Stay Pinned to Current Time ### Key UX Principle: LEDs Stay Pinned to Current Time
@@ -353,7 +386,7 @@ All available bidding zones:
## Hardware Setup (Detailed) ## Hardware Setup (Detailed)
This section merges the original v5.5 instructions with the current v7.1 hardware expectations. This section merges the original v5.5 instructions with the current v7.2 hardware expectations.
Follow it carefully to reproduce the working setup. Follow it carefully to reproduce the working setup.
### 1. Microcontroller ### 1. Microcontroller
@@ -503,7 +536,7 @@ The LED is driven with various patterns to indicate price level; see "LED Price
--- ---
## Firmware Features (v7.1) ## Firmware Features (v7.2)
### Core Display & Pricing ### Core Display & Pricing
@@ -719,7 +752,7 @@ In `processJsonData()`:
A **secondary screen** (toggled via **doubleclick**) provides 20 lines of status information, displayed 4 lines at a time: A **secondary screen** (toggled via **doubleclick**) provides 20 lines of status information, displayed 4 lines at a time:
Typical content (updated for v7.1): Typical content (updated for v7.2):
1. Current date and time (`HH:MM DD.MM.YYYY`) 1. Current date and time (`HH:MM DD.MM.YYYY`)
2. Separator line (`--------------------`) 2. Separator line (`--------------------`)
@@ -741,7 +774,7 @@ Typical content (updated for v7.1):
1720. Credits and version: 1720. Credits and version:
- `energy-charts.info` - `energy-charts.info`
- `dynamic electricity` - `dynamic electricity`
- `price ticker v7.1` - `price ticker v7.2`
- `by Legolas-2025` - `by Legolas-2025`
--- ---
@@ -774,7 +807,7 @@ If NVS does not contain valid WiFi credentials, or if connecting fails repeat
- `DNSServer` (from ESP32 core) - `DNSServer` (from ESP32 core)
- `WebServer` (from ESP32 core) - `WebServer` (from ESP32 core)
- `Preferences` (builtin for ESP32) - `Preferences` (builtin for ESP32)
3. Open the v7.1 `.ino` file (`ESP32_standalone_electricity_ticker_7_1.ino`). 3. Open the v7.2 `.ino` file (`ESP32_standalone_electricity_ticker_7_2.ino`).
4. In Tools: 4. In Tools:
- Board: `Seeed XIAO ESP32C3` - Board: `Seeed XIAO ESP32C3`
- Port: choose the correct serial port. - Port: choose the correct serial port.
@@ -790,6 +823,8 @@ If NVS does not contain valid WiFi credentials, or if connecting fails repeat
## Versioning & Changelog ## Versioning & Changelog
- **v7.2** Button robustness & screen-control fixes (2026-08-04). See
highlights above; full details in [`CHANGELOG.md`](./CHANGELOG.md).
- **v7.1** Negative price provider fee: - **v7.1** Negative price provider fee:
- Separate `NEG_PRICE_COMPANY_FEE_PERCENTAGE` constant (default `30.0` %) - Separate `NEG_PRICE_COMPANY_FEE_PERCENTAGE` constant (default `30.0` %)
- Positive prices: `raw × (1 + pos_fee) × (1 + VAT)` - Positive prices: `raw × (1 + pos_fee) × (1 + VAT)`