measuringwheel関数がついかされています。

Committer:
tanabe2000
Date:
Mon Aug 27 04:45:30 2018 +0000
Revision:
1:ec87437c2029
Parent:
0:243364135087
Child:
4:ee51008e03e2
ver2

Who changed what in which revision?

UserRevisionLine numberNew contents of line
UCHITAKE 0:243364135087 1 #ifndef R1370_H
UCHITAKE 0:243364135087 2 #define R1370_H
UCHITAKE 0:243364135087 3
UCHITAKE 0:243364135087 4 #include "mbed.h"
UCHITAKE 0:243364135087 5 #include <vector>
UCHITAKE 0:243364135087 6
UCHITAKE 0:243364135087 7 #define R1370_BUFFER_SIZE 15
UCHITAKE 0:243364135087 8 #define R1370_HEADER0 0xAA
UCHITAKE 0:243364135087 9 #define R1370_HEADER1 0x00
UCHITAKE 0:243364135087 10
UCHITAKE 0:243364135087 11 class R1370 : public RawSerial
UCHITAKE 0:243364135087 12 {
UCHITAKE 0:243364135087 13 public :
UCHITAKE 0:243364135087 14 R1370(PinName tx, PinName rx);
UCHITAKE 0:243364135087 15
UCHITAKE 0:243364135087 16 float getAngle();
UCHITAKE 0:243364135087 17 float getRate();
UCHITAKE 0:243364135087 18 int16_t getAcc(char l);
UCHITAKE 0:243364135087 19 int16_t getAcc(int i);
UCHITAKE 0:243364135087 20 int16_t getAccX();
UCHITAKE 0:243364135087 21 int16_t getAccY();
UCHITAKE 0:243364135087 22 int16_t getAccZ();
UCHITAKE 0:243364135087 23
tanabe2000 1:ec87437c2029 24 unsigned char upbit();
tanabe2000 1:ec87437c2029 25 unsigned char downbit();
tanabe2000 1:ec87437c2029 26
UCHITAKE 0:243364135087 27
UCHITAKE 0:243364135087 28 private :
UCHITAKE 0:243364135087 29 void receiveByte();
UCHITAKE 0:243364135087 30 void assembleLoop();
UCHITAKE 0:243364135087 31 void assemble();
UCHITAKE 0:243364135087 32
UCHITAKE 0:243364135087 33 Thread thread;
UCHITAKE 0:243364135087 34 std::vector<unsigned char> buf;
UCHITAKE 0:243364135087 35
UCHITAKE 0:243364135087 36 uint8_t index;
UCHITAKE 0:243364135087 37 int16_t angle;
UCHITAKE 0:243364135087 38 int16_t rate;
UCHITAKE 0:243364135087 39 int16_t acc[3];
UCHITAKE 0:243364135087 40 uint8_t reserved;
tanabe2000 1:ec87437c2029 41
tanabe2000 1:ec87437c2029 42 unsigned char upbit_, downbit_;
UCHITAKE 0:243364135087 43 };
UCHITAKE 0:243364135087 44
UCHITAKE 0:243364135087 45 #endif