V1dev add shadow edge tracking - #9
Open
estebanri87 wants to merge 34 commits into
Open
Conversation
Apply naming rules: 'Status' prefix only for pure status KOs (TransmitFlag=Enabled), 'Sperren' prefix at front for lock-related parameters. - %CC%047: 'Sperren Kanal freigeben' - %CC%048: 'Status aktiver Modus freigeben' - %CC%051: 'Status Beschattung aktiv freigeben' - %CC%052: 'Status Beschattung bereit freigeben' - %CC%055: 'Status Fenster offen freigeben' - %CC%056: 'Sperren Fenster offen freigeben' - %CC%057: 'Status Fenster gekippt freigeben' - %CC%058: 'Sperren Fenster gekippt freigeben' Add %CC%050/051/052 to channel-level KoFreigabe block (channel-wide shading KOs)
…ters - PPP+53 renamed to 'Sperren Beschattungsmodus freigeben' (guards Lock + LockActive KOs only) - PPP+54 renamed to 'Status Beschattungsmodus bereit freigeben' - PPP+55 added at Offset=31/BitOffset=7: 'Status Beschattungsmodus freigeben' (guards Modus-Aktiv KO) - Update choose blocks: PPP+53 -> PPP+1+2, PPP+55 -> PPP+0 - Remove %CC%050/051/052 from ModeShading KO-enable section (moved to channel level)
Wrap window open/tilt status and lock KOs in choose blocks controlled by %CC%055/%CC%056/%CC%057/%CC%058 parameters. Add KO-enable section to window mode parameter tab.
…oof guard with diagnostic bits
…ow edge tracking)
- theta_krit: remove incorrect 90-atan2f() conversion; use atan2f() directly (angle convention from vertical, not horizontal) - Dachflaeche: use fabsf(sinf(...)) for sin_alpha to handle negative inclination values correctly (cases 4, 5)
…edge modes - Mode 2: add MinChangeForSlatAdaption hysteresis guard before setAutomaticSlat - Mode 5: apply OffsetSlatPosition offset to slatPercent before clamping
- templ.xml: rename Text attribute, comments, and ParameterRef comment to 'Fassadenneigung/Fensterneigung' to reflect that the inclination applies to both vertical facades and tilted windows (Dachfläche)
…n/Max)' - New mode combining shadow-edge tracking with configurable position and slat clip limits (Min/Max) - _lastSentShadowPos stores unclipped value for correct hysteresis - Slat clipping uses min/max of SlatLowSunPosition/SlatHighSunPosition regardless of value order - Position clipping ignored when MinClipPos > MaxClipPos - Mode 4 renamed to 'Geometrische Positionsnachführung' - Mode 5 renamed to 'Geometrische Positions- und Lamellennachführung' - PT-PenetrationDepth range changed: 1-200 to 10-255 - ModeShading parameter block increment changed: 50 to 52 (breaking)
- ReleaseNotes: list all v0.6.3 changes - Applikationsbeschreibung: add mode 6 description and parameter docs - Help_de: regenerate all context help files (new, modified, deleted) to match renamed and new parameters
- Jalousie: 7 modes (None, Standard, Slat tracking min/max, Geo position, Geo position min/max, Geo position+slat, Geo position+slat min/max) - Mode 3 replaced: 'Slat tracking expert' -> 'Geo position tracking' (penetration depth + fixed slat position); breaking change for existing ETS projects using mode 3 - Mode 4: new 'Geo position tracking (min/max)' with min/max clip via PPP+65/66; _lastSentShadowPos stored unclipped - Modes 5 and 6: unchanged logic, only renamed in enums - Rollo: 3 modes (None, Geo position, Geo position min/max); mode condition changed from == 1 to >= 1; mode 2 adds min/max clip - Fix typo in parameter text: 'Lamellenstellenung' -> 'Positions- und Lamellennachfuehrung' - Fix: critical tilt angle (theta_krit) was computed as 90-atan2(..), corrected to atan2(..) directly - Fix: sin_alpha computed without fabsf for pitched surfaces, now fixed - Fix: OffsetSlatPosition not applied in mode 5, now applied - Fix: hysteresis (MinChangeForSlatAdaption) missing in mode 2, now added - Change: max penetration depth range extended from 1-200 to 10-255 cm
… modes - Update mode list for jalousie (7 options) and rollo (3 options) - Fix section heading typo: 'Lamellenstellenung' -> 'Positions- und Lamellennachfuehrung' - Remove reference to 'Lamellennachfuehrung (Experte)' from facade tilt description - Update skip-text references to match new parameter names - Min/Max position skip-texts now also reference rollo position mode - Add new context help file SHC-Positions-und-Lamellennachfuehrung.md - Remove obsolete context help file with typo in filename (SHC-Lamellenstellenung-an-Sonnenstand-anpassen.md) - Update SHC-Positionsnachfuehrung.md, SHC-Min/Max-Position-Begrenzung.md, SHC-FassadenneigungFensterneigung.md
ModeShading::allowed() correctly set the _notAllowedReason diagnostic flag for WindowOpen (reason 14), but did not include the window-open state in the actual return value. As a result, shading became active again after the manual-mode reactivation wait time elapsed, even though the window was open. Add isWindowTiltActive to CallContext to distinguish open vs. tilted window. Add isTiltHandler() getter to WindowOpenHandler. In ModeShading::allowed(), return false when window is open and windowOpenAllowed() is false, or when window is tilted and windowTiltAllowed() is false.
When shading is inactive and measurement values become favorable again after a previous under-shoot (_needWaitTime == true), (re)arm the start wait time so a short favorable spell does not immediately reactivate shading. Previously the start wait time was only set in stop(); once it had elapsed while values stayed unfavorable, the next favorable change reactivated shading instantly, bypassing the configured start delay.
…tion Both parameters (PPP+82 and PPP+81, added in v0.6.4) were placed at byte offsets that fall inside existing 4-byte IEEE-754 float parameters: RequireFacadeHit (1 B) at offset 16 inside UVIMin (4 B, offsets 15-18) SlatTableMinElevation (1 B) at offset 34 inside RoomTemperaturMinimum (4 B, offsets 33-36) The visibility conditions for the two pairs are independent, so both parameters in each pair could be active simultaneously, causing silent value corruption at runtime. Fix: grow the shading union from 528 to 544 bits (66 to 68 bytes) and move both 1-byte parameters to the two new tail bytes (offsets 66 and 67). Update the part increment in templ.xml accordingly (66 -> 68). The AfterShading/HeadingFallback overlaps remain intentional (mutually-exclusive choose/when union aliasing, same size). Breaking change: shading parameter block layout changed (68 bytes/ 544 bits per shading instance). Existing ETS projects must be re-parametrized (already required by other v0.6.4 breaking changes).
…-shading transitions
…resis (20->50) parameters
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.
Fassadenneigung, Schattenkantennachführung, Experten-Lamellennachführung und tabellenbasierte Lamellennachführung
Zusammenfassung
Dieser PR fügt mehrere neue Beschattungsmodi und Lamellennachführungs-Strategien auf Basis der
geometrischen Sonnenstandsberechnung hinzu, erweitert die KO-Freigabe-Optionen und behebt eine Reihe von
Berechnungs- und Speicherlayout-Fehlern, die bei der Umsetzung dieser Features gefunden wurden.
Neue Features
(Dachfenster / geneigte Fassaden).
Nein → Standard → Lamellenführung (Min/Max) → Geo. Positionsnachführung → Geo. Positionsnachführung (Min/Max) → Geo. Positions- und Lamellennachführung → Geo. Positions- und Lamellennachführung (Min/Max).Min./Max.-Begrenzung für Position und Lamellenstellung. Wenn Min. Position > Max. Position konfiguriert
ist, wird die Positionsbegrenzung ignoriert; die Lamellenbegrenzung verwendet automatisch min/max der
beiden Werte (Reihenfolge egal).
Verhalten).
Blendschutz.
Interpolation (Standardwerte gemäß Warema-Referenztabelle).
bei direktem Sonnenlicht (Profilwinkel > 0°), pro Kanal konfigurierbar.
gleichzeitig nach ihrer Winkeldifferenz zur Sonne gewichtet, statt nur die zwei nächstliegenden Sensoren
linear zu interpolieren. Liefert stabilere Werte bei mehreren Sensoren.
ein-/ausgeblendet werden (Sperren Kanal, Status aktiver Modus, Aktorrückmeldung, Beschattung ein/aus,
Beschattung aktiv, Beschattungsbereitschaft, Handbetrieb Schalten/Position, Fenster offen/gekippt Status
und Sperren), inklusive KO-Freigabe je Beschattungsmodus (Sperren / Bereitschaft / Status Aktiv).
Fixes
„Lamellenwinkel vollständig geschlossen" (Winkel von der Vertikalen) statt korrekt
90° − dieser Wert(Winkel von der Waagrechten bis vollständig geschlossen). Vorher wurden Lamellen fast immer auf 100%
(bzw. den Clip-Maximalwert) gesetzt, jetzt werden physikalisch korrekte Zwischenstellungen berechnet.
theta_krit) korrigiert: wurde als90° − atan2(...)berechnet statt korrektdirekt
atan2(...)(Winkelkonvention zur Senkrechten).sin_alphabei Dachflächen-Orientierung wurde ohne Betrag berechnet, was bei negativen Neigungswinkelnzu falschen Positionen führte (jetzt
fabsf).OffsetSlatPositionwird jetzt auch in Modus 5 angewendet (wurde zuvor ignoriert).MinChangeForSlatAdaption) in Modus 2 (Standard-Lamellennachführung) vor dem Setzender Lamellenstellung ergänzt.
Beschattungsmodus aktiv ist, sobald alle anderen Bedingungen erfüllt sind (vorher fälschlich nur bereit,
wenn bereits ein Beschattungsmodus aktiv war).
falseinitialisiert(vorher uninitialisierter Wert auf dem Bus sichtbar).
und der Tabellen-Höhenwinkel-Parameter (
SlatTableMinElevation) überlappten fälschlicherweise die4-Byte-Float-Parameter „Minimaler UV-Index" bzw. „Minimale Raumtemperatur" und überschrieben sich
gegenseitig. Beide wurden auf eigene Bytes am Blockende verschoben.
ModeNight-Stop-Log-Message korrigiert (es wurde die Start- statt derStop-Position/Lamelle geloggt).
Beschattung-zu-Beschattung-Wechseln, damit „Position vor Beschattungsstart" die tatsächliche Position vor
der gesamten Beschattungsphase widerspiegelt und nicht die des letzten Zwischenmodus-Wechsels.
nicht mehr trotz offenem Fenster, wenn die manuelle Wartezeit abläuft.
erhöht.
Breaking Changes / Migrationshinweise
über 0.6.3 und 0.6.4 hinweg). Betrifft Kanäle mit zwei oder mehr konfigurierten Beschattungsmodi —
bestehende ETS-Projekte müssen neu parametriert werden.
2 → 3) — bestehende ETS-Projekte mitdieser Einstellung müssen neu parametriert werden.
Lamellennachführung".
Lamellennachführung".
unverändert, nur der ETS-Dropdown-Text ändert sich nach einem knxprod-Update).
Dokumentation
Applikationsbeschreibung-ShutterController.mdund Help_de-Kontexthilfen für alle neuen Parameter undModi aktualisiert.
ReleaseNotes.mdaktualisiert.