feat(flysky): Flysky Gimbal 2.0 Sync Sampling Support (#5869)

This commit is contained in:
richardclli
2025-06-17 12:52:05 +10:00
committed by GitHub
parent 8e83664f1b
commit 8eb144feca
6 changed files with 170 additions and 12 deletions
+9
View File
@@ -21,6 +21,9 @@
#include "adc_driver.h"
#include "board.h"
#if defined(FLYSKY_GIMBAL)
#include "flysky_gimbal_driver.h"
#endif
#include "edgetx.h"
@@ -57,6 +60,12 @@ static bool adcSingleRead()
if (_hal_adc_driver->wait_completion)
_hal_adc_driver->wait_completion();
// Need to put all in a group to ensure DMA transfer will not affect ADC sampling
#if defined(FLYSKY_GIMBAL) && !defined(SIMU)
flysky_gimbal_start_read();
flysky_gimbal_wait_completion();
#endif
return true;
}