You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
424 B

#ifndef MY_QUEUE_H
#define MY_QUEUE_H
#define TEMP_QUEUE_LENGTH 58
#include <Arduino.h>
class Queue {
private:
byte list[TEMP_QUEUE_LENGTH];
byte queue[TEMP_QUEUE_LENGTH];
byte readIndex = 0;
byte writeIndex = 0;
public:
Queue();
void init();
void push(byte value);
byte pop();
byte * clone();
byte getMax();
byte getMin();
byte lookup(byte index);
};
#endif