mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 16:55:36 +03:00
Merge pull request #3143 from mikeller/unify_frsky_ibus_voltage_setting
Unified 'frsky_vfas_cell_voltage' and 'ibus_report_cell_voltage' into 'report_cell_voltage'.
This commit is contained in:
commit
c287e688b7
4 changed files with 4 additions and 5 deletions
|
@ -601,11 +601,10 @@ const clivalue_t valueTable[] = {
|
|||
{ "frsky_gps_format", VAR_UINT8 | MASTER_VALUE, .config.minmax = { 0, FRSKY_FORMAT_NMEA }, PG_TELEMETRY_CONFIG, offsetof(telemetryConfig_t, frsky_coordinate_format) },
|
||||
{ "frsky_unit", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_UNIT }, PG_TELEMETRY_CONFIG, offsetof(telemetryConfig_t, frsky_unit) },
|
||||
{ "frsky_vfas_precision", VAR_UINT8 | MASTER_VALUE, .config.minmax = { FRSKY_VFAS_PRECISION_LOW, FRSKY_VFAS_PRECISION_HIGH }, PG_TELEMETRY_CONFIG, offsetof(telemetryConfig_t, frsky_vfas_precision) },
|
||||
{ "frsky_vfas_cell_voltage", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_TELEMETRY_CONFIG, offsetof(telemetryConfig_t, frsky_vfas_cell_voltage) },
|
||||
{ "hott_alarm_int", VAR_UINT8 | MASTER_VALUE, .config.minmax = { 0, 120 }, PG_TELEMETRY_CONFIG, offsetof(telemetryConfig_t, hottAlarmSoundInterval) },
|
||||
{ "pid_in_tlm", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = {TABLE_OFF_ON }, PG_TELEMETRY_CONFIG, offsetof(telemetryConfig_t, pidValuesAsTelemetry) },
|
||||
#if defined(TELEMETRY_IBUS)
|
||||
{ "ibus_report_cell_voltage", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_TELEMETRY_CONFIG, offsetof(telemetryConfig_t, report_cell_voltage) },
|
||||
{ "report_cell_voltage", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_TELEMETRY_CONFIG, offsetof(telemetryConfig_t, report_cell_voltage) },
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -416,7 +416,7 @@ static void sendVoltageAmp(void)
|
|||
} else {
|
||||
uint16_t voltage = (batteryVoltage * 110) / 21;
|
||||
uint16_t vfasVoltage;
|
||||
if (telemetryConfig()->frsky_vfas_cell_voltage) {
|
||||
if (telemetryConfig()->report_cell_voltage) {
|
||||
vfasVoltage = voltage / getBatteryCellCount();
|
||||
} else {
|
||||
vfasVoltage = voltage;
|
||||
|
|
|
@ -619,7 +619,7 @@ void handleSmartPortTelemetry(void)
|
|||
case FSSP_DATAID_VFAS :
|
||||
if (batteryConfig()->voltageMeterSource != VOLTAGE_METER_NONE && getBatteryCellCount() > 0) {
|
||||
uint16_t vfasVoltage;
|
||||
if (telemetryConfig()->frsky_vfas_cell_voltage) {
|
||||
if (telemetryConfig()->report_cell_voltage) {
|
||||
vfasVoltage = getBatteryVoltage() / getBatteryCellCount();
|
||||
} else {
|
||||
vfasVoltage = getBatteryVoltage();
|
||||
|
|
|
@ -46,7 +46,7 @@ typedef struct telemetryConfig_s {
|
|||
frskyGpsCoordFormat_e frsky_coordinate_format;
|
||||
frskyUnit_e frsky_unit;
|
||||
uint8_t frsky_vfas_precision;
|
||||
uint8_t frsky_vfas_cell_voltage;
|
||||
uint8_t frsky_vfas_cell_voltage; // Unused. Use 'report_cell_voltage' instead.
|
||||
uint8_t hottAlarmSoundInterval;
|
||||
uint8_t pidValuesAsTelemetry;
|
||||
uint8_t report_cell_voltage;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue