mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 06:15:16 +03:00
Expose vbat ADC divider and multiplier parameters in CLI (#5641)
Previously only vbat_scale was exposed. Adds vbat_divider and vbat_multiplier parameters. Note that all of these parameters only apply to the first voltage sensor (VOLTAGE_SENSOR_ADC_VBAT). There is the capability to have multiple sensors and those will not have their parameters exposed. Currently there are no target definitions that use multiple sensors.
This commit is contained in:
parent
588addd6dd
commit
9a7533f57d
2 changed files with 8 additions and 0 deletions
|
@ -576,6 +576,8 @@ const clivalue_t valueTable[] = {
|
|||
|
||||
// PG_VOLTAGE_SENSOR_ADC_CONFIG
|
||||
{ "vbat_scale", VAR_UINT8 | MASTER_VALUE, .config.minmax = { VBAT_SCALE_MIN, VBAT_SCALE_MAX }, PG_VOLTAGE_SENSOR_ADC_CONFIG, offsetof(voltageSensorADCConfig_t, vbatscale) },
|
||||
{ "vbat_divider", VAR_UINT8 | MASTER_VALUE, .config.minmax = { VBAT_DIVIDER_MIN, VBAT_DIVIDER_MAX }, PG_VOLTAGE_SENSOR_ADC_CONFIG, offsetof(voltageSensorADCConfig_t, vbatresdivval) },
|
||||
{ "vbat_multiplier", VAR_UINT8 | MASTER_VALUE, .config.minmax = { VBAT_MULTIPLIER_MIN, VBAT_MULTIPLIER_MAX }, PG_VOLTAGE_SENSOR_ADC_CONFIG, offsetof(voltageSensorADCConfig_t, vbatresdivmultiplier) },
|
||||
|
||||
// PG_CURRENT_SENSOR_ADC_CONFIG
|
||||
{ "ibata_scale", VAR_INT16 | MASTER_VALUE, .config.minmax = { -16000, 16000 }, PG_CURRENT_SENSOR_ADC_CONFIG, offsetof(currentSensorADCConfig_t, scale) },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue