mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
CLI: More commands as plugins on SD -6KB DFU, refactor plugin wrapper, (#276)
* Unused icons to check later * Exclude disabled icons from firmware * Format * CLI: Test moving more cmds to plugins * CLI: Macro template for plugin wrapper * Fix plugin filenames * Retrofit older cli wrappers * Fix unused * Fix manifests * Add explanation * Revert "Unused icons to check later" This reverts commitb7f98e344c. * Revert "Exclude disabled icons from firmware" This reverts commitab62e99898. * Add back toplevel chat command * Add DFU size to github comment * Fix build * Fix BT CLI preload fail * Add these back * Fix CLI command gpio preload fail * Fix input command * These can stay * Fix negative size rounding * Update changelog * Fix DFU size calc
This commit is contained in:
@@ -1185,15 +1185,24 @@ static void subghz_cli_command(Cli* cli, FuriString* args, void* context) {
|
||||
furi_string_free(cmd);
|
||||
}
|
||||
|
||||
#include <flipper_application/flipper_application.h>
|
||||
#include <cli/cli_i.h>
|
||||
CLI_PLUGIN_WRAPPER("subghz", subghz_cli_command)
|
||||
|
||||
static const FlipperAppPluginDescriptor plugin_descriptor = {
|
||||
.appid = CLI_PLUGIN_APP_ID,
|
||||
.ep_api_version = CLI_PLUGIN_API_VERSION,
|
||||
.entry_point = &subghz_cli_command,
|
||||
};
|
||||
|
||||
const FlipperAppPluginDescriptor* subghz_cli_plugin_ep(void) {
|
||||
return &plugin_descriptor;
|
||||
static void subghz_cli_command_chat_wrapper(Cli* cli, FuriString* args, void* context) {
|
||||
furi_string_replace_at(args, 0, 0, "chat ");
|
||||
subghz_cli_command_wrapper(cli, args, context);
|
||||
}
|
||||
|
||||
void subghz_on_system_start(void) {
|
||||
#ifdef SRV_CLI
|
||||
Cli* cli = furi_record_open(RECORD_CLI);
|
||||
|
||||
cli_add_command(cli, "subghz", CliCommandFlagDefault, subghz_cli_command_wrapper, NULL);
|
||||
cli_add_command(cli, "chat", CliCommandFlagDefault, subghz_cli_command_chat_wrapper, NULL);
|
||||
|
||||
furi_record_close(RECORD_CLI);
|
||||
#else
|
||||
UNUSED(subghz_cli_command);
|
||||
UNUSED(subghz_cli_command_chat_wrapper);
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user