mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-28 00:06:12 +02:00
included dev-control again
This commit is contained in:
parent
b34e5a7416
commit
5b39d38d86
4 changed files with 62 additions and 28 deletions
|
@ -17,11 +17,11 @@ class CommQueue {
|
|||
|
||||
void addImportant(Inverter<> *iv, uint8_t cmd, bool delOnPop = true) {
|
||||
dec(&mRdPtr);
|
||||
mQueue[mRdPtr] = queue_s(iv, cmd, delOnPop);
|
||||
mQueue[mRdPtr] = queue_s(iv, cmd, delOnPop, true);
|
||||
}
|
||||
|
||||
void add(Inverter<> *iv, uint8_t cmd, bool delOnPop = true) {
|
||||
mQueue[mWrPtr] = queue_s(iv, cmd, delOnPop);
|
||||
mQueue[mWrPtr] = queue_s(iv, cmd, delOnPop, false);
|
||||
inc(&mWrPtr);
|
||||
}
|
||||
|
||||
|
@ -31,10 +31,11 @@ class CommQueue {
|
|||
uint8_t cmd;
|
||||
uint8_t attempts;
|
||||
bool delOnPop;
|
||||
bool isDevControl;
|
||||
uint32_t ts;
|
||||
queue_s() {}
|
||||
queue_s(Inverter<> *i, uint8_t c, bool d) :
|
||||
iv(i), cmd(c), attempts(5), ts(0), delOnPop(d) {}
|
||||
queue_s(Inverter<> *i, uint8_t c, bool d, bool dev) :
|
||||
iv(i), cmd(c), attempts(5), ts(0), delOnPop(d), isDevControl(dev) {}
|
||||
};
|
||||
|
||||
protected:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue