mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2026-10-31 13:52:15 +01:00
fix: read the rolling code from NVS only until it has been written
Splitting getNextRollingCode into peek and commit opened the ShadeCodes namespace twice per command. Once a code has been written for an address lastRollingCode matches NVS, so peek uses it and only commit opens NVS. Changing the address drops back to reading NVS. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
a49fa5d953
commit
08d2cd7a0c
2 changed files with 9 additions and 2 deletions
|
|
@ -198,6 +198,9 @@ class SomfyRemote {
|
|||
protected:
|
||||
char m_remotePrefId[11] = "";
|
||||
uint32_t m_remoteAddress = 0;
|
||||
// lastRollingCode is known to match NVS for this address, so the next code
|
||||
// can be worked out without opening NVS.
|
||||
bool m_rollingCodeSynced = false;
|
||||
public:
|
||||
radio_proto proto = radio_proto::RTS;
|
||||
uint8_t gpioFlags = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue