Skip to content

Commit

Permalink
actually commit the files
Browse files Browse the repository at this point in the history
  • Loading branch information
danverstom committed Feb 4, 2023
1 parent e641f35 commit fa981d0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 16 deletions.
9 changes: 2 additions & 7 deletions DynamicFifo.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define DYNAMIC_FIFO_H

#include <iostream>

#include "Shared.h"

template<class T>
class DynamicFifo { /// essentially a circular fifo
Expand All @@ -14,11 +14,6 @@ class DynamicFifo { /// essentially a circular fifo


public:
enum Fifo_STATUS {
Fifo_FULL,
Fifo_EMPTY,
Fifo_GOOD
};
/**
* @brief Construct a new Fifo object
* @param s
Expand Down Expand Up @@ -164,7 +159,7 @@ class DynamicFifo { /// essentially a circular fifo
~DynamicFifo() { delete[] elem; } // destructor
};

#include "dynamicFifo.tpp" // implementation file
#include "DynamicFifo.tpp" // implementation file


#endif //DYNAMIC_FIFO_H
4 changes: 2 additions & 2 deletions DynamicFifo.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ T& DynamicFifo<T>::atFifoIndex(int i) const{


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

template<class T>
typename DynamicFifo<T>::Fifo_STATUS DynamicFifo<T>::fifo_status() const {
Fifo_STATUS DynamicFifo<T>::fifo_status() const {
if (nextFree==endPointer) {
return Fifo_STATUS::Fifo_EMPTY; // fifo empty
}
Expand Down
8 changes: 1 addition & 7 deletions Fifo.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
#define FIFO_H

#include <iostream>


#include "Shared.h"


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


public:
enum Fifo_STATUS {
Fifo_FULL,
Fifo_EMPTY,
Fifo_GOOD
};
/**
* @brief Construct a new Fifo object
* @param s
Expand Down
6 changes: 6 additions & 0 deletions Shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,10 @@
#ifndef ARDUINO_LSM6DSO32_SHARED_H
#define ARDUINO_LSM6DSO32_SHARED_H

enum Fifo_STATUS {
Fifo_FULL,
Fifo_EMPTY,
Fifo_GOOD
};

#endif //ARDUINO_LSM6DSO32_SHARED_H

0 comments on commit fa981d0

Please sign in to comment.