mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 12:25:20 +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:
parent
4c9f9093b8
commit
5484e5fddd
15 changed files with 97 additions and 128 deletions
|
@ -86,7 +86,7 @@ static const char * const featureNames[] = {
|
|||
"RX_PPM", "VBAT", "INFLIGHT_ACC_CAL", "RX_SERIAL", "MOTOR_STOP",
|
||||
"SERVO_TILT", "SOFTSERIAL", "LED_RING", "GPS", "FAILSAFE",
|
||||
"SONAR", "TELEMETRY", "POWERMETER", "VARIO", "3D", "RX_PARALLEL_PWM",
|
||||
"RX_MSP", "RSSI_PWM", NULL
|
||||
"RX_MSP", "RSSI_ADC", NULL
|
||||
};
|
||||
|
||||
// sync this with AvailableSensors enum from board.h
|
||||
|
@ -150,7 +150,6 @@ const clivalue_t valueTable[] = {
|
|||
{ "mincheck", VAR_UINT16, &masterConfig.rxConfig.mincheck, PWM_RANGE_ZERO, PWM_RANGE_MAX },
|
||||
{ "maxcheck", VAR_UINT16, &masterConfig.rxConfig.maxcheck, PWM_RANGE_ZERO, PWM_RANGE_MAX },
|
||||
{ "rssi_channel", VAR_INT8, &masterConfig.rxConfig.rssi_channel, 0, MAX_SUPPORTED_RC_CHANNEL_COUNT },
|
||||
{ "rssi_pwm_provider", VAR_INT8, &masterConfig.rxConfig.rssi_pwm_provider, 0, RSSI_PWM_PROVIDER_MAX },
|
||||
|
||||
{ "minthrottle", VAR_UINT16, &masterConfig.escAndServoConfig.minthrottle, PWM_RANGE_ZERO, PWM_RANGE_MAX },
|
||||
{ "maxthrottle", VAR_UINT16, &masterConfig.escAndServoConfig.maxthrottle, PWM_RANGE_ZERO, PWM_RANGE_MAX },
|
||||
|
@ -193,8 +192,6 @@ const clivalue_t valueTable[] = {
|
|||
{ "vbatmaxcellvoltage", VAR_UINT8, &masterConfig.batteryConfig.vbatmaxcellvoltage, 10, 50 },
|
||||
{ "vbatmincellvoltage", VAR_UINT8, &masterConfig.batteryConfig.vbatmincellvoltage, 10, 50 },
|
||||
|
||||
{ "power_adc_channel", VAR_UINT8, &masterConfig.power_adc_channel, 0, 9 },
|
||||
|
||||
{ "align_gyro", VAR_UINT8, &masterConfig.sensorAlignmentConfig.gyro_align, 0, 8 },
|
||||
{ "align_acc", VAR_UINT8, &masterConfig.sensorAlignmentConfig.acc_align, 0, 8 },
|
||||
{ "align_mag", VAR_UINT8, &masterConfig.sensorAlignmentConfig.mag_align, 0, 8 },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue