mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2026-10-31 13:52:15 +01:00
refactor: pin which radio job holds a shade's simulated movement
Review flagged the outer My/Favorite losing to the nested Up/Down it queues. Every such nested send is from a simMy shade, where the Up/Down is what starts the motor, so the behaviour stays. The hold moves into TxHold in ShadeMotion with a comment explaining the order and unit tests pinning it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
a212d562cb
commit
0ba5260d1d
5 changed files with 118 additions and 18 deletions
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include "SomfyFrame.h"
|
||||
#include "TxBuffer.h"
|
||||
#include "ShadeMotion.h"
|
||||
enum class group_types : byte {
|
||||
channel = 0x00
|
||||
};
|
||||
|
|
@ -240,9 +241,8 @@ class SomfyShade : public SomfyRemote {
|
|||
bool settingTiltPos = false;
|
||||
uint32_t awaitMy = 0;
|
||||
// Radio job that set the shade moving. The simulated position is held
|
||||
// until it goes on air. 0 when nothing is waiting.
|
||||
uint32_t txPendingSeq = 0;
|
||||
uint32_t txPendingSince = 0;
|
||||
// until it goes on air.
|
||||
TxHold txHold;
|
||||
// Stop sent when the simulated target was reached. If it never goes on
|
||||
// air the motor runs on to its end limit. 0 once it is on air.
|
||||
uint32_t txStopSeq = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue