SBUSのcppとhppだけ(フォーク)

Committer:
surpace0924
Date:
Sat Feb 03 15:12:59 2018 +0000
Revision:
0:072c4589bc62
1.1.0; ??????????

Who changed what in which revision?

UserRevisionLine numberNew contents of line
surpace0924 0:072c4589bc62 1 #ifndef _SBUS_
surpace0924 0:072c4589bc62 2 #define _SBUS_
surpace0924 0:072c4589bc62 3 #define _SBUS_
surpace0924 0:072c4589bc62 4
surpace0924 0:072c4589bc62 5 #include "mbed.h"
surpace0924 0:072c4589bc62 6
surpace0924 0:072c4589bc62 7 class SBUS
surpace0924 0:072c4589bc62 8 {
surpace0924 0:072c4589bc62 9 public:
surpace0924 0:072c4589bc62 10 SBUS(PinName tx, PinName rx);
surpace0924 0:072c4589bc62 11 int16_t getData(uint8_t ch);
surpace0924 0:072c4589bc62 12 int getStickVal(int axis);
surpace0924 0:072c4589bc62 13 int getSwitchVal(int parm);
surpace0924 0:072c4589bc62 14 bool failSafe;
surpace0924 0:072c4589bc62 15
surpace0924 0:072c4589bc62 16 private:
surpace0924 0:072c4589bc62 17 RawSerial sbus_;
surpace0924 0:072c4589bc62 18 void sbusIrqRx ();
surpace0924 0:072c4589bc62 19 int sbusIndex;
surpace0924 0:072c4589bc62 20 unsigned int rcChannel[18];
surpace0924 0:072c4589bc62 21 long map(long x, long in_min, long in_max, long out_min, long out_max); // From:Arduino.h
surpace0924 0:072c4589bc62 22 };
surpace0924 0:072c4589bc62 23
surpace0924 0:072c4589bc62 24 #endif