Updates and fixes

fix FEATURE_RX_SERIAL
Delay for the hardware bind plug
Bind code will only work on default NAZE serial port (document
limitation)
This commit is contained in:
Michael Jakob 2014-11-29 14:43:03 +01:00 committed by Dominic Clifton
parent c80090f39f
commit 3aaaa3f9f5
2 changed files with 3 additions and 1 deletions

View File

@ -151,7 +151,7 @@ void init(void)
systemInit();
// Spektrum sattelite bind - ported from Baseflight
if (feature(FEATURE_RX_MSP)) {
if (feature(FEATURE_RX_SERIAL)) {
switch (masterConfig.rxConfig.serialrx_provider) {
case SERIALRX_SPEKTRUM1024:
case SERIALRX_SPEKTRUM2048:

View File

@ -151,6 +151,7 @@ uint32_t rccReadBkpDr(void)
/* spektrumBind function ported from Baseflight. It's used to bind satellite receiver to TX.
* Function must be called immediately after startup so that we don't miss satellite bind window.
* It will only work for USART2, PA3 pin.
* Known parameters. Tested with DSMX satellite and DX8 radio. Framerate (11ms or 22ms) must be selected from TX.
* 9 = DSMX 11ms / DSMX 22ms
* 5 = DSM2 11ms 2048 / DSM2 22ms 1024
@ -173,6 +174,7 @@ void spektrumBind(rxConfig_t *rxConfig)
gpio.pin = hwBindPin;
gpio.mode = Mode_IPU;
gpioInit(hwBindPort, &gpio);
delayMicroseconds(10); // allow configuration to settle
if (digitalIn(hwBindPort, hwBindPin))
return;
#endif