Globals: use generic selection when passing format args

This commit is contained in:
李通洲
2024-09-03 14:52:40 +08:00
parent c39df1ae7b
commit 37cc2c9c1b
67 changed files with 488 additions and 469 deletions
+6 -6
View File
@@ -35,12 +35,12 @@ static void printDevice(FFBluetoothOptions* options, const FFBluetoothResult* de
ffPercentAppendBar(&percentageBar, device->battery, options->percent, &options->moduleArgs);
FF_PRINT_FORMAT_CHECKED(FF_BLUETOOTH_MODULE_NAME, index, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, FF_BLUETOOTH_NUM_FORMAT_ARGS, ((FFformatarg[]) {
{FF_FORMAT_ARG_TYPE_STRBUF, &device->name, "name"},
{FF_FORMAT_ARG_TYPE_STRBUF, &device->address, "address"},
{FF_FORMAT_ARG_TYPE_STRBUF, &device->type, "type"},
{FF_FORMAT_ARG_TYPE_STRBUF, &percentageNum, "battery-percentage"},
{FF_FORMAT_ARG_TYPE_BOOL, &device->connected, "connected"},
{FF_FORMAT_ARG_TYPE_STRBUF, &percentageBar, "battery-percentage-bar"},
FF_FORMAT_ARG(device->name, "name"),
FF_FORMAT_ARG(device->address, "address"),
FF_FORMAT_ARG(device->type, "type"),
FF_FORMAT_ARG(percentageNum, "battery-percentage"),
FF_FORMAT_ARG(device->connected, "connected"),
FF_FORMAT_ARG(percentageBar, "battery-percentage-bar"),
}));
}
}