1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 16:55:36 +03:00

Replace PWM RSSI with ADC RSSI.

The primary reason is to support the D4R-II with it's much faster PWM
frequency.  The PWM RSSI code could not keep up, and since there are no
timers free for using capture compare of PWM signals in hardware one
solution is to use the ADC at a slow sample rate.

RC2 is used as before and it expects a signal between 0 and 3.3v.  An
inline smoothing capacitor may help.

This commit also removes the cli command adc_power_channel since the
reading was never actually exposed anywhere.
This commit is contained in:
Dominic Clifton 2014-05-28 03:19:10 +01:00
parent 4c9f9093b8
commit 5484e5fddd
15 changed files with 97 additions and 128 deletions

View file

@ -21,7 +21,7 @@
typedef struct drv_pwm_config_t {
bool useParallelPWM;
bool usePPM;
bool usePWMRSSI;
bool useRSSIADC;
#ifdef STM32F10X_MD
bool useUART2;
#endif
@ -29,7 +29,6 @@ typedef struct drv_pwm_config_t {
bool useServos;
bool extraServos; // configure additional 4 channels in PPM mode as servos, not motors
bool airplane; // fixed wing hardware config, lots of servos etc
uint8_t adcChannel; // steal one RC input for current sensor
uint16_t motorPwmRate;
uint16_t servoPwmRate;
uint16_t idlePulse; // PWM value to use when initializing the driver. set this to either PULSE_1MS (regular pwm),