Merge pull request #4369 from azolyoung/fix_rcsplitwifi_toogle_bug
fix toggle wi-fi will cause rcsplit turnoff
This commit is contained in:
commit
3942536012
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
#include "fc/rc_controls.h"
|
#include "fc/rc_controls.h"
|
||||||
#include "fc/rc_modes.h"
|
#include "fc/rc_modes.h"
|
||||||
|
#include "fc/runtime_config.h"
|
||||||
|
|
||||||
#include "io/rcsplit.h"
|
#include "io/rcsplit.h"
|
||||||
#include "io/serial.h"
|
#include "io/serial.h"
|
||||||
|
@ -82,7 +83,11 @@ static void rcSplitProcessMode(void)
|
||||||
uint8_t argument = RCSPLIT_CTRL_ARGU_INVALID;
|
uint8_t argument = RCSPLIT_CTRL_ARGU_INVALID;
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case BOXCAMERA1:
|
case BOXCAMERA1:
|
||||||
argument = RCSPLIT_CTRL_ARGU_WIFI_BTN;
|
// check whether arm unlock, we found a bug in rcsplit firmware:
|
||||||
|
// if rcsplit running without Wi-Fi module, and user try to turn on wifi, it'll cause rcsplit to turn off itself, this is danger
|
||||||
|
if (!ARMING_FLAG(ARMED)) {
|
||||||
|
argument = RCSPLIT_CTRL_ARGU_WIFI_BTN;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case BOXCAMERA2:
|
case BOXCAMERA2:
|
||||||
argument = RCSPLIT_CTRL_ARGU_POWER_BTN;
|
argument = RCSPLIT_CTRL_ARGU_POWER_BTN;
|
||||||
|
|
|
@ -423,4 +423,5 @@ extern "C" {
|
||||||
|
|
||||||
bool feature(uint32_t) { return false;}
|
bool feature(uint32_t) { return false;}
|
||||||
void serialWriteBuf(serialPort_t *instance, const uint8_t *data, int count) { UNUSED(instance); UNUSED(data); UNUSED(count); }
|
void serialWriteBuf(serialPort_t *instance, const uint8_t *data, int count) { UNUSED(instance); UNUSED(data); UNUSED(count); }
|
||||||
|
uint8_t armingFlags = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue