refactor: share shade remote matching in SomfyShade::findRemote

markTxPending copied the shade and linked-remote address matching from
SomfyShade::processFrame.  Both now use findRemote() so they can't drift.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
cjkas 2026-10-12 18:01:31 +02:00
parent b4d480caa0
commit 2ee7af51ab
2 changed files with 13 additions and 17 deletions

View file

@ -319,6 +319,8 @@ class SomfyShade : public SomfyRemote {
bool isInGroup();
void checkMovement();
void processFrame(somfy_frame_t &frame, bool internal = false);
// The shade itself or the linked remote with this address, else nullptr.
SomfyRemote *findRemote(uint32_t address);
void processInternalCommand(somfy_commands cmd, uint8_t repeat = 1);
void markTxPending(uint32_t seq);
void processTxEvent(const somfy_tx_event_t &evt);