init

Dependencies:   MPU6050 PinDetect circular_buffer

Committer:
OsmanKameric
Date:
Tue Nov 07 16:35:14 2017 +0000
Revision:
0:b416214256cd
FIRST

Who changed what in which revision?

UserRevisionLine numberNew contents of line
OsmanKameric 0:b416214256cd 1 #ifndef _DATALOGGER_H
OsmanKameric 0:b416214256cd 2 #define _DATALOGGER_H
OsmanKameric 0:b416214256cd 3
OsmanKameric 0:b416214256cd 4 //#include "DataLogger.h"
OsmanKameric 0:b416214256cd 5 #include <stdint.h>
OsmanKameric 0:b416214256cd 6
OsmanKameric 0:b416214256cd 7 #define DATASIZE 20
OsmanKameric 0:b416214256cd 8
OsmanKameric 0:b416214256cd 9 using namespace std;
OsmanKameric 0:b416214256cd 10
OsmanKameric 0:b416214256cd 11
OsmanKameric 0:b416214256cd 12 //*************************************************************LOGGER**************************************************************************//
OsmanKameric 0:b416214256cd 13
OsmanKameric 0:b416214256cd 14 template<class T>
OsmanKameric 0:b416214256cd 15 class DataLogger{
OsmanKameric 0:b416214256cd 16 private:
OsmanKameric 0:b416214256cd 17
OsmanKameric 0:b416214256cd 18 T _datalist[DATASIZE];
OsmanKameric 0:b416214256cd 19 int _index;
OsmanKameric 0:b416214256cd 20
OsmanKameric 0:b416214256cd 21
OsmanKameric 0:b416214256cd 22 public:
OsmanKameric 0:b416214256cd 23
OsmanKameric 0:b416214256cd 24
OsmanKameric 0:b416214256cd 25 DataLogger(){//cout<<"Default Constructor"<<endl;
OsmanKameric 0:b416214256cd 26 for(int i=0;i<DATASIZE;i++)
OsmanKameric 0:b416214256cd 27 _datalist[i]._date=0;
OsmanKameric 0:b416214256cd 28 _index=-1;}
OsmanKameric 0:b416214256cd 29 DataLogger(T b){//cout<<"Constructor"<<endl;
OsmanKameric 0:b416214256cd 30 _index=-1;}
OsmanKameric 0:b416214256cd 31 void savelog(T templog);
OsmanKameric 0:b416214256cd 32 void print();
OsmanKameric 0:b416214256cd 33 uint16_t getsize();
OsmanKameric 0:b416214256cd 34 uint8_t position();
OsmanKameric 0:b416214256cd 35 T* getfirst();
OsmanKameric 0:b416214256cd 36 T* getlast();
OsmanKameric 0:b416214256cd 37 uint16_t getnumberOfDays();
OsmanKameric 0:b416214256cd 38 T* getLastStop();
OsmanKameric 0:b416214256cd 39
OsmanKameric 0:b416214256cd 40
OsmanKameric 0:b416214256cd 41
OsmanKameric 0:b416214256cd 42 };
OsmanKameric 0:b416214256cd 43 #endif
OsmanKameric 0:b416214256cd 44