-
Notifications
You must be signed in to change notification settings - Fork 1
Fix/window handling #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v1
Are you sure you want to change the base?
Conversation
- Bei einer Sperre hat sich das komplette Modul aufgehängt - KO kipp und KO offen waren vertauscht - Der Rolladen fuhr beim Schließen des Fensters nicht auf die vorherige Position (die beim öffnen des Fensters), sondern auf die Kipp-Position zurück.
| else if (targetPosition() > positionLimit || moveToLimit) | ||
| { | ||
| _blockedPosition = targetPosition(); | ||
| if (_blockedPosition == NOTUSED) _blockedPosition = targetPosition(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hier wird die Position nur noch gespeichert, wenn man das Fenster erstmals öffnet oder kippt, nicht bei jedem Wechsel.
| else if (slat() > slatLimit || moveToLimit) | ||
| { | ||
| _blockedSlat = slat(); | ||
| if (_blockedSlat == NOTUSED) _blockedSlat = slat(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gleiches wie oben, nur für die Lamellen.
| for (uint8_t i = 1; i <= ParamSHC_CWindowOpenCount; i++) | ||
| { | ||
| _windowOpenHandlers.push_back(new WindowOpenHandler(_channelIndex, i, ParamSHC_CWindowOpenCount != i)); | ||
| _windowOpenHandlers.push_back(new WindowOpenHandler(_channelIndex, i, i == 2)); // ParamSHC_CWindowOpenCount != i)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eine der notwendigen Änderungen, damit die KO-Verwechslung gelöst wird. Mir ist aber nicht klar, warum das so funktioniert.
| logInfoP("Stop window open"); | ||
| if (_currentWindowOpenHandler != nullptr) | ||
| _currentWindowOpenHandler->stop(callContext, nextWindowOpenHandler, _positionController); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dieses darf nur beim Stop ausgeführt werden, damit wechsel zwischen offen und kipp nicht zum erneuten speichern der _blockedPosition führen.
| logIndentDown(); | ||
| } | ||
| if (_currentMode != nextMode) | ||
| if (_currentMode != nextMode && nextMode != nullptr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Das verhindert den Hänger bei einer Sperre, aber ich weiß nicht, ob man einfach so das if überspringen darf. Das musst Du entscheiden und "richtig" machen.
Ich verzichte erstmal auf Sperren.
| <op:usePart name="ModeShading" xpath="//ParameterTypes/ParameterType[@Name='NumberOfShadingEnumValue']/TypeRestriction/*" /> | ||
| </TypeRestriction> | ||
| </ParameterType> | ||
| <ParameterType Id="%AID%_PT-SHCNumChannels" Name="SHCNumChannels"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dieser Change war schon in meinem PR #4 drin, weiß nicht, warum das nochmal drin steht
| <Channel Name="MainChannel%TT%" Text="Jalousiensteuerung" Number="%TT%" Id="%AID%_CH-%TT%" Icon="blinds-horizontal"> | ||
| <Channel Id="%AID%_CH-%PREFIX%" Number="%PREFIX%" Name="ShutterControl" Text="Jalousiensteuerung" Icon="blinds-horizontal"> | ||
|
|
||
| <ParameterBlock Id="%AID%_PB-nnn" Name="Settings%TT%" Text="Allgemein" Icon="cog-outline" HelpContext="SHC-Allgemein" ShowInComObjectTree="true"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ebenso schon im PR #4
| </TypeRestriction> | ||
| </ParameterType> | ||
| </ParameterTypes> | ||
| <Parameters> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ebenso in PR #4
| #define SHC_KoCalcIndex(number) ((number >= SHC_KoCalcNumber(0) && number < SHC_KoCalcNumber(SHC_KoBlockSize)) ? (number - SHC_KoBlockOffset - (_index - 1) * (SHC_KoCWindowOpenModeActive2 - SHC_KoCWindowOpenModeActive1)) % SHC_KoBlockSize : -1) | ||
| #define SHC_KoCalcIndex(number) ((number >= SHC_KoCalcNumber(0) && number < SHC_KoCalcNumber(SHC_KoBlockSize)) ? (number - SHC_KoBlockOffset - (_isTiltHandler) * (SHC_KoCWindowOpenModeActive2 - SHC_KoCWindowOpenModeActive1)) % SHC_KoBlockSize : -1) | ||
|
|
||
| #endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Die 3 Macros musste ich anpassen, damit die Verwechslung der KO (offen <-> kipp) rückgängig gemacht wurde. Aber ich verstehe nicht, warum das nötig war und bin mir auch nicht sicher, dass ich schon alle Fälle durchgetestet habe. Hier muss der Fachmann ran, um es richtig zu machen.
Dies ist kein PR für den direkten Merge, ich habe nur versucht, die für mich kritischen Fehler zum laufen zu bringen und bin mir nicht sicher, ob die Lösungen in Kombination mit den restlichen Funktionalitäten tragfähig sind.
Ich versuche im Code zu kommentieren, was einzelne Änderungen sollen.
Die Korrektur löst 3 Probleme:
Ich wollte nur, dass Du siehst, wo ich eingreifen musste, eher als Ideensammlung, da ich nicht glaube, dass das als Lösung reicht.
Gruß, Waldemar