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.
Dependencies: mbed BufferedSerial ConfigFile
ROBOFRIEN_SBUS.h
00001 #ifndef MBED_ROBOFRIEN_SBUS_H 00002 #define MBED_ROBOFRIEN_SBUS_H 00003 00004 #include "mbed.h" 00005 00006 00007 #define SIGNAL_OFF 0 00008 #define MOTOR_OFF 1 00009 #define MANUAL_ATTITUDE 2 00010 #define MANUAL_VELOCITY 3 00011 #define MANUAL_POSITION 4 00012 #define AUTO_FLIGHT 5 00013 #define HOME_POINT 6 00014 00015 class ROBOFRIEN_SBUS { 00016 public: 00017 void Init(); 00018 void update(); 00019 bool end_bool,start_bool; 00020 bool read_check; 00021 int16_t channel[16]; // Range : -1000 ~ 1000 00022 int check_cnt; 00023 uint8_t CONTROLLER_STATE; 00024 /* **** CONTROL STATE **** */ 00025 // 0 = SIGNAL OFF 00026 // 1 = MOTOR OFF 00027 // 2 = MANUAL - ATTITUDE 00028 // 3 = MANUAL - VELOCITY 00029 // 4 = MANUAL - POSITION 00030 // 5 = AUTO FLIGHT 00031 bool HOMEPOINT_BOOL; 00032 private: 00033 uint8_t SBUS_CNT; 00034 uint8_t SBUS_ID[3]; 00035 uint8_t SBUS_BUFF[25]; 00036 }; 00037 00038 #endif
Generated on Sat Jul 16 2022 14:19:21 by
1.7.2