Abstraction for the glider class
Glider.h@5:460412fc4a17, 2017-04-13 (annotated)
- Committer:
- chasefarmer2808
- Date:
- Thu Apr 13 15:10:29 2017 +0000
- Revision:
- 5:460412fc4a17
- Parent:
- 4:ff59603d9fb6
- Child:
- 6:bb82dd1618c2
saves packet count
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
chasefarmer2808 | 0:4e6b53a7bd38 | 1 | #ifndef Glider_H |
chasefarmer2808 | 0:4e6b53a7bd38 | 2 | #define Glider_H |
chasefarmer2808 | 0:4e6b53a7bd38 | 3 | |
chasefarmer2808 | 0:4e6b53a7bd38 | 4 | #include "mbed.h" |
chasefarmer2808 | 0:4e6b53a7bd38 | 5 | #include <string> |
chasefarmer2808 | 2:cc07e65227ff | 6 | #include <sstream> |
chasefarmer2808 | 0:4e6b53a7bd38 | 7 | #include "HMC5883L.h" |
chasefarmer2808 | 0:4e6b53a7bd38 | 8 | #include "BMP180.h" |
chasefarmer2808 | 0:4e6b53a7bd38 | 9 | |
chasefarmer2808 | 3:d8932a3036a8 | 10 | #define BUZZER 'b' |
chasefarmer2808 | 4:ff59603d9fb6 | 11 | #define FREQ 1.0 |
chasefarmer2808 | 3:d8932a3036a8 | 12 | |
chasefarmer2808 | 0:4e6b53a7bd38 | 13 | class Glider { |
chasefarmer2808 | 0:4e6b53a7bd38 | 14 | public: |
chasefarmer2808 | 0:4e6b53a7bd38 | 15 | Serial* dev; |
chasefarmer2808 | 1:7039ae86fe70 | 16 | Serial* xbee; |
chasefarmer2808 | 0:4e6b53a7bd38 | 17 | double heading; |
chasefarmer2808 | 0:4e6b53a7bd38 | 18 | float pressure; |
chasefarmer2808 | 0:4e6b53a7bd38 | 19 | float temp; |
chasefarmer2808 | 0:4e6b53a7bd38 | 20 | float alt; |
chasefarmer2808 | 2:cc07e65227ff | 21 | bool comm; |
chasefarmer2808 | 4:ff59603d9fb6 | 22 | bool transmitFlag; |
chasefarmer2808 | 1:7039ae86fe70 | 23 | time_t startTime; |
chasefarmer2808 | 1:7039ae86fe70 | 24 | time_t missionTime; |
chasefarmer2808 | 4:ff59603d9fb6 | 25 | uint8_t packetCount; |
chasefarmer2808 | 0:4e6b53a7bd38 | 26 | HMC5883L* hmc; |
chasefarmer2808 | 0:4e6b53a7bd38 | 27 | BMP180* bmp; |
chasefarmer2808 | 1:7039ae86fe70 | 28 | Glider(Serial* device, PinName sda, PinName scl, PinName tx, PinName rx); |
chasefarmer2808 | 2:cc07e65227ff | 29 | InterruptIn xbeeRxInt; |
chasefarmer2808 | 0:4e6b53a7bd38 | 30 | void setHeading(); |
chasefarmer2808 | 0:4e6b53a7bd38 | 31 | void setTempPress(); |
chasefarmer2808 | 1:7039ae86fe70 | 32 | void setMissionTime(); |
chasefarmer2808 | 4:ff59603d9fb6 | 33 | void setTransmitFlag(); |
chasefarmer2808 | 5:460412fc4a17 | 34 | void initSaveData(); |
chasefarmer2808 | 0:4e6b53a7bd38 | 35 | void saveTelem(); |
chasefarmer2808 | 2:cc07e65227ff | 36 | void saveData(); |
chasefarmer2808 | 1:7039ae86fe70 | 37 | void transmitPacket(); |
chasefarmer2808 | 3:d8932a3036a8 | 38 | void setCommandFlag(); |
chasefarmer2808 | 2:cc07e65227ff | 39 | void processCommand(); |
chasefarmer2808 | 0:4e6b53a7bd38 | 40 | }; |
chasefarmer2808 | 0:4e6b53a7bd38 | 41 | |
chasefarmer2808 | 1:7039ae86fe70 | 42 | #endif |