Miscellaneous Library, read Encoder etc.

Dependents:   My_Libraries

Committer:
altb
Date:
Wed Mar 06 14:38:04 2019 +0000
Revision:
2:1c5c71a6fac9
Parent:
0:3312872854c4
.....

Who changed what in which revision?

UserRevisionLine numberNew contents of line
altb 0:3312872854c4 1 #include "mbed.h"
altb 0:3312872854c4 2 #include "Signal.h"
altb 0:3312872854c4 3 #define buffer_size 255
altb 0:3312872854c4 4 #include "string"
altb 0:3312872854c4 5 #include "PID_Cntrl.h"
altb 0:3312872854c4 6 #define EARTH_RADIUS 6378137
altb 0:3312872854c4 7
altb 0:3312872854c4 8 class GPS{
altb 0:3312872854c4 9 public:
altb 0:3312872854c4 10 GPS(PinName,PinName,float);
altb 0:3312872854c4 11 virtual ~GPS();
altb 0:3312872854c4 12 void get_data(void);
altb 0:3312872854c4 13 double pos_xyz[3];
altb 0:3312872854c4 14 void get_position(void);
altb 0:3312872854c4 15 RawSerial logGPS;
altb 0:3312872854c4 16 void return_string(string *);
altb 0:3312872854c4 17 private:
altb 0:3312872854c4 18 Signal signal;
altb 0:3312872854c4 19 Thread thread;
altb 0:3312872854c4 20 Ticker ticker;
altb 0:3312872854c4 21 Mutex mutex; // mutex to lock critical sections
altb 0:3312872854c4 22 double pos0_xyz[3];
altb 0:3312872854c4 23 uint8_t rx_in;
altb 0:3312872854c4 24 char c;
altb 0:3312872854c4 25 bool buffer_filled;
altb 0:3312872854c4 26 void sendSignal();
altb 0:3312872854c4 27 void Rx_interrupt();
altb 0:3312872854c4 28 char buf[buffer_size];
altb 0:3312872854c4 29 string str;
altb 0:3312872854c4 30 double ph_th0[2];
altb 0:3312872854c4 31
altb 0:3312872854c4 32 };