mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2026-10-31 13:52:15 +01:00
refactor: move sun and wind automation into ShadeSensors
The sun and wind timers were spread over processFrame, checkMovement and processInternalCommand. ShadeSensors now holds them and decides when the weather extends or retracts a shade, when turning the sun flag on moves it, and when wind blocks a remote Down. Each caller still sets the targets itself, so no shade moves differently yet. The timers are now 32-bit like millis(). As 64-bit values holding a 32-bit millis() they fired at once after the rollover every 49.7 days. The debug logs of each timer go: they were compiled out at CORE_DEBUG_LEVEL 3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
0eb0e63631
commit
8276c1c3cd
6 changed files with 319 additions and 129 deletions
|
|
@ -109,7 +109,7 @@ lib_deps =
|
|||
platform = native
|
||||
test_framework = unity
|
||||
test_build_src = yes
|
||||
build_src_filter = -<*> +<Utils.cpp> +<SomfyFrame.cpp> +<JsonFormatter.cpp> +<ShadeMotion.cpp> +<TxBuffer.cpp> +<RadioScheduler.cpp>
|
||||
build_src_filter = -<*> +<Utils.cpp> +<SomfyFrame.cpp> +<JsonFormatter.cpp> +<ShadeMotion.cpp> +<ShadeSensors.cpp> +<TxBuffer.cpp> +<RadioScheduler.cpp>
|
||||
build_flags =
|
||||
-std=gnu++17
|
||||
-Isrc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue