1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 08:45:36 +03:00

reorganization of uart-based receiver drivers

FEATURE_SPEKTRUM has been removed and replaced with FEATURE_SERIALRX.
cli  option serialrx_type now configures what type of receiver it is
0 = spektrum1024, 1 = spektrum2048, 2 = sbus
sbus will need hardware inverter to use.
also cleaned up receiver drivers to assign readrawRC callback instead of assigning in code in main()
none of this has been tested.

git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@418 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
This commit is contained in:
timecop@gmail.com 2013-09-29 14:40:20 +00:00
parent 04ab548d2e
commit 2272e1a5a6
10 changed files with 191 additions and 31 deletions

View file

@ -273,7 +273,7 @@ typedef struct master_t {
// Radio/ESC-related configuration
uint8_t rcmap[8]; // mapping of radio channels to internal RPYTA+ order
uint8_t spektrum_hires; // spektrum high-resolution y/n (1024/2048bit)
uint8_t serialrx_type; // type of UART-based receiver (0 = spek 10, 1 = spek 11, 2 = sbus). Must be enabled by FEATURE_SERIALRX first.
uint16_t midrc; // Some radios have not a neutral point centered on 1500. can be changed here
uint16_t mincheck; // minimum rc end
uint16_t maxcheck; // maximum rc end
@ -448,9 +448,13 @@ void featureClearAll(void);
uint32_t featureMask(void);
// spektrum
void spektrumInit(void);
void spektrumInit(rcReadRawDataPtr *callback);
bool spektrumFrameComplete(void);
// sbus
void sbusInit(rcReadRawDataPtr *callback);
bool sbusFrameComplete(void);
// buzzer
void buzzer(uint8_t warn_vbat);