diff --git a/src/main/io/serial_cli.c b/src/main/io/serial_cli.c index 25eaecb8f2..9c6be899a7 100755 --- a/src/main/io/serial_cli.c +++ b/src/main/io/serial_cli.c @@ -415,7 +415,11 @@ static const char * const lookupTableGPSSBASMode[] = { #endif static const char * const lookupTableCurrentSensor[] = { - "NONE", "ADC", "VIRTUAL" + "NONE", "ADC", "VIRTUAL", "ESC" +}; + +static const char * const lookupTableBatterySensor[] = { + "NONE", "ADC", "ESC" }; #ifdef USE_SERVOS @@ -571,6 +575,7 @@ typedef enum { TABLE_BLACKBOX_DEVICE, #endif TABLE_CURRENT_SENSOR, + TABLE_BATTERY_SENSOR, #ifdef USE_SERVOS TABLE_GIMBAL_MODE, #endif @@ -611,6 +616,7 @@ static const lookupTableEntry_t lookupTables[] = { { lookupTableBlackboxDevice, sizeof(lookupTableBlackboxDevice) / sizeof(char *) }, #endif { lookupTableCurrentSensor, sizeof(lookupTableCurrentSensor) / sizeof(char *) }, + { lookupTableBatterySensor, sizeof(lookupTableBatterySensor) / sizeof(char *) }, #ifdef USE_SERVOS { lookupTableGimbalMode, sizeof(lookupTableGimbalMode) / sizeof(char *) }, #endif @@ -799,6 +805,7 @@ const clivalue_t valueTable[] = { { "current_meter_offset", VAR_INT16 | MASTER_VALUE, &batteryConfig()->currentMeterOffset, .config.minmax = { -16000, 16000 } }, { "multiwii_current_meter_output", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, &batteryConfig()->multiwiiCurrentMeterOutput, .config.lookup = { TABLE_OFF_ON } }, { "current_meter_type", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, &batteryConfig()->currentMeterType, .config.lookup = { TABLE_CURRENT_SENSOR } }, + { "battery_meter_type", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, &batteryConfig()->batteryMeterType, .config.lookup = { TABLE_BATTERY_SENSOR } }, { "battery_notpresent_level", VAR_UINT8 | MASTER_VALUE, &batteryConfig()->batterynotpresentlevel, .config.minmax = { 0, 200 } }, { "use_vbat_alerts", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, &batteryConfig()->useVBatAlerts, .config.lookup = { TABLE_OFF_ON } }, { "use_consumption_alerts", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, &batteryConfig()->useConsumptionAlerts, .config.lookup = { TABLE_OFF_ON } },