mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 00:05:33 +03:00
Add CJMCU revision detection. Use LEDs to indicate Spektrum binding
activity.
This commit is contained in:
parent
2641f6ada7
commit
53faaff63c
7 changed files with 100 additions and 8 deletions
|
@ -74,8 +74,8 @@
|
|||
#include "config/config_profile.h"
|
||||
#include "config/config_master.h"
|
||||
|
||||
#ifdef NAZE
|
||||
#include "target/NAZE/hardware_revision.h"
|
||||
#ifdef USE_HARDWARE_REVISION_DETECTION
|
||||
#include "hardware_revision.h"
|
||||
#endif
|
||||
|
||||
#include "build_config.h"
|
||||
|
@ -146,13 +146,15 @@ void init(void)
|
|||
SetSysClock(masterConfig.emf_avoidance);
|
||||
#endif
|
||||
|
||||
#ifdef NAZE
|
||||
#ifdef USE_HARDWARE_REVISION_DETECTION
|
||||
detectHardwareRevision();
|
||||
#endif
|
||||
|
||||
systemInit();
|
||||
|
||||
#ifdef SPEKTRUM_BIND
|
||||
ledInit();
|
||||
|
||||
#ifdef SPEKTRUM_BIND
|
||||
if (feature(FEATURE_RX_SERIAL)) {
|
||||
switch (masterConfig.rxConfig.serialrx_provider) {
|
||||
case SERIALRX_SPEKTRUM1024:
|
||||
|
@ -170,8 +172,6 @@ void init(void)
|
|||
|
||||
timerInit(); // timer must be initialized before any channel is allocated
|
||||
|
||||
ledInit();
|
||||
|
||||
#ifdef BEEPER
|
||||
beeperConfig_t beeperConfig = {
|
||||
.gpioMode = Mode_Out_OD,
|
||||
|
@ -201,7 +201,7 @@ void init(void)
|
|||
spiInit(SPI2);
|
||||
#endif
|
||||
|
||||
#ifdef NAZE
|
||||
#ifdef USE_HARDWARE_REVISION_DETECTION
|
||||
updateHardwareRevision();
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue