Feat: scheduler + i18n FR/EN + HSV color picker + animations#9
Open
Dcomp-commits wants to merge 15 commits into
Open
Feat: scheduler + i18n FR/EN + HSV color picker + animations#9Dcomp-commits wants to merge 15 commits into
Dcomp-commits wants to merge 15 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>
Adds a weekly scheduler that overrides the general display settings at configurable half-hour intervals. Users define rules (mode, color, color randomization, animation, speed, brightness range) then paint time slots in a 7-day × 24-hour grid (each hour split in two halves). Implementation: - Page_scheduler.h: EEPROM read/write for 336 half-hour slots (7×48×8B), bulk save endpoint, apply-now endpoint, handleScheduler() called from loop() - Page_index.h: scheduler section with rule editor and interactive grid; click/drag to paint slots; single bulk POST to save entire grid at once - Page_style.css.h: scheduler grid and rule list CSS - global.h: SCHEDULER_EEPROM_BASE (1024) and SCHEDULER_SLOT_SIZE (8) defines - TexTime.ino: EEPROM.begin 1024→4096, include + routes + loop call EEPROM usage: existing config ends at ~778; scheduler starts at 1024, uses 2689 bytes (1 header + 336×8). Total: 3713 / 4096 bytes. ESP8266 supports EEPROM.begin() up to 4096 bytes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Combines: - HSV color picker + animspeed/bright controls (improvements-2026) - Tetris & Snake games (improvements-2026) - New animations + WiFiMgr fixes (improvements-2026) - Display scheduler weekly grid (feature/scheduler) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- JS i18n dictionary (~100 keys, FR + EN) - data-i18n attributes on all static text elements - T(key) lookup, applyI18n(), initI18n() fetching /admin/langvalue - Language change updates UI immediately without page reload - Scheduler day labels and button states also translated - HSV color picker preserved in both general settings and scheduler Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This was referenced May 17, 2026
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary / Résumé
EN — Combines the weekly display scheduler (PR #7) and the full FR/EN interface translation (PR #8), plus a custom HSV color picker, animation controls, Tetris & Snake games, and various bugfixes.
FR — Combine le programmateur d'affichage hebdomadaire (PR #7) et la traduction complète FR/EN de l'interface (PR #8), ainsi qu'un sélecteur de couleur HSV personnalisé, des contrôles d'animation, les jeux Tetris & Snake, et divers correctifs.
Weekly Display Scheduler / Programmateur d'affichage hebdomadaire
EN — Adds a configurable weekly scheduler that automatically switches the display mode and animation every half-hour.
FR — Ajoute un programmateur hebdomadaire configurable qui change automatiquement le mode d'affichage et l'animation toutes les demi-heures.
Features / Fonctionnalités
handleScheduler()called fromloop()/ Application automatique viahandleScheduler()appelé depuisloop()New server routes / Nouvelles routes serveur
/admin/schedulerconfig/admin/schedulerdata/admin/save/schedulerbulk/admin/save/schedulerenabled/admin/scheduler/applyEEPROM changes / Modifications EEPROM
EEPROM_SIZEincreased from 1024 to 4096 bytes / augmenté de 1024 à 4096 octets[0]=mode (0xFF=disabled),[1]=anim,[2]=(colorRandom&0x03)|((animSpeed-1)<<2),[3]=animBrightMin,[4]=animBrightMax,[5]=R,[6]=G,[7]=BFR/EN Interface Translation / Traduction de l'interface FR/EN
EN — The entire dashboard UI switches to French or English instantly when the user changes the Language dropdown in General Settings. ~100 translation keys per language covering all labels, buttons, card titles, status messages, scheduler grid day names, and confirm dialogs. No server-side cost: a single new endpoint (
/admin/langvalue) returns the saved language index; all translation logic runs in the browser.FR — L'ensemble de l'interface bascule en français ou en anglais instantanément quand l'utilisateur change la liste déroulante Langue dans les paramètres généraux. ~100 clés de traduction par langue couvrant tous les libellés, boutons, titres de cartes, messages d'état, noms de jours de la grille et boîtes de confirmation. Aucun coût côté serveur : un seul nouvel endpoint (
/admin/langvalue) retourne l'index de langue sauvegardé ; toute la logique de traduction s'exécute dans le navigateur.Implementation / Implémentation
Page_general.h— newsend_lang_value_html()serving/admin/langvalue/ nouveausend_lang_value_html()pour/admin/langvaluePage_index.h—data-i18nattributes on all static text;I18Ndictionary (FR/EN);T()/applyI18n()/initI18n()helpers;updatelang()callsapplyI18n()immediately;loadGeneralSettings()re-syncscurrentLangafter AJAX reload; all JS-generated strings useT()/ attributsdata-i18nsur tout le texte statique ; dictionnaireI18N(FR/EN) ; helpersT()/applyI18n()/initI18n();updatelang()appelleapplyI18n()immédiatement ;loadGeneralSettings()resynchronisecurrentLangaprès rechargement AJAX ; toutes les chaînes JS générées utilisentT()TexTime.ino— registers/admin/langvalue; fixessetAPssid()(missingAPPasswordargument) / enregistre/admin/langvalue; corrigesetAPssid()(argumentAPPasswordmanquant)Other changes / Autres modifications
<input type="color">, in both General Settings and the scheduler rule editor / Sélecteur de couleur HSV personnalisé (carré SV + curseur de teinte) remplaçant<input type="color">, dans les paramètres généraux et dans l'éditeur de règles du programmateurFiles changed / Fichiers modifiés
global.h: SCHEDULER_EEPROM_BASE, SCHEDULER_SLOT_SIZE, EEPROM_SIZE → 4096TexTime.ino: Page_scheduler.h include, new routes,handleScheduler()in loop(),/admin/langvalue,setAPssid()fixPage_scheduler.h: new file — full scheduler backend / nouveau fichier — backend complet du programmateurPage_index.h: scheduler UI + i18n + HSV picker + animation controlsPage_general.h:send_lang_value_html()Page_style.css.h: scheduler grid styles + HSV picker styles / styles grille + styles sélecteur HSVLedStrip.h,Page_tetris.h,Page_snake.h: new animations + games / nouvelles animations + jeuxWiFiMgr.cpp,WiFiMgr.h,NTP.h,Page_network.h: bugfixesTest plan / Plan de test
esp8266:esp8266:nodemcuv2(verified: 50% flash, 94% IRAM) / Compiler avecesp8266:esp8266:nodemcuv2(vérifié : 50% flash, 94% IRAM)Closes #7
Closes #8
🤖 Generated with Claude Code