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.
SBUS.h
00001 #ifndef SBUS_H 00002 #define SBUS_H 00003 #include "mbed.h" 00004 00005 #define SBUS_SYNCBYTE 0x0F 00006 00007 class SBUS 00008 { 00009 public: 00010 SBUS(PinName TX, PinName RX); 00011 int chData[18]; 00012 00013 bool isFailSafe(); 00014 int getStickVal(int axis); 00015 int getSwitchVal(int parm); 00016 00017 private: 00018 Serial myserial; 00019 bool failSafe; 00020 char rcvData[25]; 00021 unsigned int dataIndex; 00022 00023 int16_t _getData(uint8_t ch); 00024 void _serialEvent(); 00025 float _constrain(float in, float min, float max); 00026 float _map(float in, float inMin, float inMax, float outMin, float outMax); 00027 }; 00028 #endif
Generated on Sat Jul 23 2022 01:00:10 by
1.7.2