Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Gyro.h@9:557628b373ea, 2018-11-27 (annotated)
- Committer:
- takeru0x1103
- Date:
- Tue Nov 27 02:33:09 2018 +0000
- Revision:
- 9:557628b373ea
- Parent:
- 8:1ca49cb18290
- Child:
- 14:76a56d517103
UART?????????????????
Who changed what in which revision?
User | Revision | Line number | New 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; |
takeru0x1103 | 9:557628b373ea | 9 | #include "typedef.h" |
takeru0x1103 | 9:557628b373ea | 10 | |
takeru0x1103 | 8:1ca49cb18290 | 11 | class Gyro { |
takeru0x1103 | 8:1ca49cb18290 | 12 | /* |
takeru0x1103 | 8:1ca49cb18290 | 13 | * Varialbles |
takeru0x1103 | 8:1ca49cb18290 | 14 | */ |
takeru0x1103 | 9:557628b373ea | 15 | private: |
takeru0x1103 | 8:1ca49cb18290 | 16 | |
takeru0x1103 | 9:557628b373ea | 17 | float accZ; |
takeru0x1103 | 9:557628b373ea | 18 | float gyroZ; |
takeru0x1103 | 9:557628b373ea | 19 | float yaw; |
takeru0x1103 | 9:557628b373ea | 20 | float yaw_ref; |
takeru0x1103 | 8:1ca49cb18290 | 21 | /* |
takeru0x1103 | 9:557628b373ea | 22 | * functions |
takeru0x1103 | 8:1ca49cb18290 | 23 | */ |
takeru0x1103 | 9:557628b373ea | 24 | std::vector<std::string> split(const std::string &str, char sep); |
takeru0x1103 | 9:557628b373ea | 25 | void PushBuf(UCHAR rxChar); |
takeru0x1103 | 9:557628b373ea | 26 | void uartRxIntHndler46Axis(); |
takeru0x1103 | 9:557628b373ea | 27 | public: |
takeru0x1103 | 9:557628b373ea | 28 | Gyro(); |
takeru0x1103 | 8:1ca49cb18290 | 29 | virtual ~Gyro(); |
takeru0x1103 | 9:557628b373ea | 30 | float GetAngularRate(); |
takeru0x1103 | 9:557628b373ea | 31 | float GetAccel(); |
takeru0x1103 | 9:557628b373ea | 32 | float GetAngle(); |
takeru0x1103 | 9:557628b373ea | 33 | void SetYawRef(); |
takeru0x1103 | 8:1ca49cb18290 | 34 | |
takeru0x1103 | 8:1ca49cb18290 | 35 | }; |
takeru0x1103 | 8:1ca49cb18290 | 36 | |
takeru0x1103 | 8:1ca49cb18290 | 37 | #endif /* GYRO_H */ |
takeru0x1103 | 8:1ca49cb18290 | 38 | |
takeru0x1103 | 8:1ca49cb18290 | 39 |