mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2026-10-31 13:52:15 +01:00
refactor: hold shade settings in ShadeSettings and RemoteSettings
The shade behaviour module (SHADE_BEHAVIOUR_PLAN.md, PR B) reads its settings through read-only structs, so they get one home each: RemoteSettings (flipCommands, bitLength, repeats) under SomfyRemote, shared with groups, and ShadeSettings (types, travel times, step size, flipPosition, simMy, sunSensor) under SomfyShade. Both are base structs, so shade->upTime and group->repeats keep working. A shade's flags byte is split by owner: simMy and sunSensor are settings, light is a field, and the sun flag, sunny, windy, demo mode and lighted bits are stateFlags. getFlags()/setFlags() put the byte together and take it apart for the config file, JSON, MQTT, events and group flags, so nothing saved or sent changes. Groups keep their own flags byte. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
8a13e0c3a9
commit
fa7aaf0d49
13 changed files with 207 additions and 67 deletions
10
GLOSSARY.md
10
GLOSSARY.md
|
|
@ -60,6 +60,16 @@ The per-shade switch that lets the sun move a shade. While it is on, lasting sun
|
|||
**Extend / retract**
|
||||
Where the weather sends a shade: extend to its favorite, or fully when it has none; retract fully. A tilt-only shade extends and retracts its tilt, every other shade its lift.
|
||||
|
||||
**ShadeSettings**
|
||||
What the user sets up for a shade and its behaviour only reads: shade and tilt type, travel times, step size, flip position, simulated My and sun sensor.
|
||||
_Avoid_: config (the whole shade model is saved in the config file)
|
||||
|
||||
**RemoteSettings**
|
||||
What shades and groups share about how their frames go on air: flip commands, bit length and repeats.
|
||||
|
||||
**Flags**
|
||||
The byte a shade is saved and sent with. Its sun sensor, light and simulated My bits are settings; its sun flag, sunny, windy and demo mode bits are state. A group's flags are its shades' flags together.
|
||||
|
||||
## Entry points and outputs
|
||||
|
||||
**Entry point**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue