Skip to content

Commit

Permalink
Fix for firmware API improvements
Browse files Browse the repository at this point in the history
by Willy-JL
  • Loading branch information
xMasterX committed Mar 25, 2024
1 parent de11574 commit fa85291
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 17 deletions.
4 changes: 2 additions & 2 deletions base_pack/avr_isp_programmer/helpers/flipper_i32hex_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ FlipperI32HexFile* flipper_i32hex_file_open_write(const char* name, uint32_t sta
FURI_LOG_E(TAG, "Failed to open file %s", name);
instance->file_open = FlipperI32HexFileStatusErrorNoOpenFile;
}
instance->str_data = furi_string_alloc(instance->storage);
instance->str_data = furi_string_alloc();

return instance;
}
Expand All @@ -62,7 +62,7 @@ FlipperI32HexFile* flipper_i32hex_file_open_read(const char* name) {
FURI_LOG_E(TAG, "Failed to open file %s", name);
instance->file_open = FlipperI32HexFileStatusErrorNoOpenFile;
}
instance->str_data = furi_string_alloc(instance->storage);
instance->str_data = furi_string_alloc();

return instance;
}
Expand Down
2 changes: 1 addition & 1 deletion base_pack/ble_spam/application.fam
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ App(
fap_file_assets="assets",
fap_author="@Willy-JL @ECTO-1A @Spooks4576",
fap_weburl="https://github.com/Next-Flip/Momentum-Apps/tree/dev/ble_spam",
fap_version="6.0",
fap_version="6.2",
fap_description="Flood BLE advertisements to cause spammy and annoying popups/notifications",
fap_icon_assets="icons",
fap_icon_assets_symbol="ble_spam",
Expand Down
3 changes: 2 additions & 1 deletion base_pack/ble_spam/ble_spam.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,8 @@ static void draw_callback(Canvas* canvas, void* _ctx) {
const Protocol* protocol = attack ? attack->protocol : NULL;

canvas_set_font(canvas, FontSecondary);
canvas_draw_icon(canvas, 4 - !protocol, 3, protocol ? protocol->icon : &I_ble_spam);
const Icon* icon = protocol ? protocol->icon : &I_ble_spam;
canvas_draw_icon(canvas, 4 - (icon == &I_ble_spam), 3, icon);
canvas_draw_str(canvas, 14, 12, "BLE Spam");

switch(state->index) {
Expand Down
2 changes: 1 addition & 1 deletion base_pack/rolling_flaws/rolling_flaws.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ void rolling_flaws_receive_sync_draw_callback(Canvas* canvas, void* model) {
void rolling_flaws_receive_signal_draw_callback(Canvas* canvas, void* model) {
RollingFlawsModel* my_model = ((RollingFlawsRefModel*)model)->model;

FuriString* str = furi_string_alloc(32);
FuriString* str = furi_string_alloc();

canvas_set_bitmap_mode(canvas, 1);
canvas_set_font(canvas, FontPrimary);
Expand Down
6 changes: 3 additions & 3 deletions base_pack/totp/cli/cli_shared_methods.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ bool totp_cli_read_line(Cli* cli, FuriString* out_str, bool mask_user_input) {
cli_read_timeout(cli, &c2, 1, 0);
cli_read_timeout(cli, &c2, 1, 0);
} else if(c == CliSymbolAsciiETX) {
cli_nl();
cli_nl(cli);
return false;
} else if(
(c >= '0' && c <= '9') || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') ||
Expand All @@ -60,7 +60,7 @@ bool totp_cli_read_line(Cli* cli, FuriString* out_str, bool mask_user_input) {
furi_string_left(out_str, out_str_size - 1);
}
} else if(c == CliSymbolAsciiCR) {
cli_nl();
cli_nl(cli);
break;
}
}
Expand Down Expand Up @@ -92,4 +92,4 @@ void totp_cli_printf_missed_argument_value(char* arg) {

void totp_cli_printf_unknown_argument(const FuriString* arg) {
TOTP_CLI_PRINTF("Unknown argument \"%s\"\r\n", furi_string_get_cstr(arg));
}
}
4 changes: 2 additions & 2 deletions base_pack/totp/cli/plugins/automation/automation.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ static void handle(PluginState* plugin_state, FuriString* args, Cli* cli) {
print_initial_delay(
plugin_state->automation_initial_delay, TOTP_CLI_COLOR_SUCCESS);
TOTP_CLI_PRINTF_SUCCESS(" sec.]");
cli_nl();
cli_nl(cli);
} else {
TOTP_CLI_PRINT_ERROR_UPDATING_CONFIG_FILE();
}
Expand All @@ -154,7 +154,7 @@ static void handle(PluginState* plugin_state, FuriString* args, Cli* cli) {
TOTP_CLI_PRINTF_INFO(" [");
print_initial_delay(plugin_state->automation_initial_delay, TOTP_CLI_COLOR_INFO);
TOTP_CLI_PRINTF_INFO(" sec.]");
cli_nl();
cli_nl(cli);
}
} while(false);

Expand Down
4 changes: 2 additions & 2 deletions base_pack/totp/cli/plugins/export/export.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ static void handle(PluginState* plugin_state, FuriString* args, Cli* cli) {

size_t original_index = totp_token_info_iterator_get_current_token_index(iterator_context);

cli_nl();
cli_nl(cli);
TOTP_CLI_PRINTF("# --- EXPORT LIST BEGIN ---\r\n");

for(size_t i = 0; i < total_count; i++) {
Expand All @@ -104,7 +104,7 @@ static void handle(PluginState* plugin_state, FuriString* args, Cli* cli) {
} else {
TOTP_CLI_PRINTF("&period=%" PRIu8, token_info->duration);
}
cli_nl();
cli_nl(cli);
}

TOTP_CLI_PRINTF("# --- EXPORT LIST END ---\r\n\r\n");
Expand Down
6 changes: 3 additions & 3 deletions base_pack/totp/cli/plugins/notification/notification.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ static void handle(PluginState* plugin_state, FuriString* args, Cli* cli) {
if(totp_config_file_update_notification_method(plugin_state)) {
TOTP_CLI_PRINTF_SUCCESS("Notification method is set to ");
totp_cli_command_notification_print_method(new_method, TOTP_CLI_COLOR_SUCCESS);
cli_nl();
cli_nl(cli);
} else {
TOTP_CLI_PRINT_ERROR_UPDATING_CONFIG_FILE();
}
Expand All @@ -77,7 +77,7 @@ static void handle(PluginState* plugin_state, FuriString* args, Cli* cli) {
TOTP_CLI_PRINTF_INFO("Current notification method is ");
totp_cli_command_notification_print_method(
plugin_state->notification_method, TOTP_CLI_COLOR_INFO);
cli_nl();
cli_nl(cli);
}
} while(false);

Expand All @@ -94,4 +94,4 @@ static const FlipperAppPluginDescriptor plugin_descriptor = {

const FlipperAppPluginDescriptor* totp_cli_notification_plugin_ep() {
return &plugin_descriptor;
}
}
4 changes: 2 additions & 2 deletions base_pack/totp/cli/plugins/pin/pin.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ static bool totp_cli_read_pin(Cli* cli, uint8_t* pin, uint8_t* pin_length) {
TOTP_CLI_DELETE_LAST_CHAR();
}
} else if(c == CliSymbolAsciiCR) {
cli_nl();
cli_nl(cli);
break;
}
}
Expand Down Expand Up @@ -176,4 +176,4 @@ static const FlipperAppPluginDescriptor plugin_descriptor = {

const FlipperAppPluginDescriptor* totp_cli_pin_plugin_ep() {
return &plugin_descriptor;
}
}

0 comments on commit fa85291

Please sign in to comment.