fix: X7S BT detection (#3754)

* Add X7S BT detection

* Compile fix

* chore: remove obsolte section
This commit is contained in:
3djc
2023-07-12 10:08:53 +10:00
committed by GitHub
parent b0e64c8d6d
commit efd580e0ea
3 changed files with 17 additions and 44 deletions
+16
View File
@@ -33,6 +33,10 @@
#include "tasks.h"
#include "tasks/mixer_task.h"
#if defined(BLUETOOTH)
#include "bluetooth_driver.h"
#endif
#if defined(LIBOPENUI)
#include "libopenui.h"
// #include "shutdown_animation.h"
@@ -1078,6 +1082,12 @@ void opentxStart(const uint8_t startOptions = OPENTX_START_DEFAULT_ARGS)
uint8_t calibration_needed = !(startOptions & OPENTX_START_NO_CALIBRATION) && (g_eeGeneral.chkSum != evalChkSum());
#if defined(BLUETOOTH_PROBE)
extern volatile uint8_t btChipPresent;
auto oldBtMode = g_eeGeneral.bluetoothMode;
g_eeGeneral.bluetoothMode = BLUETOOTH_TELEMETRY;
#endif
#if defined(GUI)
if (!calibration_needed && !(startOptions & OPENTX_START_NO_SPLASH)) {
AUDIO_HELLO();
@@ -1114,6 +1124,12 @@ void opentxStart(const uint8_t startOptions = OPENTX_START_DEFAULT_ARGS)
PLAY_MODEL_NAME();
}
#endif
#if defined(BLUETOOTH_PROBE)
if (bluetooth.localAddr[0] != '\0')
btChipPresent = 1;
g_eeGeneral.bluetoothMode = oldBtMode;
#endif
}
void opentxClose(uint8_t shutdown)