Add SD history UI and pin remap

- Add SD history chart + download listing to web UI
- Use HSPI for SD and fix SD pin mapping
- Swap role/OLED control pins and update role detection
- Update README pin mapping and SD/history docs
This commit is contained in:
2026-02-02 01:43:54 +01:00
parent d32ae30014
commit b5477262ea
7 changed files with 484 additions and 15 deletions

View File

@@ -69,7 +69,9 @@ void display_power_down() {
}
void display_init() {
pinMode(PIN_OLED_CTRL, INPUT_PULLDOWN);
if (g_role == DeviceRole::Sender) {
pinMode(PIN_OLED_CTRL, INPUT_PULLDOWN);
}
Wire.begin(PIN_OLED_SDA, PIN_OLED_SCL);
Wire.setClock(100000);
g_display_ready = display.begin(SSD1306_SWITCHCAPVCC, OLED_I2C_ADDR);
@@ -373,7 +375,10 @@ void display_tick() {
}
return;
}
bool ctrl_high = digitalRead(PIN_OLED_CTRL) == HIGH;
bool ctrl_high = false;
if (g_role == DeviceRole::Sender) {
ctrl_high = digitalRead(PIN_OLED_CTRL) == HIGH;
}
bool in_boot_window = (millis() - g_boot_ms) < OLED_AUTO_OFF_MS;
if (g_role == DeviceRole::Receiver) {