teamALI / Mbed 2 deprecated HB2018

Dependencies:   mbed FreeRTOS

Committer:
takeru0x1103
Date:
Sat Dec 01 14:03:08 2018 +0000
Revision:
18:5aa48aec9cae
Parent:
Gyro.h@17:f9610f3cfa1b
Child:
19:4b0fe9a5ec38
??????????PID????????????

Who changed what in which revision?

UserRevisionLine numberNew contents of line
takeru0x1103 18:5aa48aec9cae 1 #ifndef __IMU_H__
takeru0x1103 18:5aa48aec9cae 2 #define __IMU_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 18:5aa48aec9cae 12 class Imu {
takeru0x1103 17:f9610f3cfa1b 13 private:
takeru0x1103 18:5aa48aec9cae 14 const float cGYRO_RESO=131.0;
takeru0x1103 18:5aa48aec9cae 15 Serial sp46Axis; //
takeru0x1103 16:05b9e44889f1 16 INT16 gyroZ;
takeru0x1103 18:5aa48aec9cae 17 INT16 gyro_ref;
takeru0x1103 9:557628b373ea 18 float yaw;
takeru0x1103 9:557628b373ea 19 float yaw_ref;
takeru0x1103 18:5aa48aec9cae 20 float yawOfset;
takeru0x1103 18:5aa48aec9cae 21
takeru0x1103 17:f9610f3cfa1b 22 //
takeru0x1103 9:557628b373ea 23 void PushBuf(UCHAR rxChar);
takeru0x1103 9:557628b373ea 24 void uartRxIntHndler46Axis();
takeru0x1103 18:5aa48aec9cae 25 float wrapAroungGuard(float iYaw);
takeru0x1103 9:557628b373ea 26 public:
takeru0x1103 18:5aa48aec9cae 27 Imu(PinName pinTx, PinName pinRx);
takeru0x1103 18:5aa48aec9cae 28 virtual ~Imu();
takeru0x1103 18:5aa48aec9cae 29 float GetGyroZ();
takeru0x1103 18:5aa48aec9cae 30 float GetYaw();
takeru0x1103 18:5aa48aec9cae 31 void CalYaw();
takeru0x1103 18:5aa48aec9cae 32 void CalGyro();
takeru0x1103 8:1ca49cb18290 33 };
takeru0x1103 8:1ca49cb18290 34
takeru0x1103 17:f9610f3cfa1b 35 #endif
takeru0x1103 8:1ca49cb18290 36
takeru0x1103 8:1ca49cb18290 37