fix plugin check

This commit is contained in:
Eric Betts
2024-04-13 21:51:25 -07:00
parent 93cd7eab04
commit f736e8d085
2 changed files with 7 additions and 4 deletions
+6 -3
View File
@@ -6,7 +6,9 @@
static int wiegand_format_count(uint8_t bit_length, uint64_t bits) {
UNUSED(bit_length);
UNUSED(bits);
return 0;
FURI_LOG_I(PLUGIN_APP_ID, "count");
return 1;
}
static void wiegand_format_description(
@@ -14,10 +16,11 @@ static void wiegand_format_description(
uint64_t bits,
size_t index,
FuriString* description) {
FURI_LOG_I(PLUGIN_APP_ID, "description %d", index);
UNUSED(bit_length);
UNUSED(bits);
UNUSED(index);
UNUSED(description);
furi_string_cat_printf(description, "[%i] <name> FC: CN:", index);
}
/* Actual implementation of app<>plugin interface */
+1 -1
View File
@@ -105,7 +105,7 @@ Seader* seader_alloc() {
for(uint32_t i = 0; i < plugin_count; i++) {
const PluginWiegand* plugin = plugin_manager_get_ep(seader->plugin_manager, i);
FURI_LOG_I(TAG, "plugin name: %s", plugin->name);
if(strcmp(plugin->name, PLUGIN_APP_ID) == 0) {
if(strcmp(plugin->name, "Plugin Wiegand") == 0) {
// Have to cast to drop "const" qualifier
seader->plugin_wiegand = (PluginWiegand*)plugin;
}