Skip to content

Commit fa85291

Browse files
committed
Fix for firmware API improvements
by Willy-JL
1 parent de11574 commit fa85291

File tree

9 files changed

+18
-17
lines changed

9 files changed

+18
-17
lines changed

base_pack/avr_isp_programmer/helpers/flipper_i32hex_file.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ FlipperI32HexFile* flipper_i32hex_file_open_write(const char* name, uint32_t sta
4141
FURI_LOG_E(TAG, "Failed to open file %s", name);
4242
instance->file_open = FlipperI32HexFileStatusErrorNoOpenFile;
4343
}
44-
instance->str_data = furi_string_alloc(instance->storage);
44+
instance->str_data = furi_string_alloc();
4545

4646
return instance;
4747
}
@@ -62,7 +62,7 @@ FlipperI32HexFile* flipper_i32hex_file_open_read(const char* name) {
6262
FURI_LOG_E(TAG, "Failed to open file %s", name);
6363
instance->file_open = FlipperI32HexFileStatusErrorNoOpenFile;
6464
}
65-
instance->str_data = furi_string_alloc(instance->storage);
65+
instance->str_data = furi_string_alloc();
6666

6767
return instance;
6868
}

base_pack/ble_spam/application.fam

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ App(
99
fap_file_assets="assets",
1010
fap_author="@Willy-JL @ECTO-1A @Spooks4576",
1111
fap_weburl="https://github.com/Next-Flip/Momentum-Apps/tree/dev/ble_spam",
12-
fap_version="6.0",
12+
fap_version="6.2",
1313
fap_description="Flood BLE advertisements to cause spammy and annoying popups/notifications",
1414
fap_icon_assets="icons",
1515
fap_icon_assets_symbol="ble_spam",

base_pack/ble_spam/ble_spam.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,8 @@ static void draw_callback(Canvas* canvas, void* _ctx) {
304304
const Protocol* protocol = attack ? attack->protocol : NULL;
305305

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

310311
switch(state->index) {

base_pack/rolling_flaws/rolling_flaws.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ void rolling_flaws_receive_sync_draw_callback(Canvas* canvas, void* model) {
237237
void rolling_flaws_receive_signal_draw_callback(Canvas* canvas, void* model) {
238238
RollingFlawsModel* my_model = ((RollingFlawsRefModel*)model)->model;
239239

240-
FuriString* str = furi_string_alloc(32);
240+
FuriString* str = furi_string_alloc();
241241

242242
canvas_set_bitmap_mode(canvas, 1);
243243
canvas_set_font(canvas, FontPrimary);

base_pack/totp/cli/cli_shared_methods.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ bool totp_cli_read_line(Cli* cli, FuriString* out_str, bool mask_user_input) {
4141
cli_read_timeout(cli, &c2, 1, 0);
4242
cli_read_timeout(cli, &c2, 1, 0);
4343
} else if(c == CliSymbolAsciiETX) {
44-
cli_nl();
44+
cli_nl(cli);
4545
return false;
4646
} else if(
4747
(c >= '0' && c <= '9') || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') ||
@@ -60,7 +60,7 @@ bool totp_cli_read_line(Cli* cli, FuriString* out_str, bool mask_user_input) {
6060
furi_string_left(out_str, out_str_size - 1);
6161
}
6262
} else if(c == CliSymbolAsciiCR) {
63-
cli_nl();
63+
cli_nl(cli);
6464
break;
6565
}
6666
}
@@ -92,4 +92,4 @@ void totp_cli_printf_missed_argument_value(char* arg) {
9292

9393
void totp_cli_printf_unknown_argument(const FuriString* arg) {
9494
TOTP_CLI_PRINTF("Unknown argument \"%s\"\r\n", furi_string_get_cstr(arg));
95-
}
95+
}

base_pack/totp/cli/plugins/automation/automation.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ static void handle(PluginState* plugin_state, FuriString* args, Cli* cli) {
131131
print_initial_delay(
132132
plugin_state->automation_initial_delay, TOTP_CLI_COLOR_SUCCESS);
133133
TOTP_CLI_PRINTF_SUCCESS(" sec.]");
134-
cli_nl();
134+
cli_nl(cli);
135135
} else {
136136
TOTP_CLI_PRINT_ERROR_UPDATING_CONFIG_FILE();
137137
}
@@ -154,7 +154,7 @@ static void handle(PluginState* plugin_state, FuriString* args, Cli* cli) {
154154
TOTP_CLI_PRINTF_INFO(" [");
155155
print_initial_delay(plugin_state->automation_initial_delay, TOTP_CLI_COLOR_INFO);
156156
TOTP_CLI_PRINTF_INFO(" sec.]");
157-
cli_nl();
157+
cli_nl(cli);
158158
}
159159
} while(false);
160160

base_pack/totp/cli/plugins/export/export.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ static void handle(PluginState* plugin_state, FuriString* args, Cli* cli) {
7878

7979
size_t original_index = totp_token_info_iterator_get_current_token_index(iterator_context);
8080

81-
cli_nl();
81+
cli_nl(cli);
8282
TOTP_CLI_PRINTF("# --- EXPORT LIST BEGIN ---\r\n");
8383

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

110110
TOTP_CLI_PRINTF("# --- EXPORT LIST END ---\r\n\r\n");

base_pack/totp/cli/plugins/notification/notification.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ static void handle(PluginState* plugin_state, FuriString* args, Cli* cli) {
6767
if(totp_config_file_update_notification_method(plugin_state)) {
6868
TOTP_CLI_PRINTF_SUCCESS("Notification method is set to ");
6969
totp_cli_command_notification_print_method(new_method, TOTP_CLI_COLOR_SUCCESS);
70-
cli_nl();
70+
cli_nl(cli);
7171
} else {
7272
TOTP_CLI_PRINT_ERROR_UPDATING_CONFIG_FILE();
7373
}
@@ -77,7 +77,7 @@ static void handle(PluginState* plugin_state, FuriString* args, Cli* cli) {
7777
TOTP_CLI_PRINTF_INFO("Current notification method is ");
7878
totp_cli_command_notification_print_method(
7979
plugin_state->notification_method, TOTP_CLI_COLOR_INFO);
80-
cli_nl();
80+
cli_nl(cli);
8181
}
8282
} while(false);
8383

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

9595
const FlipperAppPluginDescriptor* totp_cli_notification_plugin_ep() {
9696
return &plugin_descriptor;
97-
}
97+
}

base_pack/totp/cli/plugins/pin/pin.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ static bool totp_cli_read_pin(Cli* cli, uint8_t* pin, uint8_t* pin_length) {
6666
TOTP_CLI_DELETE_LAST_CHAR();
6767
}
6868
} else if(c == CliSymbolAsciiCR) {
69-
cli_nl();
69+
cli_nl(cli);
7070
break;
7171
}
7272
}
@@ -176,4 +176,4 @@ static const FlipperAppPluginDescriptor plugin_descriptor = {
176176

177177
const FlipperAppPluginDescriptor* totp_cli_pin_plugin_ep() {
178178
return &plugin_descriptor;
179-
}
179+
}

0 commit comments

Comments
 (0)