1
mirror of https://github.com/DarkFlippers/unleashed-firmware.git synced 2025-12-13 13:09:49 +04:00

adapt plugins to furi stream, fix printf formats

This commit is contained in:
MX
2022-10-07 21:05:16 +03:00
parent b4b3c182c5
commit 4c9d62a33f
11 changed files with 32 additions and 41 deletions

View File

@@ -118,7 +118,7 @@ static bool open_ducky_script(Stream* stream, PluginState* plugin_state) {
furi_record_close("dialogs");
if(ret) {
if(!file_stream_open(stream, furi_string_get_cstr(path), FSAM_READ, FSOM_OPEN_EXISTING)) {
FURI_LOG_D(TAG, "Cannot open file \"%s\"", (path));
FURI_LOG_D(TAG, "Cannot open file \"%s\"", furi_string_get_cstr(path));
} else {
result = true;
}
@@ -147,7 +147,7 @@ static bool open_addrs_file(Stream* stream) {
furi_record_close("dialogs");
if(ret) {
if(!file_stream_open(stream, furi_string_get_cstr(path), FSAM_READ, FSOM_OPEN_EXISTING)) {
FURI_LOG_D(TAG, "Cannot open file \"%s\"", (path));
FURI_LOG_D(TAG, "Cannot open file \"%s\"", furi_string_get_cstr(path));
} else {
result = true;
}

View File

@@ -261,7 +261,7 @@ static bool mj_process_ducky_line(
repeat_cnt = atoi(line_tmp);
if(repeat_cnt < 2) return false;
FURI_LOG_D(TAG, "repeating %s %d times", prev_line, repeat_cnt);
FURI_LOG_D(TAG, "repeating %s %ld times", prev_line, repeat_cnt);
for(uint32_t i = 0; i < repeat_cnt; i++)
mj_process_ducky_line(handle, addr, addr_size, rate, prev_line, NULL, plugin_state);