From 4534f185255141f3eb4c26da9b1edcbcf9a96c53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Sun, 10 Nov 2024 13:07:12 +0800 Subject: [PATCH] Battery: don't print index in multi-battery device --- src/modules/battery/battery.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/battery/battery.c b/src/modules/battery/battery.c index f27ff29e7..cc30b4262 100644 --- a/src/modules/battery/battery.c +++ b/src/modules/battery/battery.c @@ -41,7 +41,7 @@ static void printBattery(FFBatteryOptions* options, FFBatteryResult* result, uin if(options->moduleArgs.outputFormat.length == 0) { - ffPrintLogoAndKey(key.chars, index, &options->moduleArgs, FF_PRINT_TYPE_NO_CUSTOM_KEY); + ffPrintLogoAndKey(key.chars, 0, &options->moduleArgs, FF_PRINT_TYPE_NO_CUSTOM_KEY); FF_STRBUF_AUTO_DESTROY str = ffStrbufCreate(); bool showStatus = @@ -100,7 +100,7 @@ static void printBattery(FFBatteryOptions* options, FFBatteryResult* result, uin ffPercentAppendBar(&capacityBar, result->capacity, options->percent, &options->moduleArgs); FF_STRBUF_AUTO_DESTROY tempStr = ffStrbufCreate(); ffTempsAppendNum(result->temperature, &tempStr, options->tempConfig, &options->moduleArgs); - FF_PRINT_FORMAT_CHECKED(key.chars, index, &options->moduleArgs, FF_PRINT_TYPE_NO_CUSTOM_KEY, FF_BATTERY_NUM_FORMAT_ARGS, ((FFformatarg[]) { + FF_PRINT_FORMAT_CHECKED(key.chars, 0, &options->moduleArgs, FF_PRINT_TYPE_NO_CUSTOM_KEY, FF_BATTERY_NUM_FORMAT_ARGS, ((FFformatarg[]) { FF_FORMAT_ARG(result->manufacturer, "manufacturer"), FF_FORMAT_ARG(result->modelName, "model-name"), FF_FORMAT_ARG(result->technology, "technology"),