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@17:f9610f3cfa1b, 2018-11-30 (annotated)
- Committer:
- takeru0x1103
- Date:
- Fri Nov 30 05:24:27 2018 +0000
- Revision:
- 17:f9610f3cfa1b
- Parent:
- 16:05b9e44889f1
1130
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; |
MasashiNomura | 14:76a56d517103 | 9 | #include "mbed.h" |
takeru0x1103 | 9:557628b373ea | 10 | #include "typedef.h" |
takeru0x1103 | 9:557628b373ea | 11 | |
takeru0x1103 | 17:f9610f3cfa1b | 12 | class Gyro { |
takeru0x1103 | 17:f9610f3cfa1b | 13 | private: |
takeru0x1103 | 17:f9610f3cfa1b | 14 | Serial sp46Axis; // |
takeru0x1103 | 16:05b9e44889f1 | 15 | INT16 gyroZ; |
takeru0x1103 | 9:557628b373ea | 16 | float yaw; |
takeru0x1103 | 9:557628b373ea | 17 | float yaw_ref; |
takeru0x1103 | 17:f9610f3cfa1b | 18 | // |
takeru0x1103 | 9:557628b373ea | 19 | void PushBuf(UCHAR rxChar); |
takeru0x1103 | 9:557628b373ea | 20 | void uartRxIntHndler46Axis(); |
takeru0x1103 | 9:557628b373ea | 21 | public: |
MasashiNomura | 14:76a56d517103 | 22 | Gyro(PinName pinTx, PinName pinRx); |
takeru0x1103 | 17:f9610f3cfa1b | 23 | virtual ~Gyro(); |
takeru0x1103 | 17:f9610f3cfa1b | 24 | short GetAngularRate(); |
takeru0x1103 | 17:f9610f3cfa1b | 25 | float GetAngle(); |
takeru0x1103 | 17:f9610f3cfa1b | 26 | void SetYawRef(); |
takeru0x1103 | 8:1ca49cb18290 | 27 | }; |
takeru0x1103 | 8:1ca49cb18290 | 28 | |
takeru0x1103 | 17:f9610f3cfa1b | 29 | #endif |
takeru0x1103 | 8:1ca49cb18290 | 30 | |
takeru0x1103 | 8:1ca49cb18290 | 31 |