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.
XBee.h@0:7e177131730d, 2015-07-02 (annotated)
- Committer:
- inst
- Date:
- Thu Jul 02 00:58:13 2015 +0000
- Revision:
- 0:7e177131730d
- Child:
- 1:7f0b90daef14
receive
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| inst | 0:7e177131730d | 1 | #ifndef INCLUDED_XBEE_H |
| inst | 0:7e177131730d | 2 | #define INCLUDED_XBEE_H |
| inst | 0:7e177131730d | 3 | |
| inst | 0:7e177131730d | 4 | #include "mbed.h" |
| inst | 0:7e177131730d | 5 | #include "I2CDevice.h" |
| inst | 0:7e177131730d | 6 | |
| inst | 0:7e177131730d | 7 | class XBee : public I2CDevice{ |
| inst | 0:7e177131730d | 8 | public: |
| inst | 0:7e177131730d | 9 | XBee( I2C* i2c, char address ); |
| inst | 0:7e177131730d | 10 | |
| inst | 0:7e177131730d | 11 | virtual void write(){} |
| inst | 0:7e177131730d | 12 | virtual void read(); |
| inst | 0:7e177131730d | 13 | |
| inst | 0:7e177131730d | 14 | // todo:get系を追加 |
| inst | 0:7e177131730d | 15 | // todo:取得した値保存変数 |
| inst | 0:7e177131730d | 16 | |
| inst | 0:7e177131730d | 17 | int getMoveDirection(){ |
| inst | 0:7e177131730d | 18 | return mMoveDirection; |
| inst | 0:7e177131730d | 19 | } |
| inst | 0:7e177131730d | 20 | |
| inst | 0:7e177131730d | 21 | float getMoveCoeff(){ |
| inst | 0:7e177131730d | 22 | return mMoveCoeff; |
| inst | 0:7e177131730d | 23 | } |
| inst | 0:7e177131730d | 24 | |
| inst | 0:7e177131730d | 25 | float getMagRoll(){ |
| inst | 0:7e177131730d | 26 | return mMagRoll; |
| inst | 0:7e177131730d | 27 | } |
| inst | 0:7e177131730d | 28 | |
| inst | 0:7e177131730d | 29 | float getRoll(){ |
| inst | 0:7e177131730d | 30 | return mRoll; |
| inst | 0:7e177131730d | 31 | } |
| inst | 0:7e177131730d | 32 | |
| inst | 0:7e177131730d | 33 | private: |
| inst | 0:7e177131730d | 34 | int mMoveDirection; |
| inst | 0:7e177131730d | 35 | float mMagRoll; |
| inst | 0:7e177131730d | 36 | float mMoveCoeff; |
| inst | 0:7e177131730d | 37 | float mRoll; |
| inst | 0:7e177131730d | 38 | }; |
| inst | 0:7e177131730d | 39 | |
| inst | 0:7e177131730d | 40 | #endif |