SBUSのcppとhppだけ(フォーク)
Dependents: optWingforHAPS_Eigen hexaTest_Eigen
SBUS.hpp
- Committer:
- cocorlow
- Date:
- 2021-01-21
- Revision:
- 1:b2a305158f89
- Parent:
- SBUS/SBUS.hpp@ 0:072c4589bc62
File content as of revision 1:b2a305158f89:
#ifndef _SBUS_ #define _SBUS_ #define _SBUS_ #include "mbed.h" class SBUS { public: SBUS(PinName tx, PinName rx); int16_t getData(uint8_t ch); int getStickVal(int axis); int getSwitchVal(int parm); bool failSafe; private: RawSerial sbus_; void sbusIrqRx (); int sbusIndex; unsigned int rcChannel[18]; long map(long x, long in_min, long in_max, long out_min, long out_max); // From:Arduino.h }; #endif