File tree 2 files changed +9
-8
lines changed
2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 21
21
22
22
#include " adc_driver.h"
23
23
#include " board.h"
24
+ #if defined(FLYSKY_GIMBAL)
25
+ #include " flysky_gimbal_driver.h"
26
+ #endif
24
27
25
28
#include " edgetx.h"
26
29
@@ -61,6 +64,12 @@ static bool adcSingleRead()
61
64
if (_hal_adc_driver->wait_completion )
62
65
_hal_adc_driver->wait_completion ();
63
66
67
+ // Need to put all in a group to ensure DMA transfer will not affect ADC sampling
68
+ #if defined(FLYSKY_GIMBAL) && !defined(SIMU)
69
+ flysky_gimbal_start_read ();
70
+ flysky_gimbal_wait_completion ();
71
+ #endif
72
+
64
73
return true ;
65
74
}
66
75
Original file line number Diff line number Diff line change @@ -254,14 +254,6 @@ void doMixerCalculations()
254
254
getADC ();
255
255
DEBUG_TIMER_STOP (debugTimerGetAdc);
256
256
257
- // Need to put all in a group to ensure DMA transfer will not affect ADC sampling
258
- #if defined(FLYSKY_GIMBAL) && !defined(SIMU)
259
- flysky_gimbal_start_read ();
260
- #endif
261
- #if defined(FLYSKY_GIMBAL) && !defined(SIMU)
262
- flysky_gimbal_wait_completion ();
263
- #endif
264
-
265
257
DEBUG_TIMER_START (debugTimerGetSwitches);
266
258
getSwitchesPosition (!s_mixer_first_run_done);
267
259
DEBUG_TIMER_STOP (debugTimerGetSwitches);
You can’t perform that action at this time.
0 commit comments