teamALI / Mbed 2 deprecated HB2018

Dependencies:   mbed FreeRTOS

Committer:
MasashiNomura
Date:
Tue Nov 27 05:23:44 2018 +0000
Revision:
14:76a56d517103
Parent:
9:557628b373ea
Child:
16:05b9e44889f1
Gyro???????????????

Who changed what in which revision?

UserRevisionLine numberNew contents of line
takeru0x1103 8:1ca49cb18290 1 #ifndef GYRO_H
takeru0x1103 8:1ca49cb18290 2 #define GYRO_H
takeru0x1103 8:1ca49cb18290 3
takeru0x1103 9:557628b373ea 4 #include <iostream>
takeru0x1103 9:557628b373ea 5 #include <vector>
takeru0x1103 9:557628b373ea 6 #include <string>
takeru0x1103 9:557628b373ea 7 #include <sstream>
takeru0x1103 9:557628b373ea 8 using namespace std;
MasashiNomura 14:76a56d517103 9 #include "mbed.h"
takeru0x1103 9:557628b373ea 10 #include "typedef.h"
takeru0x1103 9:557628b373ea 11
takeru0x1103 8:1ca49cb18290 12 class Gyro {
takeru0x1103 8:1ca49cb18290 13 /*
takeru0x1103 8:1ca49cb18290 14 * Varialbles
takeru0x1103 8:1ca49cb18290 15 */
MasashiNomura 14:76a56d517103 16 #define BAUD_RATE4_6AXIS 115200
takeru0x1103 9:557628b373ea 17 private:
takeru0x1103 8:1ca49cb18290 18
MasashiNomura 14:76a56d517103 19 Serial sp46Axis;
takeru0x1103 9:557628b373ea 20 float accZ;
takeru0x1103 9:557628b373ea 21 float gyroZ;
takeru0x1103 9:557628b373ea 22 float yaw;
takeru0x1103 9:557628b373ea 23 float yaw_ref;
takeru0x1103 8:1ca49cb18290 24 /*
takeru0x1103 9:557628b373ea 25 * functions
takeru0x1103 8:1ca49cb18290 26 */
takeru0x1103 9:557628b373ea 27 std::vector<std::string> split(const std::string &str, char sep);
takeru0x1103 9:557628b373ea 28 void PushBuf(UCHAR rxChar);
takeru0x1103 9:557628b373ea 29 void uartRxIntHndler46Axis();
takeru0x1103 9:557628b373ea 30 public:
MasashiNomura 14:76a56d517103 31 Gyro(PinName pinTx, PinName pinRx);
takeru0x1103 8:1ca49cb18290 32 virtual ~Gyro();
takeru0x1103 9:557628b373ea 33 float GetAngularRate();
takeru0x1103 9:557628b373ea 34 float GetAccel();
takeru0x1103 9:557628b373ea 35 float GetAngle();
takeru0x1103 9:557628b373ea 36 void SetYawRef();
takeru0x1103 8:1ca49cb18290 37
takeru0x1103 8:1ca49cb18290 38 };
takeru0x1103 8:1ca49cb18290 39
takeru0x1103 8:1ca49cb18290 40 #endif /* GYRO_H */
takeru0x1103 8:1ca49cb18290 41
takeru0x1103 8:1ca49cb18290 42