fix statistics

- based on 0.8.65!
This commit is contained in:
rejoe2 2024-01-26 11:31:21 +01:00 committed by GitHub
parent 1118407019
commit 626ca86d0d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 29 additions and 64 deletions

View file

@ -18,8 +18,6 @@
template <uint8_t N=100>
class CommQueue {
public:
CommQueue() {}
void addImportant(Inverter<> *iv, uint8_t cmd) {
dec(&mRdPtr);
mQueue[mRdPtr] = queue_s(iv, cmd, true);
@ -34,12 +32,12 @@ class CommQueue {
mQueue[mWrPtr] = queue_s(iv, cmd, false);
}
uint8_t getFillState(void) {
uint8_t getFillState(void) const {
//DPRINTLN(DBG_INFO, "wr: " + String(mWrPtr) + ", rd: " + String(mRdPtr));
return abs(mRdPtr - mWrPtr);
}
uint8_t getMaxFill(void) {
uint8_t getMaxFill(void) const {
return N;
}