Skip to content

Commit fa981d0

Browse files
committedFeb 4, 2023
actually commit the files
1 parent e641f35 commit fa981d0

File tree

4 files changed

+11
-16
lines changed

4 files changed

+11
-16
lines changed
 

‎DynamicFifo.h

+2-7
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#define DYNAMIC_FIFO_H
33

44
#include <iostream>
5-
5+
#include "Shared.h"
66

77
template<class T>
88
class DynamicFifo { /// essentially a circular fifo
@@ -14,11 +14,6 @@ class DynamicFifo { /// essentially a circular fifo
1414

1515

1616
public:
17-
enum Fifo_STATUS {
18-
Fifo_FULL,
19-
Fifo_EMPTY,
20-
Fifo_GOOD
21-
};
2217
/**
2318
* @brief Construct a new Fifo object
2419
* @param s
@@ -164,7 +159,7 @@ class DynamicFifo { /// essentially a circular fifo
164159
~DynamicFifo() { delete[] elem; } // destructor
165160
};
166161

167-
#include "dynamicFifo.tpp" // implementation file
162+
#include "DynamicFifo.tpp" // implementation file
168163

169164

170165
#endif //DYNAMIC_FIFO_H

‎DynamicFifo.tpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ T& DynamicFifo<T>::atFifoIndex(int i) const{
4949

5050

5151
template<class T>
52-
typename DynamicFifo<T>::Fifo_STATUS DynamicFifo<T>::push(const T& item) {
52+
Fifo_STATUS DynamicFifo<T>::push(const T& item) {
5353
if (fifo_status()==Fifo_STATUS::Fifo_FULL) {
5454
// throw std::length_error("NA"); // throw does not work with arduino :(
5555
return Fifo_STATUS::Fifo_FULL; // status code
@@ -121,7 +121,7 @@ T DynamicFifo<T>::peekFront(int i) const {
121121
}
122122

123123
template<class T>
124-
typename DynamicFifo<T>::Fifo_STATUS DynamicFifo<T>::fifo_status() const {
124+
Fifo_STATUS DynamicFifo<T>::fifo_status() const {
125125
if (nextFree==endPointer) {
126126
return Fifo_STATUS::Fifo_EMPTY; // fifo empty
127127
}

‎Fifo.h

+1-7
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
#define FIFO_H
33

44
#include <iostream>
5-
6-
5+
#include "Shared.h"
76

87

98
template<class T, unsigned int sz>
@@ -16,11 +15,6 @@ class Fifo { /// essentially a circular fifo
1615

1716

1817
public:
19-
enum Fifo_STATUS {
20-
Fifo_FULL,
21-
Fifo_EMPTY,
22-
Fifo_GOOD
23-
};
2418
/**
2519
* @brief Construct a new Fifo object
2620
* @param s

‎Shared.h

+6
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,10 @@
55
#ifndef ARDUINO_LSM6DSO32_SHARED_H
66
#define ARDUINO_LSM6DSO32_SHARED_H
77

8+
enum Fifo_STATUS {
9+
Fifo_FULL,
10+
Fifo_EMPTY,
11+
Fifo_GOOD
12+
};
13+
814
#endif //ARDUINO_LSM6DSO32_SHARED_H

0 commit comments

Comments
 (0)