fix(flysky gimbals): mask first 4 channels when FS gimbals are detected (#3778)
* fix(flysky gimbals): mask first 4 channels when FS gimbals are detected. * re-adjust center value to 4096 (2^12).This prevents values higher than necessary being displayed.
This commit is contained in:
@@ -21,6 +21,8 @@
|
||||
|
||||
#include "flysky_gimbal_driver.h"
|
||||
#include "stm32_serial_driver.h"
|
||||
#include "stm32_adc.h"
|
||||
|
||||
#include "delays_driver.h"
|
||||
#include "hal/adc_driver.h"
|
||||
|
||||
@@ -168,6 +170,8 @@ bool flysky_gimbal_init()
|
||||
for (uint8_t i = 0; i < 70; i++) {
|
||||
delay_ms(1);
|
||||
if (_fs_gimbal_detected) {
|
||||
// Mask the first 4 inputs (sticks)
|
||||
stm32_hal_mask_inputs(0xF);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user