mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 16:25:31 +03:00
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:
parent
c80090f39f
commit
3aaaa3f9f5
2 changed files with 3 additions and 1 deletions
|
@ -151,7 +151,7 @@ void init(void)
|
||||||
systemInit();
|
systemInit();
|
||||||
|
|
||||||
// Spektrum sattelite bind - ported from Baseflight
|
// Spektrum sattelite bind - ported from Baseflight
|
||||||
if (feature(FEATURE_RX_MSP)) {
|
if (feature(FEATURE_RX_SERIAL)) {
|
||||||
switch (masterConfig.rxConfig.serialrx_provider) {
|
switch (masterConfig.rxConfig.serialrx_provider) {
|
||||||
case SERIALRX_SPEKTRUM1024:
|
case SERIALRX_SPEKTRUM1024:
|
||||||
case SERIALRX_SPEKTRUM2048:
|
case SERIALRX_SPEKTRUM2048:
|
||||||
|
|
|
@ -151,6 +151,7 @@ uint32_t rccReadBkpDr(void)
|
||||||
|
|
||||||
/* spektrumBind function ported from Baseflight. It's used to bind satellite receiver to TX.
|
/* 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.
|
* 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.
|
* Known parameters. Tested with DSMX satellite and DX8 radio. Framerate (11ms or 22ms) must be selected from TX.
|
||||||
* 9 = DSMX 11ms / DSMX 22ms
|
* 9 = DSMX 11ms / DSMX 22ms
|
||||||
* 5 = DSM2 11ms 2048 / DSM2 22ms 1024
|
* 5 = DSM2 11ms 2048 / DSM2 22ms 1024
|
||||||
|
@ -173,6 +174,7 @@ void spektrumBind(rxConfig_t *rxConfig)
|
||||||
gpio.pin = hwBindPin;
|
gpio.pin = hwBindPin;
|
||||||
gpio.mode = Mode_IPU;
|
gpio.mode = Mode_IPU;
|
||||||
gpioInit(hwBindPort, &gpio);
|
gpioInit(hwBindPort, &gpio);
|
||||||
|
delayMicroseconds(10); // allow configuration to settle
|
||||||
if (digitalIn(hwBindPort, hwBindPin))
|
if (digitalIn(hwBindPort, hwBindPin))
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue