[color] use own protocol counter

Overloading the frame counter causes aa race condition with the UI thread (see SEND_FAILSAFE_1S()).
This commit is contained in:
Raphael Coeffic
2021-09-18 11:57:23 +10:00
committed by Peter Feerick
parent 514796fa51
commit f401cd4a12
4 changed files with 15 additions and 6 deletions
+2
View File
@@ -39,6 +39,7 @@ class MultiRfProtocols
uint32_t scanStart = 0;
uint32_t lastScan = 0;
uint8_t currentProto = 0;
uint8_t totalProtos = 0;
MultiRfProtocols(unsigned int moduleIdx) : moduleIdx(moduleIdx) {}
@@ -78,6 +79,7 @@ class MultiRfProtocols
std::string getLastProtoLabel() const;
bool triggerScan();
uint8_t getScanProto() { return currentProto; }
bool scanReply(const uint8_t * packet = nullptr, uint8_t len = 0);
void fillList(std::function<void(const RfProto&)> addProto) const;