Skip to content

Conversation

@mumpf
Copy link

@mumpf mumpf commented Oct 4, 2025

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:

  1. Das setzen einer Sperre führte zum Hänger des gesamten Gerätes, das ist raus, aber wahrscheinlich geht es besser, ich steige nur nicht durch, was zu machen wäre.
  2. die KOs für offen und kipp waren vertauscht
  3. Wenn man mehrmals zwischen kipp und offen wechselt, fährt der Rollladen beim Schließen nicht in die Position vor dem öffnen, sondern in eine der kipp- oder offen-Positionen.

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

Waldemar Porscha added 3 commits August 30, 2025 17:07
- 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();
Copy link
Author

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();
Copy link
Author

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));
Copy link
Author

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);
}
Copy link
Author

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)
Copy link
Author

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">
Copy link
Author

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">
Copy link
Author

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>
Copy link
Author

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
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants