Add games (Tetris, Snake), 5 new animations, and multiple bugfixes#6
Open
Dcomp-commits wants to merge 10 commits into
Open
Add games (Tetris, Snake), 5 new animations, and multiple bugfixes#6Dcomp-commits wants to merge 10 commits into
Dcomp-commits wants to merge 10 commits into
Conversation
New features: - Page_tetris.h: Tetris game playable via web interface on LED matrix - Page_snake.h: Snake game playable via web interface on LED matrix - LedStrip.h: 5 new animations + improvements to existing ones Bug fixes: - global.h: EEPROM reset now covers full 1024 bytes (was 511); off-by-one in ReadStringFromEEPROM; WriteStringToEEPROM truncates to maxLen; passwords masked in printConfig; add AP_DEFAULT_PASSWORD, EEPROM_SIZE constants; add brightnessMax, APPassword, animSpeed/Min/Max fields with EEPROM R/W; timezone sanity check on ReadConfig - WiFiMgr.h: timers unsigned int -> unsigned long (overflow fix at ~65s) - WiFiMgr.cpp: static IP applied before WiFi.begin (DHCP conflict fix); password removed from Serial logs; AP address 192.168.1.1 -> 192.168.4.1; setAutoReconnect(false) before AP mode; WPA2 key length check >= 8; STA timeout 10s -> 30s for WiFi 6 compatibility - NTP.h: integer overflow fix in timezone calculation (cast to long) - TexTime.ino: use EEPROM_SIZE constant; default config initializes all new fields and calls WriteConfig(); setAPssid passes APPassword; tryToConnect uses const String& signature; setTimeout overflow cast; add game routes - Page_network.h: passwords not returned to browser on page load; APPassword field added (min 8 chars, only saved if valid length) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Page_index.h: add speed, min/max brightness sliders for animations; add Tetris and Snake links in sidebar navigation - Page_general.h: expose animSpeed/animBrightnessMin/Max in config values endpoint and live LED update handler - TexTime.ino: save animSpeed/animBrightnessMin/Max in /admin/save/general Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The timezone select uses 1/10th-hour units (GMT+1 = value 10). Correct multiplier is 360 (10 * 360 = 3600s = 1h). The (long) cast is kept to prevent int overflow for UTC+9 and above. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Prevents setAnimation() from silently falling back to index 0 (Normal) when EEPROM contains an out-of-range animation value (e.g. 0xFF on first boot or after firmware downgrade). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Use QTLed.setAnimSpeed() instead of directly writing _config.animSpeed, so begin() is called on the current animation and the new FPS takes effect in real-time without requiring Save. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace absolute Darken(35) with a distance-based proportional fade so the tail remains visible at any brightness level. Previously, low animBrightnessMax values caused the trail to reach black in 2-3 pixels, making variable trail lengths invisible. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add copyForeground() at the end of the FLASH phase, consistent with BUILD and FADE which already do this. Background pixels still flash white but word pixels are restored on top. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
initializeColorPicker() now explicitly syncs colorText.value to colorInput.value after setValues() loads server data. setValues() sets colorText programmatically (no 'input' event fires), leaving colorInput stuck at #000000. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaces browser-native color picker with a custom inline picker: - Colored swatch (click to open/close) - 2D saturation/value square (drag to pick) - Hue rainbow slider - Hex text input stays for direct entry - Works identically on Android and desktop - CSS loaded with ?t=timestamp to prevent stale cache Fixes Android Chrome "Personnalise" HSV sliders defaulting to 0,0,0. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
setValues() sets element.value programmatically without firing oninput, so animspeedt, animbrightmint and animbrightmaxt stayed at '--' after loading stored settings. Sync them explicitly in the loadGeneralSettings callback once all setValues() calls have resolved. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🇬🇧 English
New features
Tetris & Snake games (web interface)
Supports touch controls on smartphone/tablet screens, and Bluetooth game
controllers (PS4, PS5, Xbox, etc.) connected to the visiting device.
Score/level/lines display, next-piece preview, runs on the LED matrix
Same dual control support: touchscreen or Bluetooth gamepad.
Runs on the LED matrix
5 new animations + improvements to existing ones (LedStrip.h)
Animation controls in the dashboard (Page_index.h)
Custom inline color picker (Page_index.h)
<input type="color">which showed broken HSV sliders (defaulting to 0,0,0) in Android Chrome's "Personnalisé" modeBug fixes
global.h
LedStrip.h
WiFiMgr.h
WiFiMgr.cpp
NTP.h
value 10, 10 × 360s = 3600s = 1h), so the multiplier 360 is correct and unchanged
TexTime.ino
Page_network.h
Page_general.h
🇫🇷 Français
Nouvelles fonctionnalités
Jeux Tetris & Snake (interface web)
à l'ESP8266. Contrôles tactiles sur écran de smartphone/tablette, ou via
un contrôleur Bluetooth (PS4, PS5, Xbox, etc.) connecté à l'appareil visitant
la page. Affichage score/niveau/lignes, aperçu de la pièce suivante,
s'exécute sur la matrice LED
à l'ESP8266. Même double support : écran tactile ou manette Bluetooth.
S'exécute sur la matrice LED
5 nouvelles animations + améliorations des animations existantes (LedStrip.h)
Contrôles d'animation dans le dashboard (Page_index.h)
Sélecteur de couleur inline personnalisé (Page_index.h)
<input type="color">natif dont les sliders HSV affichaient 0,0,0 (noir) par défaut dans le mode « Personnalisé » d'Android ChromeCorrections de bugs
global.h
LedStrip.h
décroît linéairement avec la distance à la tête)
WiFiMgr.h
WiFiMgr.cpp
NTP.h
utilise des unités de 1/10ème d'heure (GMT+1 = valeur 10, 10 × 360s = 3600s = 1h), le multiplicateur 360 est donc correct et inchangé
TexTime.ino
Page_network.h
Page_general.h
nécessiter Save)