Skip to content

Commit

Permalink
fix(boxer): Flysky gimbal detection
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelcoeffic committed Jul 16, 2023
1 parent 0bc5bdf commit 599ca3a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
4 changes: 2 additions & 2 deletions radio/src/targets/common/arm/stm32/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ if(AUX_SERIAL OR AUX2_SERIAL)
endif()

if(FLYSKY_GIMBAL)
set(FIRMWARE_TARGET_SRC ${FIRMWARE_TARGET_SRC}
../common/arm/stm32/flysky_gimbal_driver.cpp
set(FIRMWARE_SRC ${FIRMWARE_SRC}
targets/common/arm/stm32/flysky_gimbal_driver.cpp
)
add_definitions(-DFLYSKY_GIMBAL)
endif()
Expand Down
6 changes: 2 additions & 4 deletions radio/src/targets/horus/board.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
#include "hal/switch_driver.h"
#include "hal/rotary_encoder.h"

#include "sticks_pwm_driver.h"

#include "board.h"
#include "boards/generic_stm32/module_ports.h"
#include "boards/generic_stm32/intmodule_heartbeat.h"
Expand All @@ -40,7 +38,7 @@

#include <string.h>

#if defined(RADIO_FAMILY_T16) || defined(PCBNV14)
#if defined(FLYSKY_GIMBAL)
#include "flysky_gimbal_driver.h"
#endif

Expand Down Expand Up @@ -167,7 +165,7 @@ void boardInit()
sticksPwmDetect();
#endif

#if defined(RADIO_FAMILY_T16)
#if defined(FLYSKY_GIMBAL)
flysky_gimbal_init();
#endif

Expand Down
11 changes: 9 additions & 2 deletions radio/src/targets/taranis/board.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,13 @@
#include "debug.h"
#include "rtc.h"

#include "../common/arm/stm32/timers_driver.h"

#include "timers_driver.h"
#include "dataconstants.h"

#if defined(FLYSKY_GIMBAL)
#include "flysky_gimbal_driver.h"
#endif

#if !defined(BOOT)
#include "opentx.h"
#if defined(PXX1)
Expand Down Expand Up @@ -211,6 +214,10 @@ void boardInit()
sticksPwmDetect();
#endif

#if defined(FLYSKY_GIMBAL)
flysky_gimbal_init();
#endif

if (!adcInit(&_adc_driver))
TRACE("adcInit failed");

Expand Down

0 comments on commit 599ca3a

Please sign in to comment.