[FL-2520] FW build with -Wextra (#1185)
* Fixing compiler warnings with -Wextra * More warnings suppression, WIP * Even more warning fixes * Added new lines at end of text files. * Padding fix * Additional fixes to warnings on different build configurations; added -Wextra to default build pipeline * Fixes for Secplus v1 * -additional warnings * +-Wredundant-decls fixes * FuriHal: print stack overflow task name in console * FuriHal: add missing include Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
parent
1ca98170d9
commit
4d6b170769
@ -149,6 +149,7 @@ const AboutDialogScreen about_screens[] = {
|
|||||||
const size_t about_screens_count = sizeof(about_screens) / sizeof(AboutDialogScreen);
|
const size_t about_screens_count = sizeof(about_screens) / sizeof(AboutDialogScreen);
|
||||||
|
|
||||||
int32_t about_settings_app(void* p) {
|
int32_t about_settings_app(void* p) {
|
||||||
|
UNUSED(p);
|
||||||
DialogsApp* dialogs = furi_record_open("dialogs");
|
DialogsApp* dialogs = furi_record_open("dialogs");
|
||||||
DialogMessage* message = dialog_message_alloc();
|
DialogMessage* message = dialog_message_alloc();
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
// app enter function
|
// app enter function
|
||||||
extern "C" int32_t accessor_app(void* p) {
|
extern "C" int32_t accessor_app(void* p) {
|
||||||
|
UNUSED(p);
|
||||||
AccessorApp* app = new AccessorApp();
|
AccessorApp* app = new AccessorApp();
|
||||||
app->run();
|
app->run();
|
||||||
delete app;
|
delete app;
|
||||||
|
@ -64,7 +64,7 @@ void AccessorAppViewManager::send_event(AccessorEvent* event) {
|
|||||||
furi_check(result == osOK);
|
furi_check(result == osOK);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t AccessorAppViewManager::previous_view_callback(void* context) {
|
uint32_t AccessorAppViewManager::previous_view_callback(void*) {
|
||||||
if(event_queue != NULL) {
|
if(event_queue != NULL) {
|
||||||
AccessorEvent event;
|
AccessorEvent event;
|
||||||
event.type = AccessorEvent::Type::Back;
|
event.type = AccessorEvent::Type::Back;
|
||||||
|
@ -66,6 +66,7 @@ void archive_free(ArchiveApp* archive) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t archive_app(void* p) {
|
int32_t archive_app(void* p) {
|
||||||
|
UNUSED(p);
|
||||||
ArchiveApp* archive = archive_alloc();
|
ArchiveApp* archive = archive_alloc();
|
||||||
scene_manager_next_scene(archive->scene_manager, ArchiveAppSceneBrowser);
|
scene_manager_next_scene(archive->scene_manager, ArchiveAppSceneBrowser);
|
||||||
view_dispatcher_run(archive->view_dispatcher);
|
view_dispatcher_run(archive->view_dispatcher);
|
||||||
|
@ -7,8 +7,8 @@ static const char* known_apps[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
ArchiveAppTypeEnum archive_get_app_type(const char* path) {
|
ArchiveAppTypeEnum archive_get_app_type(const char* path) {
|
||||||
for(size_t i = 0; i < SIZEOF_ARRAY(known_apps); i++) {
|
for(size_t i = 0; i < COUNT_OF(known_apps); i++) {
|
||||||
if(strncmp(path, known_apps[i], strlen(known_apps[i])) != STRING_FAILURE) {
|
if(strncmp(path, known_apps[i], strlen(known_apps[i])) == 0) {
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -16,6 +16,7 @@ ArchiveAppTypeEnum archive_get_app_type(const char* path) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool archive_app_is_available(void* context, const char* path) {
|
bool archive_app_is_available(void* context, const char* path) {
|
||||||
|
UNUSED(context);
|
||||||
furi_assert(path);
|
furi_assert(path);
|
||||||
|
|
||||||
ArchiveAppTypeEnum app = archive_get_app_type(path);
|
ArchiveAppTypeEnum app = archive_get_app_type(path);
|
||||||
|
@ -11,7 +11,7 @@ static const ArchiveFileTypeEnum app_file_types[] = {
|
|||||||
[ArchiveAppTypeUnknown] = ArchiveFileTypeUnknown,
|
[ArchiveAppTypeUnknown] = ArchiveFileTypeUnknown,
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline const ArchiveFileTypeEnum archive_get_app_filetype(ArchiveAppTypeEnum app) {
|
static inline ArchiveFileTypeEnum archive_get_app_filetype(ArchiveAppTypeEnum app) {
|
||||||
return app_file_types[app];
|
return app_file_types[app];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,7 +6,8 @@
|
|||||||
bool archive_is_item_in_array(ArchiveBrowserViewModel* model, uint32_t idx) {
|
bool archive_is_item_in_array(ArchiveBrowserViewModel* model, uint32_t idx) {
|
||||||
size_t array_size = files_array_size(model->files);
|
size_t array_size = files_array_size(model->files);
|
||||||
|
|
||||||
if((idx >= model->array_offset + array_size) || (idx < model->array_offset)) {
|
if((idx >= (uint32_t)model->array_offset + array_size) ||
|
||||||
|
(idx < (uint32_t)model->array_offset)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -20,12 +21,14 @@ void archive_update_offset(ArchiveBrowserView* browser) {
|
|||||||
browser->view, (ArchiveBrowserViewModel * model) {
|
browser->view, (ArchiveBrowserViewModel * model) {
|
||||||
uint16_t bounds = model->item_cnt > 3 ? 2 : model->item_cnt;
|
uint16_t bounds = model->item_cnt > 3 ? 2 : model->item_cnt;
|
||||||
|
|
||||||
if(model->item_cnt > 3 && model->item_idx >= model->item_cnt - 1) {
|
if((model->item_cnt > 3u) && ((uint32_t)model->item_idx >= (model->item_cnt - 1))) {
|
||||||
model->list_offset = model->item_idx - 3;
|
model->list_offset = model->item_idx - 3;
|
||||||
} else if(model->list_offset < model->item_idx - bounds) {
|
} else if(model->list_offset < model->item_idx - bounds) {
|
||||||
model->list_offset = CLAMP(model->item_idx - 2, model->item_cnt - bounds, 0);
|
model->list_offset =
|
||||||
|
CLAMP((uint32_t)model->item_idx - 2, model->item_cnt - bounds, 0u);
|
||||||
} else if(model->list_offset > model->item_idx - bounds) {
|
} else if(model->list_offset > model->item_idx - bounds) {
|
||||||
model->list_offset = CLAMP(model->item_idx - 1, model->item_cnt - bounds, 0);
|
model->list_offset =
|
||||||
|
CLAMP((uint32_t)model->item_idx - 1, model->item_cnt - bounds, 0u);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -77,7 +80,7 @@ void archive_set_item_count(ArchiveBrowserView* browser, uint32_t count) {
|
|||||||
with_view_model(
|
with_view_model(
|
||||||
browser->view, (ArchiveBrowserViewModel * model) {
|
browser->view, (ArchiveBrowserViewModel * model) {
|
||||||
model->item_cnt = count;
|
model->item_cnt = count;
|
||||||
model->item_idx = CLAMP(model->item_idx, model->item_cnt - 1, 0);
|
model->item_idx = CLAMP((uint32_t)model->item_idx, model->item_cnt - 1, 0u);
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
archive_update_offset(browser);
|
archive_update_offset(browser);
|
||||||
@ -94,7 +97,7 @@ void archive_file_array_rm_selected(ArchiveBrowserView* browser) {
|
|||||||
model->item_idx - model->array_offset,
|
model->item_idx - model->array_offset,
|
||||||
model->item_idx - model->array_offset + 1);
|
model->item_idx - model->array_offset + 1);
|
||||||
model->item_cnt--;
|
model->item_cnt--;
|
||||||
model->item_idx = CLAMP(model->item_idx, model->item_cnt - 1, 0);
|
model->item_idx = CLAMP((uint32_t)model->item_idx, model->item_cnt - 1, 0u);
|
||||||
items_cnt = model->item_cnt;
|
items_cnt = model->item_cnt;
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
@ -113,14 +116,14 @@ void archive_file_array_swap(ArchiveBrowserView* browser, int8_t dir) {
|
|||||||
browser->view, (ArchiveBrowserViewModel * model) {
|
browser->view, (ArchiveBrowserViewModel * model) {
|
||||||
ArchiveFile_t temp;
|
ArchiveFile_t temp;
|
||||||
size_t array_size = files_array_size(model->files) - 1;
|
size_t array_size = files_array_size(model->files) - 1;
|
||||||
uint8_t swap_idx = CLAMP(model->item_idx + dir, array_size, 0);
|
uint8_t swap_idx = CLAMP((size_t)(model->item_idx + dir), array_size, 0u);
|
||||||
|
|
||||||
if(model->item_idx == 0 && dir < 0) {
|
if(model->item_idx == 0 && dir < 0) {
|
||||||
ArchiveFile_t_init(&temp);
|
ArchiveFile_t_init(&temp);
|
||||||
files_array_pop_at(&temp, model->files, array_size);
|
files_array_pop_at(&temp, model->files, array_size);
|
||||||
files_array_push_at(model->files, model->item_idx, temp);
|
files_array_push_at(model->files, model->item_idx, temp);
|
||||||
ArchiveFile_t_clear(&temp);
|
ArchiveFile_t_clear(&temp);
|
||||||
} else if(model->item_idx == array_size && dir > 0) {
|
} else if(((uint32_t)model->item_idx == array_size) && (dir > 0)) {
|
||||||
ArchiveFile_t_init(&temp);
|
ArchiveFile_t_init(&temp);
|
||||||
files_array_pop_at(&temp, model->files, 0);
|
files_array_pop_at(&temp, model->files, 0);
|
||||||
files_array_push_at(model->files, array_size, temp);
|
files_array_push_at(model->files, array_size, temp);
|
||||||
@ -157,7 +160,7 @@ bool archive_file_array_load(ArchiveBrowserView* browser, int8_t dir) {
|
|||||||
} else {
|
} else {
|
||||||
offset_new = model->item_idx - FILE_LIST_BUF_LEN / 4 * 1;
|
offset_new = model->item_idx - FILE_LIST_BUF_LEN / 4 * 1;
|
||||||
}
|
}
|
||||||
offset_new = CLAMP(offset_new, model->item_cnt - FILE_LIST_BUF_LEN, 0);
|
offset_new = CLAMP((uint32_t)offset_new, model->item_cnt - FILE_LIST_BUF_LEN, 0u);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
@ -196,7 +199,7 @@ ArchiveFile_t* archive_get_file_at(ArchiveBrowserView* browser, size_t idx) {
|
|||||||
|
|
||||||
with_view_model(
|
with_view_model(
|
||||||
browser->view, (ArchiveBrowserViewModel * model) {
|
browser->view, (ArchiveBrowserViewModel * model) {
|
||||||
idx = CLAMP(idx - model->array_offset, files_array_size(model->files), 0);
|
idx = CLAMP(idx - model->array_offset, files_array_size(model->files), 0u);
|
||||||
selected = files_array_size(model->files) ? files_array_get(model->files, idx) : NULL;
|
selected = files_array_size(model->files) ? files_array_get(model->files, idx) : NULL;
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
@ -247,6 +250,7 @@ void archive_set_tab(ArchiveBrowserView* browser, ArchiveTabEnum tab) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
void archive_set_last_tab(ArchiveBrowserView* browser, ArchiveTabEnum tab) {
|
void archive_set_last_tab(ArchiveBrowserView* browser, ArchiveTabEnum tab) {
|
||||||
|
UNUSED(tab); // FIXME?
|
||||||
furi_assert(browser);
|
furi_assert(browser);
|
||||||
|
|
||||||
with_view_model(
|
with_view_model(
|
||||||
|
@ -42,7 +42,7 @@ static const ArchiveFileTypeEnum known_type[] = {
|
|||||||
[ArchiveTabBrowser] = ArchiveFileTypeUnknown,
|
[ArchiveTabBrowser] = ArchiveFileTypeUnknown,
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline const ArchiveFileTypeEnum archive_get_tab_filetype(ArchiveTabEnum tab) {
|
static inline ArchiveFileTypeEnum archive_get_tab_filetype(ArchiveTabEnum tab) {
|
||||||
return known_type[tab];
|
return known_type[tab];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ void archive_set_file_type(ArchiveFile_t* file, FileInfo* file_info, const char*
|
|||||||
} else {
|
} else {
|
||||||
furi_assert(file_info);
|
furi_assert(file_info);
|
||||||
|
|
||||||
for(size_t i = 0; i < SIZEOF_ARRAY(known_ext); i++) {
|
for(size_t i = 0; i < COUNT_OF(known_ext); i++) {
|
||||||
if((known_ext[i][0] == '?') || (known_ext[i][0] == '*')) continue;
|
if((known_ext[i][0] == '?') || (known_ext[i][0] == '*')) continue;
|
||||||
if(string_search_str(file->name, known_ext[i], 0) != STRING_FAILURE) {
|
if(string_search_str(file->name, known_ext[i], 0) != STRING_FAILURE) {
|
||||||
if(i == ArchiveFileTypeBadUsb) {
|
if(i == ArchiveFileTypeBadUsb) {
|
||||||
|
@ -31,6 +31,7 @@ static void archive_loader_callback(const void* message, void* context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void archive_run_in_app(ArchiveBrowserView* browser, ArchiveFile_t* selected) {
|
static void archive_run_in_app(ArchiveBrowserView* browser, ArchiveFile_t* selected) {
|
||||||
|
UNUSED(browser);
|
||||||
Loader* loader = furi_record_open("loader");
|
Loader* loader = furi_record_open("loader");
|
||||||
|
|
||||||
LoaderStatus status;
|
LoaderStatus status;
|
||||||
|
@ -106,17 +106,17 @@ static void draw_list(Canvas* canvas, ArchiveBrowserViewModel* model) {
|
|||||||
size_t array_size = files_array_size(model->files);
|
size_t array_size = files_array_size(model->files);
|
||||||
bool scrollbar = model->item_cnt > 4;
|
bool scrollbar = model->item_cnt > 4;
|
||||||
|
|
||||||
for(size_t i = 0; i < MIN(model->item_cnt, MENU_ITEMS); ++i) {
|
for(uint32_t i = 0; i < MIN(model->item_cnt, MENU_ITEMS); ++i) {
|
||||||
string_t str_buff;
|
string_t str_buff;
|
||||||
char cstr_buff[MAX_NAME_LEN];
|
char cstr_buff[MAX_NAME_LEN];
|
||||||
size_t idx = CLAMP(i + model->list_offset, model->item_cnt, 0);
|
int32_t idx = CLAMP((uint32_t)(i + model->list_offset), model->item_cnt, 0u);
|
||||||
uint8_t x_offset = (model->move_fav && model->item_idx == idx) ? MOVE_OFFSET : 0;
|
uint8_t x_offset = (model->move_fav && model->item_idx == idx) ? MOVE_OFFSET : 0;
|
||||||
|
|
||||||
ArchiveFileTypeEnum file_type = ArchiveFileTypeLoading;
|
ArchiveFileTypeEnum file_type = ArchiveFileTypeLoading;
|
||||||
|
|
||||||
if(archive_is_item_in_array(model, idx)) {
|
if(archive_is_item_in_array(model, idx)) {
|
||||||
ArchiveFile_t* file =
|
ArchiveFile_t* file = files_array_get(
|
||||||
files_array_get(model->files, CLAMP(idx - model->array_offset, array_size - 1, 0));
|
model->files, CLAMP(idx - model->array_offset, (int32_t)(array_size - 1), 0));
|
||||||
strlcpy(cstr_buff, string_get_cstr(file->name), string_size(file->name) + 1);
|
strlcpy(cstr_buff, string_get_cstr(file->name), string_size(file->name) + 1);
|
||||||
archive_trim_file_path(cstr_buff, archive_is_known_app(file->type));
|
archive_trim_file_path(cstr_buff, archive_is_known_app(file->type));
|
||||||
string_init_set_str(str_buff, cstr_buff);
|
string_init_set_str(str_buff, cstr_buff);
|
||||||
@ -216,7 +216,7 @@ static bool is_file_list_load_required(ArchiveBrowserViewModel* model) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(((model->array_offset + array_size) < model->item_cnt) &&
|
if(((model->array_offset + array_size) < model->item_cnt) &&
|
||||||
(model->item_idx > (model->array_offset + array_size - FILE_LIST_BUF_LEN / 4))) {
|
(model->item_idx > (int32_t)(model->array_offset + array_size - FILE_LIST_BUF_LEN / 4))) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
#define MAX_NAME_LEN 255
|
#define MAX_NAME_LEN 255
|
||||||
#define MAX_EXT_LEN 6
|
#define MAX_EXT_LEN 6
|
||||||
#define FRAME_HEIGHT 12
|
#define FRAME_HEIGHT 12
|
||||||
#define MENU_ITEMS 4
|
#define MENU_ITEMS 4u
|
||||||
#define MOVE_OFFSET 5
|
#define MOVE_OFFSET 5u
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
ArchiveTabFavorites,
|
ArchiveTabFavorites,
|
||||||
|
@ -31,10 +31,13 @@ void bad_usb_scene_file_select_on_enter(void* context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool bad_usb_scene_file_select_on_event(void* context, SceneManagerEvent event) {
|
bool bad_usb_scene_file_select_on_event(void* context, SceneManagerEvent event) {
|
||||||
|
UNUSED(context);
|
||||||
|
UNUSED(event);
|
||||||
// BadUsbApp* bad_usb = context;
|
// BadUsbApp* bad_usb = context;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void bad_usb_scene_file_select_on_exit(void* context) {
|
void bad_usb_scene_file_select_on_exit(void* context) {
|
||||||
|
UNUSED(context);
|
||||||
// BadUsbApp* bad_usb = context;
|
// BadUsbApp* bad_usb = context;
|
||||||
}
|
}
|
||||||
|
@ -142,6 +142,7 @@ void bad_usb_set_ok_callback(BadUsb* bad_usb, BadUsbOkCallback callback, void* c
|
|||||||
furi_assert(callback);
|
furi_assert(callback);
|
||||||
with_view_model(
|
with_view_model(
|
||||||
bad_usb->view, (BadUsbModel * model) {
|
bad_usb->view, (BadUsbModel * model) {
|
||||||
|
UNUSED(model);
|
||||||
bad_usb->callback = callback;
|
bad_usb->callback = callback;
|
||||||
bad_usb->context = context;
|
bad_usb->context = context;
|
||||||
return true;
|
return true;
|
||||||
|
@ -13,6 +13,9 @@ static const char* bt_cli_address_types[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static void bt_cli_command_hci_info(Cli* cli, string_t args, void* context) {
|
static void bt_cli_command_hci_info(Cli* cli, string_t args, void* context) {
|
||||||
|
UNUSED(cli);
|
||||||
|
UNUSED(args);
|
||||||
|
UNUSED(context);
|
||||||
string_t buffer;
|
string_t buffer;
|
||||||
string_init(buffer);
|
string_init(buffer);
|
||||||
furi_hal_bt_dump_state(buffer);
|
furi_hal_bt_dump_state(buffer);
|
||||||
@ -21,6 +24,7 @@ static void bt_cli_command_hci_info(Cli* cli, string_t args, void* context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void bt_cli_command_carrier_tx(Cli* cli, string_t args, void* context) {
|
static void bt_cli_command_carrier_tx(Cli* cli, string_t args, void* context) {
|
||||||
|
UNUSED(context);
|
||||||
int channel = 0;
|
int channel = 0;
|
||||||
int power = 0;
|
int power = 0;
|
||||||
|
|
||||||
@ -47,6 +51,7 @@ static void bt_cli_command_carrier_tx(Cli* cli, string_t args, void* context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void bt_cli_command_carrier_rx(Cli* cli, string_t args, void* context) {
|
static void bt_cli_command_carrier_rx(Cli* cli, string_t args, void* context) {
|
||||||
|
UNUSED(context);
|
||||||
int channel = 0;
|
int channel = 0;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
@ -72,6 +77,7 @@ static void bt_cli_command_carrier_rx(Cli* cli, string_t args, void* context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void bt_cli_command_packet_tx(Cli* cli, string_t args, void* context) {
|
static void bt_cli_command_packet_tx(Cli* cli, string_t args, void* context) {
|
||||||
|
UNUSED(context);
|
||||||
int channel = 0;
|
int channel = 0;
|
||||||
int pattern = 0;
|
int pattern = 0;
|
||||||
int datarate = 1;
|
int datarate = 1;
|
||||||
@ -115,6 +121,7 @@ static void bt_cli_command_packet_tx(Cli* cli, string_t args, void* context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void bt_cli_command_packet_rx(Cli* cli, string_t args, void* context) {
|
static void bt_cli_command_packet_rx(Cli* cli, string_t args, void* context) {
|
||||||
|
UNUSED(context);
|
||||||
int channel = 0;
|
int channel = 0;
|
||||||
int datarate = 1;
|
int datarate = 1;
|
||||||
|
|
||||||
@ -152,6 +159,8 @@ static void bt_cli_scan_callback(GapAddress address, void* context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void bt_cli_command_scan(Cli* cli, string_t args, void* context) {
|
static void bt_cli_command_scan(Cli* cli, string_t args, void* context) {
|
||||||
|
UNUSED(context);
|
||||||
|
UNUSED(args);
|
||||||
osMessageQueueId_t queue = osMessageQueueNew(20, sizeof(GapAddress), NULL);
|
osMessageQueueId_t queue = osMessageQueueNew(20, sizeof(GapAddress), NULL);
|
||||||
furi_hal_bt_start_scan(bt_cli_scan_callback, queue);
|
furi_hal_bt_start_scan(bt_cli_scan_callback, queue);
|
||||||
|
|
||||||
@ -189,6 +198,7 @@ static void bt_cli_print_usage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void bt_cli(Cli* cli, string_t args, void* context) {
|
static void bt_cli(Cli* cli, string_t args, void* context) {
|
||||||
|
UNUSED(context);
|
||||||
furi_record_open("bt");
|
furi_record_open("bt");
|
||||||
|
|
||||||
string_t cmd;
|
string_t cmd;
|
||||||
|
@ -19,10 +19,12 @@ void bt_debug_submenu_callback(void* context, uint32_t index) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint32_t bt_debug_exit(void* context) {
|
uint32_t bt_debug_exit(void* context) {
|
||||||
|
UNUSED(context);
|
||||||
return VIEW_NONE;
|
return VIEW_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t bt_debug_start_view(void* context) {
|
uint32_t bt_debug_start_view(void* context) {
|
||||||
|
UNUSED(context);
|
||||||
return BtDebugAppViewSubmenu;
|
return BtDebugAppViewSubmenu;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,6 +96,7 @@ void bt_debug_app_free(BtDebugApp* app) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t bt_debug_app(void* p) {
|
int32_t bt_debug_app(void* p) {
|
||||||
|
UNUSED(p);
|
||||||
if(furi_hal_bt_get_radio_stack() != FuriHalBtStackHciLayer) {
|
if(furi_hal_bt_get_radio_stack() != FuriHalBtStackHciLayer) {
|
||||||
FURI_LOG_E(TAG, "Incorrect radio stack, replace with HciLayer for tests.");
|
FURI_LOG_E(TAG, "Incorrect radio stack, replace with HciLayer for tests.");
|
||||||
DialogsApp* dialogs = furi_record_open("dialogs");
|
DialogsApp* dialogs = furi_record_open("dialogs");
|
||||||
|
@ -141,7 +141,7 @@ BtCarrierTest* bt_carrier_test_alloc() {
|
|||||||
param = bt_test_param_add(
|
param = bt_test_param_add(
|
||||||
bt_carrier_test->bt_test,
|
bt_carrier_test->bt_test,
|
||||||
"Mode",
|
"Mode",
|
||||||
SIZEOF_ARRAY(bt_param_mode),
|
COUNT_OF(bt_param_mode),
|
||||||
bt_carrier_test_mode_changed,
|
bt_carrier_test_mode_changed,
|
||||||
bt_carrier_test);
|
bt_carrier_test);
|
||||||
bt_test_set_current_value_index(param, 0);
|
bt_test_set_current_value_index(param, 0);
|
||||||
@ -151,7 +151,7 @@ BtCarrierTest* bt_carrier_test_alloc() {
|
|||||||
param = bt_test_param_add(
|
param = bt_test_param_add(
|
||||||
bt_carrier_test->bt_test,
|
bt_carrier_test->bt_test,
|
||||||
"Channel",
|
"Channel",
|
||||||
SIZEOF_ARRAY(bt_param_channel),
|
COUNT_OF(bt_param_channel),
|
||||||
bt_carrier_test_channel_changed,
|
bt_carrier_test_channel_changed,
|
||||||
bt_carrier_test);
|
bt_carrier_test);
|
||||||
bt_test_set_current_value_index(param, 0);
|
bt_test_set_current_value_index(param, 0);
|
||||||
@ -162,7 +162,7 @@ BtCarrierTest* bt_carrier_test_alloc() {
|
|||||||
param = bt_test_param_add(
|
param = bt_test_param_add(
|
||||||
bt_carrier_test->bt_test,
|
bt_carrier_test->bt_test,
|
||||||
"Power",
|
"Power",
|
||||||
SIZEOF_ARRAY(bt_param_power),
|
COUNT_OF(bt_param_power),
|
||||||
bt_carrier_test_param_channel,
|
bt_carrier_test_param_channel,
|
||||||
bt_carrier_test);
|
bt_carrier_test);
|
||||||
bt_test_set_current_value_index(param, 0);
|
bt_test_set_current_value_index(param, 0);
|
||||||
|
@ -109,7 +109,7 @@ BtPacketTest* bt_packet_test_alloc() {
|
|||||||
param = bt_test_param_add(
|
param = bt_test_param_add(
|
||||||
bt_packet_test->bt_test,
|
bt_packet_test->bt_test,
|
||||||
"Mode",
|
"Mode",
|
||||||
SIZEOF_ARRAY(bt_param_mode),
|
COUNT_OF(bt_param_mode),
|
||||||
bt_packet_test_mode_changed,
|
bt_packet_test_mode_changed,
|
||||||
bt_packet_test);
|
bt_packet_test);
|
||||||
bt_test_set_current_value_index(param, 0);
|
bt_test_set_current_value_index(param, 0);
|
||||||
@ -119,7 +119,7 @@ BtPacketTest* bt_packet_test_alloc() {
|
|||||||
param = bt_test_param_add(
|
param = bt_test_param_add(
|
||||||
bt_packet_test->bt_test,
|
bt_packet_test->bt_test,
|
||||||
"Channel",
|
"Channel",
|
||||||
SIZEOF_ARRAY(bt_param_channel),
|
COUNT_OF(bt_param_channel),
|
||||||
bt_packet_test_channel_changed,
|
bt_packet_test_channel_changed,
|
||||||
bt_packet_test);
|
bt_packet_test);
|
||||||
bt_test_set_current_value_index(param, 0);
|
bt_test_set_current_value_index(param, 0);
|
||||||
@ -129,7 +129,7 @@ BtPacketTest* bt_packet_test_alloc() {
|
|||||||
param = bt_test_param_add(
|
param = bt_test_param_add(
|
||||||
bt_packet_test->bt_test,
|
bt_packet_test->bt_test,
|
||||||
"Data rate",
|
"Data rate",
|
||||||
SIZEOF_ARRAY(bt_param_data_rate),
|
COUNT_OF(bt_param_data_rate),
|
||||||
bt_packet_test_param_channel,
|
bt_packet_test_param_channel,
|
||||||
bt_packet_test);
|
bt_packet_test);
|
||||||
bt_test_set_current_value_index(param, 0);
|
bt_test_set_current_value_index(param, 0);
|
||||||
|
@ -33,10 +33,12 @@ void bt_hid_dialog_callback(DialogExResult result, void* context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint32_t bt_hid_exit_confirm_view(void* context) {
|
uint32_t bt_hid_exit_confirm_view(void* context) {
|
||||||
|
UNUSED(context);
|
||||||
return BtHidViewExitConfirm;
|
return BtHidViewExitConfirm;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t bt_hid_exit(void* context) {
|
uint32_t bt_hid_exit(void* context) {
|
||||||
|
UNUSED(context);
|
||||||
return VIEW_NONE;
|
return VIEW_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -139,6 +141,7 @@ void bt_hid_app_free(BtHid* app) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t bt_hid_app(void* p) {
|
int32_t bt_hid_app(void* p) {
|
||||||
|
UNUSED(p);
|
||||||
// Switch profile to Hid
|
// Switch profile to Hid
|
||||||
BtHid* app = bt_hid_app_alloc();
|
BtHid* app = bt_hid_app_alloc();
|
||||||
bt_set_status_changed_callback(app->bt, bt_hid_connection_status_changed_callback, app);
|
bt_set_status_changed_callback(app->bt, bt_hid_connection_status_changed_callback, app);
|
||||||
|
@ -76,6 +76,7 @@ void bt_settings_app_free(BtSettingsApp* app) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
extern int32_t bt_settings_app(void* p) {
|
extern int32_t bt_settings_app(void* p) {
|
||||||
|
UNUSED(p);
|
||||||
BtSettingsApp* app = bt_settings_app_alloc();
|
BtSettingsApp* app = bt_settings_app_alloc();
|
||||||
view_dispatcher_run(app->view_dispatcher);
|
view_dispatcher_run(app->view_dispatcher);
|
||||||
bt_settings_save(&app->settings);
|
bt_settings_save(&app->settings);
|
||||||
|
@ -130,10 +130,12 @@ void cli_motd() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void cli_nl(Cli* cli) {
|
void cli_nl(Cli* cli) {
|
||||||
|
UNUSED(cli);
|
||||||
printf("\r\n");
|
printf("\r\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void cli_prompt(Cli* cli) {
|
void cli_prompt(Cli* cli) {
|
||||||
|
UNUSED(cli);
|
||||||
printf("\r\n>: %s", string_get_cstr(cli->line));
|
printf("\r\n>: %s", string_get_cstr(cli->line));
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
@ -451,6 +453,7 @@ void cli_session_close(Cli* cli) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t cli_srv(void* p) {
|
int32_t cli_srv(void* p) {
|
||||||
|
UNUSED(p);
|
||||||
Cli* cli = cli_alloc();
|
Cli* cli = cli_alloc();
|
||||||
|
|
||||||
// Init basic cli commands
|
// Init basic cli commands
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
#define CLI_DATE_FORMAT "%.4d-%.2d-%.2d %.2d:%.2d:%.2d %d"
|
#define CLI_DATE_FORMAT "%.4d-%.2d-%.2d %.2d:%.2d:%.2d %d"
|
||||||
|
|
||||||
void cli_command_device_info_callback(const char* key, const char* value, bool last, void* context) {
|
void cli_command_device_info_callback(const char* key, const char* value, bool last, void* context) {
|
||||||
|
UNUSED(context);
|
||||||
|
UNUSED(last);
|
||||||
printf("%-24s: %s\r\n", key, value);
|
printf("%-24s: %s\r\n", key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -20,11 +22,14 @@ void cli_command_device_info_callback(const char* key, const char* value, bool l
|
|||||||
* This command is intended to be used by humans
|
* This command is intended to be used by humans
|
||||||
*/
|
*/
|
||||||
void cli_command_device_info(Cli* cli, string_t args, void* context) {
|
void cli_command_device_info(Cli* cli, string_t args, void* context) {
|
||||||
|
UNUSED(cli);
|
||||||
|
UNUSED(args);
|
||||||
furi_hal_info_get(cli_command_device_info_callback, context);
|
furi_hal_info_get(cli_command_device_info_callback, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cli_command_help(Cli* cli, string_t args, void* context) {
|
void cli_command_help(Cli* cli, string_t args, void* context) {
|
||||||
(void)args;
|
UNUSED(args);
|
||||||
|
UNUSED(context);
|
||||||
printf("Commands we have:");
|
printf("Commands we have:");
|
||||||
|
|
||||||
// Command count
|
// Command count
|
||||||
@ -62,6 +67,9 @@ void cli_command_help(Cli* cli, string_t args, void* context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void cli_command_date(Cli* cli, string_t args, void* context) {
|
void cli_command_date(Cli* cli, string_t args, void* context) {
|
||||||
|
UNUSED(cli);
|
||||||
|
UNUSED(context);
|
||||||
|
|
||||||
FuriHalRtcDateTime datetime = {0};
|
FuriHalRtcDateTime datetime = {0};
|
||||||
|
|
||||||
if(string_size(args) > 0) {
|
if(string_size(args) > 0) {
|
||||||
@ -135,6 +143,8 @@ void cli_command_log_tx_callback(const uint8_t* buffer, size_t size, void* conte
|
|||||||
}
|
}
|
||||||
|
|
||||||
void cli_command_log(Cli* cli, string_t args, void* context) {
|
void cli_command_log(Cli* cli, string_t args, void* context) {
|
||||||
|
UNUSED(args);
|
||||||
|
UNUSED(context);
|
||||||
StreamBufferHandle_t ring = xStreamBufferCreate(CLI_COMMAND_LOG_RING_SIZE, 1);
|
StreamBufferHandle_t ring = xStreamBufferCreate(CLI_COMMAND_LOG_RING_SIZE, 1);
|
||||||
uint8_t buffer[CLI_COMMAND_LOG_BUFFER_SIZE];
|
uint8_t buffer[CLI_COMMAND_LOG_BUFFER_SIZE];
|
||||||
|
|
||||||
@ -152,6 +162,8 @@ void cli_command_log(Cli* cli, string_t args, void* context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void cli_command_vibro(Cli* cli, string_t args, void* context) {
|
void cli_command_vibro(Cli* cli, string_t args, void* context) {
|
||||||
|
UNUSED(cli);
|
||||||
|
UNUSED(context);
|
||||||
if(!string_cmp(args, "0")) {
|
if(!string_cmp(args, "0")) {
|
||||||
NotificationApp* notification = furi_record_open("notification");
|
NotificationApp* notification = furi_record_open("notification");
|
||||||
notification_message_block(notification, &sequence_reset_vibro);
|
notification_message_block(notification, &sequence_reset_vibro);
|
||||||
@ -166,6 +178,8 @@ void cli_command_vibro(Cli* cli, string_t args, void* context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void cli_command_debug(Cli* cli, string_t args, void* context) {
|
void cli_command_debug(Cli* cli, string_t args, void* context) {
|
||||||
|
UNUSED(cli);
|
||||||
|
UNUSED(context);
|
||||||
if(!string_cmp(args, "0")) {
|
if(!string_cmp(args, "0")) {
|
||||||
furi_hal_rtc_reset_flag(FuriHalRtcFlagDebug);
|
furi_hal_rtc_reset_flag(FuriHalRtcFlagDebug);
|
||||||
loader_update_menu();
|
loader_update_menu();
|
||||||
@ -180,6 +194,8 @@ void cli_command_debug(Cli* cli, string_t args, void* context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void cli_command_led(Cli* cli, string_t args, void* context) {
|
void cli_command_led(Cli* cli, string_t args, void* context) {
|
||||||
|
UNUSED(cli);
|
||||||
|
UNUSED(context);
|
||||||
// Get first word as light name
|
// Get first word as light name
|
||||||
NotificationMessage notification_led_message;
|
NotificationMessage notification_led_message;
|
||||||
string_t light_name;
|
string_t light_name;
|
||||||
@ -233,6 +249,7 @@ void cli_command_led(Cli* cli, string_t args, void* context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void cli_command_gpio_set(Cli* cli, string_t args, void* context) {
|
void cli_command_gpio_set(Cli* cli, string_t args, void* context) {
|
||||||
|
UNUSED(context);
|
||||||
char pin_names[][4] = {
|
char pin_names[][4] = {
|
||||||
"PC0",
|
"PC0",
|
||||||
"PC1",
|
"PC1",
|
||||||
@ -313,6 +330,8 @@ void cli_command_gpio_set(Cli* cli, string_t args, void* context) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
UNUSED(cli);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
LL_GPIO_SetPinMode(gpio[num].port, gpio[num].pin, LL_GPIO_MODE_OUTPUT);
|
LL_GPIO_SetPinMode(gpio[num].port, gpio[num].pin, LL_GPIO_MODE_OUTPUT);
|
||||||
@ -325,6 +344,10 @@ void cli_command_gpio_set(Cli* cli, string_t args, void* context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void cli_command_ps(Cli* cli, string_t args, void* context) {
|
void cli_command_ps(Cli* cli, string_t args, void* context) {
|
||||||
|
UNUSED(cli);
|
||||||
|
UNUSED(args);
|
||||||
|
UNUSED(context);
|
||||||
|
|
||||||
const uint8_t threads_num_max = 32;
|
const uint8_t threads_num_max = 32;
|
||||||
osThreadId_t threads_id[threads_num_max];
|
osThreadId_t threads_id[threads_num_max];
|
||||||
uint8_t thread_num = osThreadEnumerate(threads_id, threads_num_max);
|
uint8_t thread_num = osThreadEnumerate(threads_id, threads_num_max);
|
||||||
@ -344,6 +367,10 @@ void cli_command_ps(Cli* cli, string_t args, void* context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void cli_command_free(Cli* cli, string_t args, void* context) {
|
void cli_command_free(Cli* cli, string_t args, void* context) {
|
||||||
|
UNUSED(cli);
|
||||||
|
UNUSED(args);
|
||||||
|
UNUSED(context);
|
||||||
|
|
||||||
printf("Free heap size: %d\r\n", memmgr_get_free_heap());
|
printf("Free heap size: %d\r\n", memmgr_get_free_heap());
|
||||||
printf("Total heap size: %d\r\n", memmgr_get_total_heap());
|
printf("Total heap size: %d\r\n", memmgr_get_total_heap());
|
||||||
printf("Minimum heap size: %d\r\n", memmgr_get_minimum_free_heap());
|
printf("Minimum heap size: %d\r\n", memmgr_get_minimum_free_heap());
|
||||||
@ -351,10 +378,18 @@ void cli_command_free(Cli* cli, string_t args, void* context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void cli_command_free_blocks(Cli* cli, string_t args, void* context) {
|
void cli_command_free_blocks(Cli* cli, string_t args, void* context) {
|
||||||
|
UNUSED(cli);
|
||||||
|
UNUSED(args);
|
||||||
|
UNUSED(context);
|
||||||
|
|
||||||
memmgr_heap_printf_free_blocks();
|
memmgr_heap_printf_free_blocks();
|
||||||
}
|
}
|
||||||
|
|
||||||
void cli_command_i2c(Cli* cli, string_t args, void* context) {
|
void cli_command_i2c(Cli* cli, string_t args, void* context) {
|
||||||
|
UNUSED(cli);
|
||||||
|
UNUSED(args);
|
||||||
|
UNUSED(context);
|
||||||
|
|
||||||
furi_hal_i2c_acquire(&furi_hal_i2c_handle_external);
|
furi_hal_i2c_acquire(&furi_hal_i2c_handle_external);
|
||||||
printf("Scanning external i2c on PC0(SCL)/PC1(SDA)\r\n"
|
printf("Scanning external i2c on PC0(SCL)/PC1(SDA)\r\n"
|
||||||
"Clock: 100khz, 7bit address\r\n"
|
"Clock: 100khz, 7bit address\r\n"
|
||||||
|
@ -86,6 +86,7 @@ static void cli_vcp_deinit() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int32_t vcp_worker(void* context) {
|
static int32_t vcp_worker(void* context) {
|
||||||
|
UNUSED(context);
|
||||||
bool tx_idle = true;
|
bool tx_idle = true;
|
||||||
size_t missed_rx = 0;
|
size_t missed_rx = 0;
|
||||||
uint8_t last_tx_pkt_len = 0;
|
uint8_t last_tx_pkt_len = 0;
|
||||||
@ -148,7 +149,7 @@ static int32_t vcp_worker(void* context) {
|
|||||||
if(len > 0) {
|
if(len > 0) {
|
||||||
furi_check(
|
furi_check(
|
||||||
xStreamBufferSend(vcp->rx_stream, vcp->data_buffer, len, osWaitForever) ==
|
xStreamBufferSend(vcp->rx_stream, vcp->data_buffer, len, osWaitForever) ==
|
||||||
len);
|
(size_t)len);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
#ifdef CLI_VCP_DEBUG
|
#ifdef CLI_VCP_DEBUG
|
||||||
@ -275,16 +276,19 @@ static void cli_vcp_tx(const uint8_t* buffer, size_t size) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void cli_vcp_tx_stdout(void* _cookie, const char* data, size_t size) {
|
static void cli_vcp_tx_stdout(void* _cookie, const char* data, size_t size) {
|
||||||
|
UNUSED(_cookie);
|
||||||
cli_vcp_tx((const uint8_t*)data, size);
|
cli_vcp_tx((const uint8_t*)data, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void vcp_state_callback(void* context, uint8_t state) {
|
static void vcp_state_callback(void* context, uint8_t state) {
|
||||||
|
UNUSED(context);
|
||||||
if(state == 0) {
|
if(state == 0) {
|
||||||
osThreadFlagsSet(furi_thread_get_thread_id(vcp->thread), VcpEvtDisconnect);
|
osThreadFlagsSet(furi_thread_get_thread_id(vcp->thread), VcpEvtDisconnect);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void vcp_on_cdc_control_line(void* context, uint8_t state) {
|
static void vcp_on_cdc_control_line(void* context, uint8_t state) {
|
||||||
|
UNUSED(context);
|
||||||
// bit 0: DTR state, bit 1: RTS state
|
// bit 0: DTR state, bit 1: RTS state
|
||||||
bool dtr = state & (1 << 0);
|
bool dtr = state & (1 << 0);
|
||||||
|
|
||||||
@ -296,11 +300,13 @@ static void vcp_on_cdc_control_line(void* context, uint8_t state) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void vcp_on_cdc_rx(void* context) {
|
static void vcp_on_cdc_rx(void* context) {
|
||||||
|
UNUSED(context);
|
||||||
uint32_t ret = osThreadFlagsSet(furi_thread_get_thread_id(vcp->thread), VcpEvtRx);
|
uint32_t ret = osThreadFlagsSet(furi_thread_get_thread_id(vcp->thread), VcpEvtRx);
|
||||||
furi_check((ret & osFlagsError) == 0);
|
furi_check((ret & osFlagsError) == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void vcp_on_cdc_tx_complete(void* context) {
|
static void vcp_on_cdc_tx_complete(void* context) {
|
||||||
|
UNUSED(context);
|
||||||
osThreadFlagsSet(furi_thread_get_thread_id(vcp->thread), VcpEvtTx);
|
osThreadFlagsSet(furi_thread_get_thread_id(vcp->thread), VcpEvtTx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,6 +164,7 @@ void crypto_cli_decrypt(Cli* cli, string_t args) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void crypto_cli_has_key(Cli* cli, string_t args) {
|
void crypto_cli_has_key(Cli* cli, string_t args) {
|
||||||
|
UNUSED(cli);
|
||||||
int key_slot = 0;
|
int key_slot = 0;
|
||||||
uint8_t iv[16];
|
uint8_t iv[16];
|
||||||
|
|
||||||
@ -185,6 +186,7 @@ void crypto_cli_has_key(Cli* cli, string_t args) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void crypto_cli_store_key(Cli* cli, string_t args) {
|
void crypto_cli_store_key(Cli* cli, string_t args) {
|
||||||
|
UNUSED(cli);
|
||||||
int key_slot = 0;
|
int key_slot = 0;
|
||||||
int key_size = 0;
|
int key_size = 0;
|
||||||
string_t key_type;
|
string_t key_type;
|
||||||
@ -277,6 +279,7 @@ void crypto_cli_store_key(Cli* cli, string_t args) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void crypto_cli(Cli* cli, string_t args, void* context) {
|
static void crypto_cli(Cli* cli, string_t args, void* context) {
|
||||||
|
UNUSED(context);
|
||||||
string_t cmd;
|
string_t cmd;
|
||||||
string_init(cmd);
|
string_init(cmd);
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@ static void blink_test_update(void* ctx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void blink_test_draw_callback(Canvas* canvas, void* ctx) {
|
static void blink_test_draw_callback(Canvas* canvas, void* ctx) {
|
||||||
|
UNUSED(ctx);
|
||||||
canvas_clear(canvas);
|
canvas_clear(canvas);
|
||||||
canvas_set_font(canvas, FontPrimary);
|
canvas_set_font(canvas, FontPrimary);
|
||||||
canvas_draw_str(canvas, 2, 10, "Blink application");
|
canvas_draw_str(canvas, 2, 10, "Blink application");
|
||||||
@ -41,6 +42,7 @@ static void blink_test_input_callback(InputEvent* input_event, void* ctx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t blink_test_app(void* p) {
|
int32_t blink_test_app(void* p) {
|
||||||
|
UNUSED(p);
|
||||||
osMessageQueueId_t event_queue = osMessageQueueNew(8, sizeof(BlinkEvent), NULL);
|
osMessageQueueId_t event_queue = osMessageQueueNew(8, sizeof(BlinkEvent), NULL);
|
||||||
|
|
||||||
// Configure view port
|
// Configure view port
|
||||||
|
@ -70,10 +70,12 @@ static void display_test_submenu_callback(void* context, uint32_t index) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t display_test_previous_callback(void* context) {
|
static uint32_t display_test_previous_callback(void* context) {
|
||||||
|
UNUSED(context);
|
||||||
return DisplayTestViewSubmenu;
|
return DisplayTestViewSubmenu;
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t display_test_exit_callback(void* context) {
|
static uint32_t display_test_exit_callback(void* context) {
|
||||||
|
UNUSED(context);
|
||||||
return VIEW_NONE;
|
return VIEW_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -210,6 +212,7 @@ void display_test_free(DisplayTest* instance) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t display_test_run(DisplayTest* instance) {
|
int32_t display_test_run(DisplayTest* instance) {
|
||||||
|
UNUSED(instance);
|
||||||
view_dispatcher_switch_to_view(instance->view_dispatcher, DisplayTestViewSubmenu);
|
view_dispatcher_switch_to_view(instance->view_dispatcher, DisplayTestViewSubmenu);
|
||||||
view_dispatcher_run(instance->view_dispatcher);
|
view_dispatcher_run(instance->view_dispatcher);
|
||||||
|
|
||||||
@ -217,6 +220,8 @@ int32_t display_test_run(DisplayTest* instance) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t display_test_app(void* p) {
|
int32_t display_test_app(void* p) {
|
||||||
|
UNUSED(p);
|
||||||
|
|
||||||
DisplayTest* instance = display_test_alloc();
|
DisplayTest* instance = display_test_alloc();
|
||||||
|
|
||||||
int32_t ret = display_test_run(instance);
|
int32_t ret = display_test_run(instance);
|
||||||
|
@ -13,6 +13,7 @@ struct ViewDisplayTest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static void view_display_test_draw_callback_intro(Canvas* canvas, void* _model) {
|
static void view_display_test_draw_callback_intro(Canvas* canvas, void* _model) {
|
||||||
|
UNUSED(_model);
|
||||||
canvas_draw_str(canvas, 12, 24, "Use < and > to switch tests");
|
canvas_draw_str(canvas, 12, 24, "Use < and > to switch tests");
|
||||||
canvas_draw_str(canvas, 12, 36, "Use ^ and v to switch size");
|
canvas_draw_str(canvas, 12, 36, "Use ^ and v to switch size");
|
||||||
canvas_draw_str(canvas, 32, 48, "Use (o) to flip");
|
canvas_draw_str(canvas, 32, 48, "Use (o) to flip");
|
||||||
|
@ -60,6 +60,7 @@ static void keypad_test_input_callback(InputEvent* input_event, void* ctx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t keypad_test_app(void* p) {
|
int32_t keypad_test_app(void* p) {
|
||||||
|
UNUSED(p);
|
||||||
osMessageQueueId_t event_queue = osMessageQueueNew(32, sizeof(InputEvent), NULL);
|
osMessageQueueId_t event_queue = osMessageQueueNew(32, sizeof(InputEvent), NULL);
|
||||||
furi_check(event_queue);
|
furi_check(event_queue);
|
||||||
|
|
||||||
|
@ -70,6 +70,7 @@ static void text_box_test_input_callback(InputEvent* input_event, void* ctx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t text_box_test_app(void* p) {
|
int32_t text_box_test_app(void* p) {
|
||||||
|
UNUSED(p);
|
||||||
osMessageQueueId_t event_queue = osMessageQueueNew(32, sizeof(InputEvent), NULL);
|
osMessageQueueId_t event_queue = osMessageQueueNew(32, sizeof(InputEvent), NULL);
|
||||||
furi_check(event_queue);
|
furi_check(event_queue);
|
||||||
|
|
||||||
@ -90,7 +91,7 @@ int32_t text_box_test_app(void* p) {
|
|||||||
Gui* gui = furi_record_open("gui");
|
Gui* gui = furi_record_open("gui");
|
||||||
gui_add_view_port(gui, view_port, GuiLayerFullscreen);
|
gui_add_view_port(gui, view_port, GuiLayerFullscreen);
|
||||||
|
|
||||||
uint32_t test_renders_num = SIZEOF_ARRAY(text_box_test_render);
|
uint32_t test_renders_num = COUNT_OF(text_box_test_render);
|
||||||
InputEvent event;
|
InputEvent event;
|
||||||
while(osMessageQueueGet(event_queue, &event, NULL, osWaitForever) == osOK) {
|
while(osMessageQueueGet(event_queue, &event, NULL, osWaitForever) == osOK) {
|
||||||
TextBoxTestState* state = acquire_mutex_block(&state_mutex);
|
TextBoxTestState* state = acquire_mutex_block(&state_mutex);
|
||||||
|
@ -80,11 +80,13 @@ static void uart_echo_view_draw_callback(Canvas* canvas, void* _model) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static bool uart_echo_view_input_callback(InputEvent* event, void* context) {
|
static bool uart_echo_view_input_callback(InputEvent* event, void* context) {
|
||||||
bool consumed = false;
|
UNUSED(event);
|
||||||
return consumed;
|
UNUSED(context);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t uart_echo_exit(void* context) {
|
static uint32_t uart_echo_exit(void* context) {
|
||||||
|
UNUSED(context);
|
||||||
return VIEW_NONE;
|
return VIEW_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -170,7 +172,10 @@ static int32_t uart_echo_worker(void* context) {
|
|||||||
|
|
||||||
notification_message(app->notification, &sequence_notification);
|
notification_message(app->notification, &sequence_notification);
|
||||||
with_view_model(
|
with_view_model(
|
||||||
app->view, (UartDumpModel * model) { return true; });
|
app->view, (UartDumpModel * model) {
|
||||||
|
UNUSED(model);
|
||||||
|
return true;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -261,6 +266,7 @@ static void uart_echo_app_free(UartEchoApp* app) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t uart_echo_app(void* p) {
|
int32_t uart_echo_app(void* p) {
|
||||||
|
UNUSED(p);
|
||||||
UartEchoApp* app = uart_echo_app_alloc();
|
UartEchoApp* app = uart_echo_app_alloc();
|
||||||
view_dispatcher_run(app->view_dispatcher);
|
view_dispatcher_run(app->view_dispatcher);
|
||||||
uart_echo_app_free(app);
|
uart_echo_app_free(app);
|
||||||
|
@ -18,6 +18,7 @@ typedef struct {
|
|||||||
} UsbMouseEvent;
|
} UsbMouseEvent;
|
||||||
|
|
||||||
static void usb_mouse_render_callback(Canvas* canvas, void* ctx) {
|
static void usb_mouse_render_callback(Canvas* canvas, void* ctx) {
|
||||||
|
UNUSED(ctx);
|
||||||
canvas_clear(canvas);
|
canvas_clear(canvas);
|
||||||
|
|
||||||
canvas_set_font(canvas, FontPrimary);
|
canvas_set_font(canvas, FontPrimary);
|
||||||
@ -37,6 +38,7 @@ static void usb_mouse_input_callback(InputEvent* input_event, void* ctx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t usb_mouse_app(void* p) {
|
int32_t usb_mouse_app(void* p) {
|
||||||
|
UNUSED(p);
|
||||||
osMessageQueueId_t event_queue = osMessageQueueNew(8, sizeof(UsbMouseEvent), NULL);
|
osMessageQueueId_t event_queue = osMessageQueueNew(8, sizeof(UsbMouseEvent), NULL);
|
||||||
furi_check(event_queue);
|
furi_check(event_queue);
|
||||||
ViewPort* view_port = view_port_alloc();
|
ViewPort* view_port = view_port_alloc();
|
||||||
|
@ -51,6 +51,7 @@ void usb_test_submenu_callback(void* context, uint32_t index) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint32_t usb_test_exit(void* context) {
|
uint32_t usb_test_exit(void* context) {
|
||||||
|
UNUSED(context);
|
||||||
return VIEW_NONE;
|
return VIEW_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -113,6 +114,7 @@ void usb_test_app_free(UsbTestApp* app) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t usb_test_app(void* p) {
|
int32_t usb_test_app(void* p) {
|
||||||
|
UNUSED(p);
|
||||||
UsbTestApp* app = usb_test_app_alloc();
|
UsbTestApp* app = usb_test_app_alloc();
|
||||||
|
|
||||||
view_dispatcher_run(app->view_dispatcher);
|
view_dispatcher_run(app->view_dispatcher);
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
#include <notification/notification_messages.h>
|
#include <notification/notification_messages.h>
|
||||||
|
|
||||||
void vibro_test_draw_callback(Canvas* canvas, void* ctx) {
|
void vibro_test_draw_callback(Canvas* canvas, void* ctx) {
|
||||||
|
UNUSED(ctx);
|
||||||
canvas_clear(canvas);
|
canvas_clear(canvas);
|
||||||
canvas_set_font(canvas, FontPrimary);
|
canvas_set_font(canvas, FontPrimary);
|
||||||
canvas_draw_str(canvas, 2, 10, "Vibro application");
|
canvas_draw_str(canvas, 2, 10, "Vibro application");
|
||||||
@ -22,6 +23,7 @@ void vibro_test_input_callback(InputEvent* input_event, void* ctx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t vibro_test_app(void* p) {
|
int32_t vibro_test_app(void* p) {
|
||||||
|
UNUSED(p);
|
||||||
osMessageQueueId_t event_queue = osMessageQueueNew(8, sizeof(InputEvent), NULL);
|
osMessageQueueId_t event_queue = osMessageQueueNew(8, sizeof(InputEvent), NULL);
|
||||||
|
|
||||||
// Configure view port
|
// Configure view port
|
||||||
|
@ -364,6 +364,7 @@ static bool animation_manager_is_valid_idle_animation(
|
|||||||
|
|
||||||
static StorageAnimation*
|
static StorageAnimation*
|
||||||
animation_manager_select_idle_animation(AnimationManager* animation_manager) {
|
animation_manager_select_idle_animation(AnimationManager* animation_manager) {
|
||||||
|
UNUSED(animation_manager);
|
||||||
StorageAnimationList_t animation_list;
|
StorageAnimationList_t animation_list;
|
||||||
StorageAnimationList_init(animation_list);
|
StorageAnimationList_init(animation_list);
|
||||||
animation_storage_fill_animation_list(&animation_list);
|
animation_storage_fill_animation_list(&animation_list);
|
||||||
|
@ -130,7 +130,7 @@ void animation_storage_fill_animation_list(StorageAnimationList_t* animation_lis
|
|||||||
flipper_format_free(file);
|
flipper_format_free(file);
|
||||||
|
|
||||||
// add hard-coded animations
|
// add hard-coded animations
|
||||||
for(int i = 0; i < dolphin_internal_size; ++i) {
|
for(size_t i = 0; i < dolphin_internal_size; ++i) {
|
||||||
StorageAnimationList_push_back(*animation_list, (StorageAnimation*)&dolphin_internal[i]);
|
StorageAnimationList_push_back(*animation_list, (StorageAnimation*)&dolphin_internal[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -142,7 +142,7 @@ StorageAnimation* animation_storage_find_animation(const char* name) {
|
|||||||
furi_assert(strlen(name));
|
furi_assert(strlen(name));
|
||||||
StorageAnimation* storage_animation = NULL;
|
StorageAnimation* storage_animation = NULL;
|
||||||
|
|
||||||
for(int i = 0; i < dolphin_blocking_size; ++i) {
|
for(size_t i = 0; i < dolphin_blocking_size; ++i) {
|
||||||
if(!strcmp(dolphin_blocking[i].manifest_info.name, name)) {
|
if(!strcmp(dolphin_blocking[i].manifest_info.name, name)) {
|
||||||
storage_animation = (StorageAnimation*)&dolphin_blocking[i];
|
storage_animation = (StorageAnimation*)&dolphin_blocking[i];
|
||||||
break;
|
break;
|
||||||
@ -150,7 +150,7 @@ StorageAnimation* animation_storage_find_animation(const char* name) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!storage_animation) {
|
if(!storage_animation) {
|
||||||
for(int i = 0; i < dolphin_internal_size; ++i) {
|
for(size_t i = 0; i < dolphin_internal_size; ++i) {
|
||||||
if(!strcmp(dolphin_internal[i].manifest_info.name, name)) {
|
if(!strcmp(dolphin_internal[i].manifest_info.name, name)) {
|
||||||
storage_animation = (StorageAnimation*)&dolphin_internal[i];
|
storage_animation = (StorageAnimation*)&dolphin_internal[i];
|
||||||
break;
|
break;
|
||||||
@ -365,7 +365,7 @@ static bool animation_storage_load_bubbles(BubbleAnimation* animation, FlipperFo
|
|||||||
animation->frame_bubble_sequences =
|
animation->frame_bubble_sequences =
|
||||||
malloc(sizeof(FrameBubble*) * animation->frame_bubble_sequences_count);
|
malloc(sizeof(FrameBubble*) * animation->frame_bubble_sequences_count);
|
||||||
|
|
||||||
uint32_t current_slot = 0;
|
int32_t current_slot = 0;
|
||||||
for(int i = 0; i < animation->frame_bubble_sequences_count; ++i) {
|
for(int i = 0; i < animation->frame_bubble_sequences_count; ++i) {
|
||||||
FURI_CONST_ASSIGN_PTR(
|
FURI_CONST_ASSIGN_PTR(
|
||||||
animation->frame_bubble_sequences[i], malloc(sizeof(FrameBubble)));
|
animation->frame_bubble_sequences[i], malloc(sizeof(FrameBubble)));
|
||||||
@ -374,7 +374,7 @@ static bool animation_storage_load_bubbles(BubbleAnimation* animation, FlipperFo
|
|||||||
const FrameBubble* bubble = animation->frame_bubble_sequences[0];
|
const FrameBubble* bubble = animation->frame_bubble_sequences[0];
|
||||||
int8_t index = -1;
|
int8_t index = -1;
|
||||||
for(;;) {
|
for(;;) {
|
||||||
if(!flipper_format_read_uint32(ff, "Slot", ¤t_slot, 1)) break;
|
if(!flipper_format_read_int32(ff, "Slot", ¤t_slot, 1)) break;
|
||||||
if((current_slot != 0) && (index == -1)) break;
|
if((current_slot != 0) && (index == -1)) break;
|
||||||
|
|
||||||
if(current_slot == index) {
|
if(current_slot == index) {
|
||||||
|
@ -33,6 +33,7 @@ static void desktop_loader_callback(const void* message, void* context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void desktop_lock_icon_callback(Canvas* canvas, void* context) {
|
static void desktop_lock_icon_callback(Canvas* canvas, void* context) {
|
||||||
|
UNUSED(context);
|
||||||
furi_assert(canvas);
|
furi_assert(canvas);
|
||||||
canvas_draw_icon(canvas, 0, 0, &I_Lock_8x8);
|
canvas_draw_icon(canvas, 0, 0, &I_Lock_8x8);
|
||||||
}
|
}
|
||||||
@ -298,6 +299,7 @@ static bool desktop_is_first_start() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t desktop_srv(void* p) {
|
int32_t desktop_srv(void* p) {
|
||||||
|
UNUSED(p);
|
||||||
Desktop* desktop = desktop_alloc();
|
Desktop* desktop = desktop_alloc();
|
||||||
|
|
||||||
bool loaded = LOAD_DESKTOP_SETTINGS(&desktop->settings);
|
bool loaded = LOAD_DESKTOP_SETTINGS(&desktop->settings);
|
||||||
|
@ -53,4 +53,5 @@ bool desktop_settings_scene_pin_disable_on_event(void* context, SceneManagerEven
|
|||||||
}
|
}
|
||||||
|
|
||||||
void desktop_settings_scene_pin_disable_on_exit(void* context) {
|
void desktop_settings_scene_pin_disable_on_exit(void* context) {
|
||||||
|
UNUSED(context);
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,7 @@ static void pin_error_back_callback(void* context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void pin_error_done_callback(const PinCode* pin_code, void* context) {
|
static void pin_error_done_callback(const PinCode* pin_code, void* context) {
|
||||||
|
UNUSED(pin_code);
|
||||||
furi_assert(context);
|
furi_assert(context);
|
||||||
DesktopSettingsApp* app = context;
|
DesktopSettingsApp* app = context;
|
||||||
view_dispatcher_send_custom_event(app->view_dispatcher, SCENE_EVENT_EXIT);
|
view_dispatcher_send_custom_event(app->view_dispatcher, SCENE_EVENT_EXIT);
|
||||||
|
@ -41,4 +41,5 @@ bool desktop_settings_scene_pin_setup_howto_on_event(void* context, SceneManager
|
|||||||
}
|
}
|
||||||
|
|
||||||
void desktop_settings_scene_pin_setup_howto_on_exit(void* context) {
|
void desktop_settings_scene_pin_setup_howto_on_exit(void* context) {
|
||||||
|
UNUSED(context);
|
||||||
}
|
}
|
||||||
|
@ -47,5 +47,6 @@ bool desktop_scene_fault_on_event(void* context, SceneManagerEvent event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void desktop_scene_fault_on_exit(void* context) {
|
void desktop_scene_fault_on_exit(void* context) {
|
||||||
|
UNUSED(context);
|
||||||
furi_hal_rtc_set_fault_data(0);
|
furi_hal_rtc_set_fault_data(0);
|
||||||
}
|
}
|
||||||
|
@ -50,4 +50,5 @@ bool desktop_scene_first_start_on_event(void* context, SceneManagerEvent event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void desktop_scene_first_start_on_exit(void* context) {
|
void desktop_scene_first_start_on_exit(void* context) {
|
||||||
|
UNUSED(context);
|
||||||
}
|
}
|
||||||
|
@ -81,4 +81,5 @@ bool desktop_scene_lock_menu_on_event(void* context, SceneManagerEvent event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void desktop_scene_lock_menu_on_exit(void* context) {
|
void desktop_scene_lock_menu_on_exit(void* context) {
|
||||||
|
UNUSED(context);
|
||||||
}
|
}
|
||||||
|
@ -109,4 +109,5 @@ bool desktop_scene_locked_on_event(void* context, SceneManagerEvent event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void desktop_scene_locked_on_exit(void* context) {
|
void desktop_scene_locked_on_exit(void* context) {
|
||||||
|
UNUSED(context);
|
||||||
}
|
}
|
||||||
|
@ -43,4 +43,5 @@ bool desktop_scene_pin_timeout_on_event(void* context, SceneManagerEvent event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void desktop_scene_pin_timeout_on_exit(void* context) {
|
void desktop_scene_pin_timeout_on_exit(void* context) {
|
||||||
|
UNUSED(context);
|
||||||
}
|
}
|
||||||
|
@ -51,6 +51,8 @@ static void desktop_view_pin_timeout_timer_callback(TimerHandle_t timer) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static bool desktop_view_pin_timeout_input(InputEvent* event, void* context) {
|
static bool desktop_view_pin_timeout_input(InputEvent* event, void* context) {
|
||||||
|
UNUSED(event);
|
||||||
|
UNUSED(context);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@ static DialogsApp* dialogs_app_alloc() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void dialogs_app_process_message(DialogsApp* app, DialogsAppMessage* message) {
|
static void dialogs_app_process_message(DialogsApp* app, DialogsAppMessage* message) {
|
||||||
|
UNUSED(app);
|
||||||
switch(message->command) {
|
switch(message->command) {
|
||||||
case DialogsAppCommandFileOpen:
|
case DialogsAppCommandFileOpen:
|
||||||
message->return_data->bool_value =
|
message->return_data->bool_value =
|
||||||
@ -25,6 +26,7 @@ static void dialogs_app_process_message(DialogsApp* app, DialogsAppMessage* mess
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t dialogs_srv(void* p) {
|
int32_t dialogs_srv(void* p) {
|
||||||
|
UNUSED(p);
|
||||||
DialogsApp* app = dialogs_app_alloc();
|
DialogsApp* app = dialogs_app_alloc();
|
||||||
furi_record_create("dialogs", app);
|
furi_record_create("dialogs", app);
|
||||||
|
|
||||||
|
@ -118,6 +118,7 @@ void dolphin_event_send_wait(Dolphin* dolphin, DolphinEvent* event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void dolphin_event_release(Dolphin* dolphin, DolphinEvent* event) {
|
void dolphin_event_release(Dolphin* dolphin, DolphinEvent* event) {
|
||||||
|
UNUSED(dolphin);
|
||||||
if(event->flag) {
|
if(event->flag) {
|
||||||
osEventFlagsSet(event->flag, DOLPHIN_LOCK_EVENT_FLAG);
|
osEventFlagsSet(event->flag, DOLPHIN_LOCK_EVENT_FLAG);
|
||||||
}
|
}
|
||||||
@ -149,6 +150,7 @@ static void dolphin_update_clear_limits_timer_period(Dolphin* dolphin) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t dolphin_srv(void* p) {
|
int32_t dolphin_srv(void* p) {
|
||||||
|
UNUSED(p);
|
||||||
Dolphin* dolphin = dolphin_alloc();
|
Dolphin* dolphin = dolphin_alloc();
|
||||||
furi_record_create("dolphin", dolphin);
|
furi_record_create("dolphin", dolphin);
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ typedef struct {
|
|||||||
|
|
||||||
uint32_t flags;
|
uint32_t flags;
|
||||||
uint32_t icounter;
|
uint32_t icounter;
|
||||||
uint32_t butthurt;
|
int32_t butthurt;
|
||||||
uint64_t timestamp;
|
uint64_t timestamp;
|
||||||
} DolphinStoreData;
|
} DolphinStoreData;
|
||||||
|
|
||||||
|
@ -90,6 +90,7 @@ static void render_callback(Canvas* canvas, void* ctx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t passport_app(void* p) {
|
int32_t passport_app(void* p) {
|
||||||
|
UNUSED(p);
|
||||||
osSemaphoreId_t semaphore = osSemaphoreNew(1, 0, NULL);
|
osSemaphoreId_t semaphore = osSemaphoreNew(1, 0, NULL);
|
||||||
furi_assert(semaphore);
|
furi_assert(semaphore);
|
||||||
|
|
||||||
|
@ -95,6 +95,7 @@ void gpio_app_free(GpioApp* app) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t gpio_app(void* p) {
|
int32_t gpio_app(void* p) {
|
||||||
|
UNUSED(p);
|
||||||
GpioApp* gpio_app = gpio_app_alloc();
|
GpioApp* gpio_app = gpio_app_alloc();
|
||||||
|
|
||||||
view_dispatcher_run(gpio_app->view_dispatcher);
|
view_dispatcher_run(gpio_app->view_dispatcher);
|
||||||
|
@ -19,9 +19,12 @@ void gpio_scene_test_on_enter(void* context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool gpio_scene_test_on_event(void* context, SceneManagerEvent event) {
|
bool gpio_scene_test_on_event(void* context, SceneManagerEvent event) {
|
||||||
|
UNUSED(context);
|
||||||
|
UNUSED(event);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void gpio_scene_test_on_exit(void* context) {
|
void gpio_scene_test_on_exit(void* context) {
|
||||||
|
UNUSED(context);
|
||||||
gpio_item_configure_all_pins(GpioModeAnalog);
|
gpio_item_configure_all_pins(GpioModeAnalog);
|
||||||
}
|
}
|
||||||
|
@ -28,12 +28,9 @@ static const uint32_t baudrate_list[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
bool gpio_scene_usb_uart_cfg_on_event(void* context, SceneManagerEvent event) {
|
bool gpio_scene_usb_uart_cfg_on_event(void* context, SceneManagerEvent event) {
|
||||||
//GpioApp* app = context;
|
UNUSED(context);
|
||||||
bool consumed = false;
|
UNUSED(event);
|
||||||
|
return false;
|
||||||
if(event.type == SceneManagerEventTypeCustom) {
|
|
||||||
}
|
|
||||||
return consumed;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void line_vcp_cb(VariableItem* item) {
|
static void line_vcp_cb(VariableItem* item) {
|
||||||
|
@ -101,6 +101,7 @@ static void usb_uart_vcp_init(UsbUartBridge* usb_uart, uint8_t vcp_ch) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void usb_uart_vcp_deinit(UsbUartBridge* usb_uart, uint8_t vcp_ch) {
|
static void usb_uart_vcp_deinit(UsbUartBridge* usb_uart, uint8_t vcp_ch) {
|
||||||
|
UNUSED(usb_uart);
|
||||||
furi_hal_cdc_set_callbacks(vcp_ch, NULL, NULL);
|
furi_hal_cdc_set_callbacks(vcp_ch, NULL, NULL);
|
||||||
FURI_LOG_I("", "Deinit %d", vcp_ch);
|
FURI_LOG_I("", "Deinit %d", vcp_ch);
|
||||||
if(vcp_ch != 0) {
|
if(vcp_ch != 0) {
|
||||||
@ -120,6 +121,7 @@ static void usb_uart_serial_init(UsbUartBridge* usb_uart, uint8_t uart_ch) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void usb_uart_serial_deinit(UsbUartBridge* usb_uart, uint8_t uart_ch) {
|
static void usb_uart_serial_deinit(UsbUartBridge* usb_uart, uint8_t uart_ch) {
|
||||||
|
UNUSED(usb_uart);
|
||||||
furi_hal_uart_set_irq_cb(uart_ch, NULL, NULL);
|
furi_hal_uart_set_irq_cb(uart_ch, NULL, NULL);
|
||||||
if(uart_ch == FuriHalUartIdUSART1)
|
if(uart_ch == FuriHalUartIdUSART1)
|
||||||
furi_hal_console_enable();
|
furi_hal_console_enable();
|
||||||
@ -143,7 +145,7 @@ static void usb_uart_set_baudrate(UsbUartBridge* usb_uart, uint32_t baudrate) {
|
|||||||
|
|
||||||
static void usb_uart_update_ctrl_lines(UsbUartBridge* usb_uart) {
|
static void usb_uart_update_ctrl_lines(UsbUartBridge* usb_uart) {
|
||||||
if(usb_uart->cfg.flow_pins != 0) {
|
if(usb_uart->cfg.flow_pins != 0) {
|
||||||
furi_assert((usb_uart->cfg.flow_pins - 1) < (sizeof(flow_pins) / sizeof(flow_pins[0])));
|
furi_assert((size_t)(usb_uart->cfg.flow_pins - 1) < COUNT_OF(flow_pins));
|
||||||
uint8_t state = furi_hal_cdc_get_ctrl_line_state(usb_uart->cfg.vcp_ch);
|
uint8_t state = furi_hal_cdc_get_ctrl_line_state(usb_uart->cfg.vcp_ch);
|
||||||
|
|
||||||
furi_hal_gpio_write(flow_pins[usb_uart->cfg.flow_pins - 1][0], !(state & USB_CDC_BIT_RTS));
|
furi_hal_gpio_write(flow_pins[usb_uart->cfg.flow_pins - 1][0], !(state & USB_CDC_BIT_RTS));
|
||||||
@ -171,7 +173,7 @@ static int32_t usb_uart_worker(void* context) {
|
|||||||
usb_uart_serial_init(usb_uart, usb_uart->cfg.uart_ch);
|
usb_uart_serial_init(usb_uart, usb_uart->cfg.uart_ch);
|
||||||
usb_uart_set_baudrate(usb_uart, usb_uart->cfg.baudrate);
|
usb_uart_set_baudrate(usb_uart, usb_uart->cfg.baudrate);
|
||||||
if(usb_uart->cfg.flow_pins != 0) {
|
if(usb_uart->cfg.flow_pins != 0) {
|
||||||
furi_assert((usb_uart->cfg.flow_pins - 1) < (sizeof(flow_pins) / sizeof(flow_pins[0])));
|
furi_assert((size_t)(usb_uart->cfg.flow_pins - 1) < COUNT_OF(flow_pins));
|
||||||
furi_hal_gpio_init_simple(
|
furi_hal_gpio_init_simple(
|
||||||
flow_pins[usb_uart->cfg.flow_pins - 1][0], GpioModeOutputPushPull);
|
flow_pins[usb_uart->cfg.flow_pins - 1][0], GpioModeOutputPushPull);
|
||||||
furi_hal_gpio_init_simple(
|
furi_hal_gpio_init_simple(
|
||||||
@ -238,9 +240,7 @@ static int32_t usb_uart_worker(void* context) {
|
|||||||
flow_pins[usb_uart->cfg.flow_pins - 1][1], GpioModeAnalog);
|
flow_pins[usb_uart->cfg.flow_pins - 1][1], GpioModeAnalog);
|
||||||
}
|
}
|
||||||
if(usb_uart->cfg_new.flow_pins != 0) {
|
if(usb_uart->cfg_new.flow_pins != 0) {
|
||||||
furi_assert(
|
furi_assert((size_t)(usb_uart->cfg_new.flow_pins - 1) < COUNT_OF(flow_pins));
|
||||||
(usb_uart->cfg_new.flow_pins - 1) <
|
|
||||||
(sizeof(flow_pins) / sizeof(flow_pins[0])));
|
|
||||||
furi_hal_gpio_init_simple(
|
furi_hal_gpio_init_simple(
|
||||||
flow_pins[usb_uart->cfg_new.flow_pins - 1][0], GpioModeOutputPushPull);
|
flow_pins[usb_uart->cfg_new.flow_pins - 1][0], GpioModeOutputPushPull);
|
||||||
furi_hal_gpio_init_simple(
|
furi_hal_gpio_init_simple(
|
||||||
@ -318,14 +318,18 @@ static void vcp_on_cdc_rx(void* context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void vcp_state_callback(void* context, uint8_t state) {
|
static void vcp_state_callback(void* context, uint8_t state) {
|
||||||
|
UNUSED(context);
|
||||||
|
UNUSED(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void vcp_on_cdc_control_line(void* context, uint8_t state) {
|
static void vcp_on_cdc_control_line(void* context, uint8_t state) {
|
||||||
|
UNUSED(state);
|
||||||
UsbUartBridge* usb_uart = (UsbUartBridge*)context;
|
UsbUartBridge* usb_uart = (UsbUartBridge*)context;
|
||||||
osThreadFlagsSet(furi_thread_get_thread_id(usb_uart->thread), WorkerEvtCtrlLineSet);
|
osThreadFlagsSet(furi_thread_get_thread_id(usb_uart->thread), WorkerEvtCtrlLineSet);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void vcp_on_line_config(void* context, struct usb_cdc_line_coding* config) {
|
static void vcp_on_line_config(void* context, struct usb_cdc_line_coding* config) {
|
||||||
|
UNUSED(config);
|
||||||
UsbUartBridge* usb_uart = (UsbUartBridge*)context;
|
UsbUartBridge* usb_uart = (UsbUartBridge*)context;
|
||||||
osThreadFlagsSet(furi_thread_get_thread_id(usb_uart->thread), WorkerEvtLineCfgSet);
|
osThreadFlagsSet(furi_thread_get_thread_id(usb_uart->thread), WorkerEvtLineCfgSet);
|
||||||
}
|
}
|
||||||
|
@ -123,6 +123,7 @@ void gpio_test_set_ok_callback(GpioTest* gpio_test, GpioTestOkCallback callback,
|
|||||||
furi_assert(callback);
|
furi_assert(callback);
|
||||||
with_view_model(
|
with_view_model(
|
||||||
gpio_test->view, (GpioTestModel * model) {
|
gpio_test->view, (GpioTestModel * model) {
|
||||||
|
UNUSED(model);
|
||||||
gpio_test->callback = callback;
|
gpio_test->callback = callback;
|
||||||
gpio_test->context = context;
|
gpio_test->context = context;
|
||||||
return false;
|
return false;
|
||||||
|
@ -130,6 +130,7 @@ void gpio_usb_uart_set_callback(GpioUsbUart* usb_uart, GpioUsbUartCallback callb
|
|||||||
|
|
||||||
with_view_model(
|
with_view_model(
|
||||||
usb_uart->view, (GpioUsbUartModel * model) {
|
usb_uart->view, (GpioUsbUartModel * model) {
|
||||||
|
UNUSED(model);
|
||||||
usb_uart->callback = callback;
|
usb_uart->callback = callback;
|
||||||
usb_uart->context = context;
|
usb_uart->context = context;
|
||||||
return false;
|
return false;
|
||||||
|
@ -469,6 +469,7 @@ Gui* gui_alloc() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t gui_srv(void* p) {
|
int32_t gui_srv(void* p) {
|
||||||
|
UNUSED(p);
|
||||||
Gui* gui = gui_alloc();
|
Gui* gui = gui_alloc();
|
||||||
|
|
||||||
furi_record_create("gui", gui);
|
furi_record_create("gui", gui);
|
||||||
|
@ -331,7 +331,7 @@ void button_menu_set_selected_item(ButtonMenu* button_menu, uint32_t index) {
|
|||||||
ButtonMenuItemArray_it_t it;
|
ButtonMenuItemArray_it_t it;
|
||||||
for(ButtonMenuItemArray_it(it, model->items); !ButtonMenuItemArray_end_p(it);
|
for(ButtonMenuItemArray_it(it, model->items); !ButtonMenuItemArray_end_p(it);
|
||||||
ButtonMenuItemArray_next(it), ++item_position) {
|
ButtonMenuItemArray_next(it), ++item_position) {
|
||||||
if(ButtonMenuItemArray_cref(it)->index == index) {
|
if((uint32_t)ButtonMenuItemArray_cref(it)->index == index) {
|
||||||
model->position = item_position;
|
model->position = item_position;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -215,8 +215,8 @@ static void button_panel_view_draw_callback(Canvas* canvas, void* _model) {
|
|||||||
static void button_panel_process_down(ButtonPanel* button_panel) {
|
static void button_panel_process_down(ButtonPanel* button_panel) {
|
||||||
with_view_model(
|
with_view_model(
|
||||||
button_panel->view, (ButtonPanelModel * model) {
|
button_panel->view, (ButtonPanelModel * model) {
|
||||||
size_t new_selected_item_x = model->selected_item_x;
|
uint16_t new_selected_item_x = model->selected_item_x;
|
||||||
size_t new_selected_item_y = model->selected_item_y;
|
uint16_t new_selected_item_y = model->selected_item_y;
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
if(new_selected_item_y >= (model->reserve_y - 1)) return false;
|
if(new_selected_item_y >= (model->reserve_y - 1)) return false;
|
||||||
@ -291,8 +291,8 @@ static void button_panel_process_left(ButtonPanel* button_panel) {
|
|||||||
static void button_panel_process_right(ButtonPanel* button_panel) {
|
static void button_panel_process_right(ButtonPanel* button_panel) {
|
||||||
with_view_model(
|
with_view_model(
|
||||||
button_panel->view, (ButtonPanelModel * model) {
|
button_panel->view, (ButtonPanelModel * model) {
|
||||||
size_t new_selected_item_x = model->selected_item_x;
|
uint16_t new_selected_item_x = model->selected_item_x;
|
||||||
size_t new_selected_item_y = model->selected_item_y;
|
uint16_t new_selected_item_y = model->selected_item_y;
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
if(new_selected_item_x >= (model->reserve_x - 1)) return false;
|
if(new_selected_item_x >= (model->reserve_x - 1)) return false;
|
||||||
|
@ -6,10 +6,13 @@ struct EmptyScreen {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static void empty_screen_view_draw_callback(Canvas* canvas, void* _model) {
|
static void empty_screen_view_draw_callback(Canvas* canvas, void* _model) {
|
||||||
|
UNUSED(_model);
|
||||||
canvas_clear(canvas);
|
canvas_clear(canvas);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool empty_screen_view_input_callback(InputEvent* event, void* context) {
|
static bool empty_screen_view_input_callback(InputEvent* event, void* context) {
|
||||||
|
UNUSED(event);
|
||||||
|
UNUSED(context);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@ static void loading_draw_callback(Canvas* canvas, void* _model) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static bool loading_input_callback(InputEvent* event, void* context) {
|
static bool loading_input_callback(InputEvent* event, void* context) {
|
||||||
|
UNUSED(event);
|
||||||
furi_assert(context);
|
furi_assert(context);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -87,7 +87,7 @@ static void text_box_insert_endline(Canvas* canvas, TextBoxModel* model) {
|
|||||||
model->scroll_num = line_num - 4;
|
model->scroll_num = line_num - 4;
|
||||||
model->scroll_pos = line_num - 5;
|
model->scroll_pos = line_num - 5;
|
||||||
} else {
|
} else {
|
||||||
model->scroll_num = MAX(line_num - 4, 0);
|
model->scroll_num = MAX(line_num - 4, 0u);
|
||||||
model->scroll_pos = 0;
|
model->scroll_pos = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -122,15 +122,15 @@ static const TextInputKey* get_row(uint8_t row_index) {
|
|||||||
return row;
|
return row;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char get_selected_char(TextInputModel* model) {
|
static char get_selected_char(TextInputModel* model) {
|
||||||
return get_row(model->selected_row)[model->selected_column].text;
|
return get_row(model->selected_row)[model->selected_column].text;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const bool char_is_lowercase(char letter) {
|
static bool char_is_lowercase(char letter) {
|
||||||
return (letter >= 0x61 && letter <= 0x7A);
|
return (letter >= 0x61 && letter <= 0x7A);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char char_to_uppercase(const char letter) {
|
static char char_to_uppercase(const char letter) {
|
||||||
if(isalpha(letter)) {
|
if(isalpha(letter)) {
|
||||||
return (letter - 0x20);
|
return (letter - 0x20);
|
||||||
} else {
|
} else {
|
||||||
@ -260,6 +260,7 @@ static void text_input_view_draw_callback(Canvas* canvas, void* _model) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void text_input_handle_up(TextInput* text_input, TextInputModel* model) {
|
static void text_input_handle_up(TextInput* text_input, TextInputModel* model) {
|
||||||
|
UNUSED(text_input);
|
||||||
if(model->selected_row > 0) {
|
if(model->selected_row > 0) {
|
||||||
model->selected_row--;
|
model->selected_row--;
|
||||||
if(model->selected_column > get_row_size(model->selected_row) - 6) {
|
if(model->selected_column > get_row_size(model->selected_row) - 6) {
|
||||||
@ -269,6 +270,7 @@ static void text_input_handle_up(TextInput* text_input, TextInputModel* model) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void text_input_handle_down(TextInput* text_input, TextInputModel* model) {
|
static void text_input_handle_down(TextInput* text_input, TextInputModel* model) {
|
||||||
|
UNUSED(text_input);
|
||||||
if(model->selected_row < keyboard_row_count - 1) {
|
if(model->selected_row < keyboard_row_count - 1) {
|
||||||
model->selected_row++;
|
model->selected_row++;
|
||||||
if(model->selected_column > get_row_size(model->selected_row) - 4) {
|
if(model->selected_column > get_row_size(model->selected_row) - 4) {
|
||||||
@ -278,6 +280,7 @@ static void text_input_handle_down(TextInput* text_input, TextInputModel* model)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void text_input_handle_left(TextInput* text_input, TextInputModel* model) {
|
static void text_input_handle_left(TextInput* text_input, TextInputModel* model) {
|
||||||
|
UNUSED(text_input);
|
||||||
if(model->selected_column > 0) {
|
if(model->selected_column > 0) {
|
||||||
model->selected_column--;
|
model->selected_column--;
|
||||||
} else {
|
} else {
|
||||||
@ -286,6 +289,7 @@ static void text_input_handle_left(TextInput* text_input, TextInputModel* model)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void text_input_handle_right(TextInput* text_input, TextInputModel* model) {
|
static void text_input_handle_right(TextInput* text_input, TextInputModel* model) {
|
||||||
|
UNUSED(text_input);
|
||||||
if(model->selected_column < get_row_size(model->selected_row) - 1) {
|
if(model->selected_column < get_row_size(model->selected_row) - 1) {
|
||||||
model->selected_column++;
|
model->selected_column++;
|
||||||
} else {
|
} else {
|
||||||
|
@ -364,6 +364,7 @@ void variable_item_list_set_enter_callback(
|
|||||||
furi_assert(callback);
|
furi_assert(callback);
|
||||||
with_view_model(
|
with_view_model(
|
||||||
variable_item_list->view, (VariableItemListModel * model) {
|
variable_item_list->view, (VariableItemListModel * model) {
|
||||||
|
UNUSED(model);
|
||||||
variable_item_list->callback = callback;
|
variable_item_list->callback = callback;
|
||||||
variable_item_list->context = context;
|
variable_item_list->context = context;
|
||||||
return false;
|
return false;
|
||||||
|
@ -126,6 +126,7 @@ void view_commit_model(View* view, bool update) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void view_icon_animation_callback(IconAnimation* instance, void* context) {
|
void view_icon_animation_callback(IconAnimation* instance, void* context) {
|
||||||
|
UNUSED(instance);
|
||||||
furi_assert(context);
|
furi_assert(context);
|
||||||
View* view = context;
|
View* view = context;
|
||||||
if(view->update_callback) {
|
if(view->update_callback) {
|
||||||
|
@ -240,6 +240,7 @@ void ibutton_cli_emulate(Cli* cli, string_t args) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static void ibutton_cli(Cli* cli, string_t args, void* context) {
|
static void ibutton_cli(Cli* cli, string_t args, void* context) {
|
||||||
|
UNUSED(context);
|
||||||
string_t cmd;
|
string_t cmd;
|
||||||
string_init(cmd);
|
string_init(cmd);
|
||||||
|
|
||||||
@ -268,6 +269,7 @@ void onewire_cli_print_usage() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static void onewire_cli_search(Cli* cli) {
|
static void onewire_cli_search(Cli* cli) {
|
||||||
|
UNUSED(cli);
|
||||||
OneWireHost* onewire = onewire_host_alloc();
|
OneWireHost* onewire = onewire_host_alloc();
|
||||||
uint8_t address[8];
|
uint8_t address[8];
|
||||||
bool done = false;
|
bool done = false;
|
||||||
@ -297,6 +299,7 @@ static void onewire_cli_search(Cli* cli) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void onewire_cli(Cli* cli, string_t args, void* context) {
|
void onewire_cli(Cli* cli, string_t args, void* context) {
|
||||||
|
UNUSED(context);
|
||||||
string_t cmd;
|
string_t cmd;
|
||||||
string_init(cmd);
|
string_init(cmd);
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@ public:
|
|||||||
|
|
||||||
// payload
|
// payload
|
||||||
union {
|
union {
|
||||||
|
uint32_t dummy;
|
||||||
uint32_t menu_index;
|
uint32_t menu_index;
|
||||||
DialogExResult dialog_result;
|
DialogExResult dialog_result;
|
||||||
GuiButtonType widget_button_result;
|
GuiButtonType widget_button_result;
|
||||||
|
@ -129,7 +129,7 @@ void iButtonAppViewManager::send_event(iButtonEvent* event) {
|
|||||||
furi_check(result == osOK);
|
furi_check(result == osOK);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t iButtonAppViewManager::previous_view_callback(void* context) {
|
uint32_t iButtonAppViewManager::previous_view_callback(void*) {
|
||||||
if(event_queue != NULL) {
|
if(event_queue != NULL) {
|
||||||
iButtonEvent event;
|
iButtonEvent event;
|
||||||
event.type = iButtonEvent::Type::EventTypeBack;
|
event.type = iButtonEvent::Type::EventTypeBack;
|
||||||
|
@ -6,7 +6,10 @@ static void emulate_callback(void* context, bool emulated) {
|
|||||||
furi_assert(context);
|
furi_assert(context);
|
||||||
if(emulated) {
|
if(emulated) {
|
||||||
iButtonApp* app = static_cast<iButtonApp*>(context);
|
iButtonApp* app = static_cast<iButtonApp*>(context);
|
||||||
iButtonEvent event = {.type = iButtonEvent::Type::EventTypeWorkerEmulated};
|
iButtonEvent event = {
|
||||||
|
.payload = {.worker_write_result = iButtonWorkerWriteOK},
|
||||||
|
.type = iButtonEvent::Type::EventTypeWorkerEmulated,
|
||||||
|
};
|
||||||
app->get_view_manager()->send_event(&event);
|
app->get_view_manager()->send_event(&event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,9 +44,8 @@ void iButtonSceneInfo::on_enter(iButtonApp* app) {
|
|||||||
view_manager->switch_to(iButtonAppViewManager::Type::iButtonAppViewWidget);
|
view_manager->switch_to(iButtonAppViewManager::Type::iButtonAppViewWidget);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool iButtonSceneInfo::on_event(iButtonApp* app, iButtonEvent* event) {
|
bool iButtonSceneInfo::on_event(iButtonApp*, iButtonEvent*) {
|
||||||
bool consumed = false;
|
return false;
|
||||||
return consumed;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void iButtonSceneInfo::on_exit(iButtonApp* app) {
|
void iButtonSceneInfo::on_exit(iButtonApp* app) {
|
||||||
|
@ -5,7 +5,10 @@
|
|||||||
static void read_callback(void* context) {
|
static void read_callback(void* context) {
|
||||||
furi_assert(context);
|
furi_assert(context);
|
||||||
iButtonApp* app = static_cast<iButtonApp*>(context);
|
iButtonApp* app = static_cast<iButtonApp*>(context);
|
||||||
iButtonEvent event = {.type = iButtonEvent::Type::EventTypeWorkerRead};
|
iButtonEvent event = {
|
||||||
|
.payload = {.dummy = 0},
|
||||||
|
.type = iButtonEvent::Type::EventTypeWorkerRead,
|
||||||
|
};
|
||||||
app->get_view_manager()->send_event(&event);
|
app->get_view_manager()->send_event(&event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,9 +10,9 @@ void iButtonSceneSelectKey::on_enter(iButtonApp* app) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool iButtonSceneSelectKey::on_event(iButtonApp* app, iButtonEvent* event) {
|
bool iButtonSceneSelectKey::on_event(iButtonApp*, iButtonEvent*) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void iButtonSceneSelectKey::on_exit(iButtonApp* app) {
|
void iButtonSceneSelectKey::on_exit(iButtonApp*) {
|
||||||
}
|
}
|
||||||
|
@ -60,6 +60,8 @@ static void signal_received_callback(void* context, InfraredWorkerSignal* receiv
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void infrared_cli_start_ir_rx(Cli* cli, string_t args) {
|
static void infrared_cli_start_ir_rx(Cli* cli, string_t args) {
|
||||||
|
UNUSED(cli);
|
||||||
|
UNUSED(args);
|
||||||
InfraredWorker* worker = infrared_worker_alloc();
|
InfraredWorker* worker = infrared_worker_alloc();
|
||||||
infrared_worker_rx_start(worker);
|
infrared_worker_rx_start(worker);
|
||||||
infrared_worker_rx_set_received_signal_callback(worker, signal_received_callback, cli);
|
infrared_worker_rx_set_received_signal_callback(worker, signal_received_callback, cli);
|
||||||
@ -140,6 +142,7 @@ static bool parse_signal_raw(
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void infrared_cli_start_ir_tx(Cli* cli, string_t args) {
|
static void infrared_cli_start_ir_tx(Cli* cli, string_t args) {
|
||||||
|
UNUSED(cli);
|
||||||
InfraredMessage message;
|
InfraredMessage message;
|
||||||
const char* str = string_get_cstr(args);
|
const char* str = string_get_cstr(args);
|
||||||
uint32_t frequency;
|
uint32_t frequency;
|
||||||
@ -160,6 +163,7 @@ static void infrared_cli_start_ir_tx(Cli* cli, string_t args) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void infrared_cli_start_ir(Cli* cli, string_t args, void* context) {
|
static void infrared_cli_start_ir(Cli* cli, string_t args, void* context) {
|
||||||
|
UNUSED(context);
|
||||||
if(furi_hal_infrared_is_busy()) {
|
if(furi_hal_infrared_is_busy()) {
|
||||||
printf("INFRARED is busy. Exit.");
|
printf("INFRARED is busy. Exit.");
|
||||||
return;
|
return;
|
||||||
|
@ -36,6 +36,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
union {
|
union {
|
||||||
|
int32_t dummy;
|
||||||
/** Menu selected event type payload. Selected index. */
|
/** Menu selected event type payload. Selected index. */
|
||||||
int32_t menu_index;
|
int32_t menu_index;
|
||||||
/** DialogEx view module event type payload */
|
/** DialogEx view module event type payload */
|
||||||
|
@ -148,7 +148,7 @@ void InfraredAppViewManager::send_event(InfraredAppEvent* event) {
|
|||||||
osMessageQueuePut(event_queue, event, 0, timeout);
|
osMessageQueuePut(event_queue, event, 0, timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t InfraredAppViewManager::previous_view_callback(void* context) {
|
uint32_t InfraredAppViewManager::previous_view_callback(void*) {
|
||||||
if(event_queue != NULL) {
|
if(event_queue != NULL) {
|
||||||
InfraredAppEvent event;
|
InfraredAppEvent event;
|
||||||
event.type = InfraredAppEvent::Type::Back;
|
event.type = InfraredAppEvent::Type::Back;
|
||||||
|
@ -69,5 +69,5 @@ bool InfraredAppSceneAskBack::on_event(InfraredApp* app, InfraredAppEvent* event
|
|||||||
return consumed;
|
return consumed;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InfraredAppSceneAskBack::on_exit(InfraredApp* app) {
|
void InfraredAppSceneAskBack::on_exit(InfraredApp*) {
|
||||||
}
|
}
|
||||||
|
@ -96,5 +96,5 @@ bool InfraredAppSceneEditDelete::on_event(InfraredApp* app, InfraredAppEvent* ev
|
|||||||
return consumed;
|
return consumed;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InfraredAppSceneEditDelete::on_exit(InfraredApp* app) {
|
void InfraredAppSceneEditDelete::on_exit(InfraredApp*) {
|
||||||
}
|
}
|
||||||
|
@ -26,5 +26,5 @@ bool InfraredAppSceneEditRenameDone::on_event(InfraredApp* app, InfraredAppEvent
|
|||||||
return consumed;
|
return consumed;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InfraredAppSceneEditRenameDone::on_exit(InfraredApp* app) {
|
void InfraredAppSceneEditRenameDone::on_exit(InfraredApp*) {
|
||||||
}
|
}
|
||||||
|
@ -56,5 +56,5 @@ bool InfraredAppSceneLearnEnterName::on_event(InfraredApp* app, InfraredAppEvent
|
|||||||
return consumed;
|
return consumed;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InfraredAppSceneLearnEnterName::on_exit(InfraredApp* app) {
|
void InfraredAppSceneLearnEnterName::on_exit(InfraredApp*) {
|
||||||
}
|
}
|
||||||
|
@ -40,11 +40,9 @@ void InfraredAppSceneRemoteList::on_enter(InfraredApp* app) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InfraredAppSceneRemoteList::on_event(InfraredApp* app, InfraredAppEvent* event) {
|
bool InfraredAppSceneRemoteList::on_event(InfraredApp*, InfraredAppEvent*) {
|
||||||
bool consumed = false;
|
return false;
|
||||||
|
|
||||||
return consumed;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InfraredAppSceneRemoteList::on_exit(InfraredApp* app) {
|
void InfraredAppSceneRemoteList::on_exit(InfraredApp*) {
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,7 @@ static void infrared_progress_back_callback(void* context) {
|
|||||||
auto app = static_cast<InfraredApp*>(context);
|
auto app = static_cast<InfraredApp*>(context);
|
||||||
|
|
||||||
InfraredAppEvent infrared_event = {
|
InfraredAppEvent infrared_event = {
|
||||||
|
.payload = {.dummy = 0},
|
||||||
.type = InfraredAppEvent::Type::Back,
|
.type = InfraredAppEvent::Type::Back,
|
||||||
};
|
};
|
||||||
app->get_view_manager()->clear_events();
|
app->get_view_manager()->clear_events();
|
||||||
@ -57,7 +58,10 @@ bool InfraredAppSceneUniversalCommon::on_event(InfraredApp* app, InfraredAppEven
|
|||||||
if(event->type == InfraredAppEvent::Type::Tick) {
|
if(event->type == InfraredAppEvent::Type::Tick) {
|
||||||
auto view_manager = app->get_view_manager();
|
auto view_manager = app->get_view_manager();
|
||||||
app->notify_blink_send();
|
app->notify_blink_send();
|
||||||
InfraredAppEvent tick_event = {.type = InfraredAppEvent::Type::Tick};
|
InfraredAppEvent tick_event = {
|
||||||
|
.payload = {.dummy = 0},
|
||||||
|
.type = InfraredAppEvent::Type::Tick,
|
||||||
|
};
|
||||||
view_manager->send_event(&tick_event);
|
view_manager->send_event(&tick_event);
|
||||||
bool result = brute_force.send_next_bruteforce();
|
bool result = brute_force.send_next_bruteforce();
|
||||||
if(result) {
|
if(result) {
|
||||||
|
@ -35,6 +35,7 @@ void input_press_timer_callback(void* arg) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void input_isr(void* _ctx) {
|
void input_isr(void* _ctx) {
|
||||||
|
UNUSED(_ctx);
|
||||||
osThreadFlagsSet(input->thread, INPUT_THREAD_FLAG_ISR);
|
osThreadFlagsSet(input->thread, INPUT_THREAD_FLAG_ISR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@ static void input_cli_dump_events_callback(const void* value, void* ctx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void input_cli_dump(Cli* cli, string_t args, Input* input) {
|
static void input_cli_dump(Cli* cli, string_t args, Input* input) {
|
||||||
|
UNUSED(args);
|
||||||
osMessageQueueId_t input_queue = osMessageQueueNew(8, sizeof(InputEvent), NULL);
|
osMessageQueueId_t input_queue = osMessageQueueNew(8, sizeof(InputEvent), NULL);
|
||||||
FuriPubSubSubscription* input_subscription =
|
FuriPubSubSubscription* input_subscription =
|
||||||
furi_pubsub_subscribe(input->event_pubsub, input_cli_dump_events_callback, input_queue);
|
furi_pubsub_subscribe(input->event_pubsub, input_cli_dump_events_callback, input_queue);
|
||||||
@ -47,6 +48,7 @@ static void input_cli_send_print_usage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void input_cli_send(Cli* cli, string_t args, Input* input) {
|
static void input_cli_send(Cli* cli, string_t args, Input* input) {
|
||||||
|
UNUSED(cli);
|
||||||
InputEvent event;
|
InputEvent event;
|
||||||
string_t key_str;
|
string_t key_str;
|
||||||
string_init(key_str);
|
string_init(key_str);
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
#include <furi.h>
|
#include <furi.h>
|
||||||
#include <furi_hal.h>
|
#include <furi_hal.h>
|
||||||
|
|
||||||
bool DecoderAnalyzer::read(uint8_t* _data, uint8_t _data_size) {
|
// FIXME: unused args?
|
||||||
|
bool DecoderAnalyzer::read(uint8_t* /* _data */, uint8_t /* _data_size */) {
|
||||||
bool result = false;
|
bool result = false;
|
||||||
|
|
||||||
if(ready) {
|
if(ready) {
|
||||||
@ -21,6 +22,7 @@ bool DecoderAnalyzer::read(uint8_t* _data, uint8_t _data_size) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void DecoderAnalyzer::process_front(bool polarity, uint32_t time) {
|
void DecoderAnalyzer::process_front(bool polarity, uint32_t time) {
|
||||||
|
UNUSED(polarity);
|
||||||
if(ready) return;
|
if(ready) return;
|
||||||
|
|
||||||
data[data_index] = time;
|
data[data_index] = time;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#include <furi.h>
|
#include <furi.h>
|
||||||
#include <furi_hal.h>
|
#include <furi_hal.h>
|
||||||
|
|
||||||
void DecoderGpioOut::process_front(bool polarity, uint32_t time) {
|
void DecoderGpioOut::process_front(bool polarity, uint32_t /* time */) {
|
||||||
furi_hal_gpio_write(&gpio_ext_pa7, polarity);
|
furi_hal_gpio_write(&gpio_ext_pa7, polarity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ const char* RfidKey::get_type_text() {
|
|||||||
return lfrfid_key_get_type_string(type);
|
return lfrfid_key_get_type_string(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
const uint8_t RfidKey::get_type_data_count() {
|
uint8_t RfidKey::get_type_data_count() const {
|
||||||
return lfrfid_key_get_type_data_count(type);
|
return lfrfid_key_get_type_data_count(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ public:
|
|||||||
LfrfidKeyType get_type();
|
LfrfidKeyType get_type();
|
||||||
const uint8_t* get_data();
|
const uint8_t* get_data();
|
||||||
const char* get_type_text();
|
const char* get_type_text();
|
||||||
const uint8_t get_type_data_count();
|
uint8_t get_type_data_count() const;
|
||||||
char* get_name();
|
char* get_name();
|
||||||
uint8_t get_name_length();
|
uint8_t get_name_length();
|
||||||
void clear();
|
void clear();
|
||||||
|
@ -100,6 +100,8 @@ static void lfrfid_cli_read(Cli* cli, string_t args) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void lfrfid_cli_write(Cli* cli, string_t args) {
|
static void lfrfid_cli_write(Cli* cli, string_t args) {
|
||||||
|
UNUSED(cli);
|
||||||
|
UNUSED(args);
|
||||||
// TODO implement rfid write
|
// TODO implement rfid write
|
||||||
printf("Not implemented :(\r\n");
|
printf("Not implemented :(\r\n");
|
||||||
}
|
}
|
||||||
@ -147,6 +149,7 @@ static void lfrfid_cli_emulate(Cli* cli, string_t args) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void lfrfid_cli(Cli* cli, string_t args, void* context) {
|
static void lfrfid_cli(Cli* cli, string_t args, void* context) {
|
||||||
|
UNUSED(context);
|
||||||
string_t cmd;
|
string_t cmd;
|
||||||
string_init(cmd);
|
string_init(cmd);
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#include "../view/elements/icon_element.h"
|
#include "../view/elements/icon_element.h"
|
||||||
#include "../view/elements/string_element.h"
|
#include "../view/elements/string_element.h"
|
||||||
|
|
||||||
void LfRfidAppSceneDeleteConfirm::on_enter(LfRfidApp* app, bool need_restore) {
|
void LfRfidAppSceneDeleteConfirm::on_enter(LfRfidApp* app, bool /* need_restore */) {
|
||||||
string_init(string_data);
|
string_init(string_data);
|
||||||
string_init(string_decrypted);
|
string_init(string_decrypted);
|
||||||
string_init(string_header);
|
string_init(string_header);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "lfrfid_app_scene_delete_success.h"
|
#include "lfrfid_app_scene_delete_success.h"
|
||||||
|
|
||||||
void LfRfidAppSceneDeleteSuccess::on_enter(LfRfidApp* app, bool need_restore) {
|
void LfRfidAppSceneDeleteSuccess::on_enter(LfRfidApp* app, bool /* need_restore */) {
|
||||||
auto popup = app->view_controller.get<PopupVM>();
|
auto popup = app->view_controller.get<PopupVM>();
|
||||||
|
|
||||||
popup->set_icon(0, 2, &I_DolphinMafia_115x62);
|
popup->set_icon(0, 2, &I_DolphinMafia_115x62);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include "lfrfid_app_scene_emulate.h"
|
#include "lfrfid_app_scene_emulate.h"
|
||||||
#include <dolphin/dolphin.h>
|
#include <dolphin/dolphin.h>
|
||||||
|
|
||||||
void LfRfidAppSceneEmulate::on_enter(LfRfidApp* app, bool need_restore) {
|
void LfRfidAppSceneEmulate::on_enter(LfRfidApp* app, bool /* need_restore */) {
|
||||||
string_init(data_string);
|
string_init(data_string);
|
||||||
|
|
||||||
DOLPHIN_DEED(DolphinDeedRfidEmulate);
|
DOLPHIN_DEED(DolphinDeedRfidEmulate);
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#include "../view/elements/icon_element.h"
|
#include "../view/elements/icon_element.h"
|
||||||
#include "../view/elements/string_element.h"
|
#include "../view/elements/string_element.h"
|
||||||
|
|
||||||
void LfRfidAppSceneExitConfirm::on_enter(LfRfidApp* app, bool need_restore) {
|
void LfRfidAppSceneExitConfirm::on_enter(LfRfidApp* app, bool /* need_restore */) {
|
||||||
auto container = app->view_controller.get<ContainerVM>();
|
auto container = app->view_controller.get<ContainerVM>();
|
||||||
|
|
||||||
auto button = container->add<ButtonElement>();
|
auto button = container->add<ButtonElement>();
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include "lfrfid_app_scene_read.h"
|
#include "lfrfid_app_scene_read.h"
|
||||||
#include <dolphin/dolphin.h>
|
#include <dolphin/dolphin.h>
|
||||||
|
|
||||||
void LfRfidAppSceneRead::on_enter(LfRfidApp* app, bool need_restore) {
|
void LfRfidAppSceneRead::on_enter(LfRfidApp* app, bool /* need_restore */) {
|
||||||
auto popup = app->view_controller.get<PopupVM>();
|
auto popup = app->view_controller.get<PopupVM>();
|
||||||
|
|
||||||
DOLPHIN_DEED(DolphinDeedRfidRead);
|
DOLPHIN_DEED(DolphinDeedRfidRead);
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#include "../view/elements/icon_element.h"
|
#include "../view/elements/icon_element.h"
|
||||||
#include "../view/elements/string_element.h"
|
#include "../view/elements/string_element.h"
|
||||||
|
|
||||||
void LfRfidAppSceneReadSuccess::on_enter(LfRfidApp* app, bool need_restore) {
|
void LfRfidAppSceneReadSuccess::on_enter(LfRfidApp* app, bool /* need_restore */) {
|
||||||
string_init(string[0]);
|
string_init(string[0]);
|
||||||
string_init(string[1]);
|
string_init(string[1]);
|
||||||
string_init(string[2]);
|
string_init(string[2]);
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#include "../view/elements/icon_element.h"
|
#include "../view/elements/icon_element.h"
|
||||||
#include "../view/elements/string_element.h"
|
#include "../view/elements/string_element.h"
|
||||||
|
|
||||||
void LfRfidAppSceneRetryConfirm::on_enter(LfRfidApp* app, bool need_restore) {
|
void LfRfidAppSceneRetryConfirm::on_enter(LfRfidApp* app, bool /* need_restore */) {
|
||||||
auto container = app->view_controller.get<ContainerVM>();
|
auto container = app->view_controller.get<ContainerVM>();
|
||||||
|
|
||||||
auto button = container->add<ButtonElement>();
|
auto button = container->add<ButtonElement>();
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include "lfrfid_app_scene_save_name.h"
|
#include "lfrfid_app_scene_save_name.h"
|
||||||
#include <lib/toolbox/random_name.h>
|
#include <lib/toolbox/random_name.h>
|
||||||
|
|
||||||
void LfRfidAppSceneSaveName::on_enter(LfRfidApp* app, bool need_restore) {
|
void LfRfidAppSceneSaveName::on_enter(LfRfidApp* app, bool /* need_restore */) {
|
||||||
const char* key_name = app->worker.key.get_name();
|
const char* key_name = app->worker.key.get_name();
|
||||||
|
|
||||||
bool key_name_empty = !strcmp(key_name, "");
|
bool key_name_empty = !strcmp(key_name, "");
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#include <dolphin/dolphin.h>
|
#include <dolphin/dolphin.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
void LfRfidAppSceneSaveSuccess::on_enter(LfRfidApp* app, bool need_restore) {
|
void LfRfidAppSceneSaveSuccess::on_enter(LfRfidApp* app, bool /* need_restore */) {
|
||||||
auto popup = app->view_controller.get<PopupVM>();
|
auto popup = app->view_controller.get<PopupVM>();
|
||||||
|
|
||||||
DOLPHIN_DEED(DolphinDeedRfidSave);
|
DOLPHIN_DEED(DolphinDeedRfidSave);
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#include "../view/elements/icon_element.h"
|
#include "../view/elements/icon_element.h"
|
||||||
#include "../view/elements/string_element.h"
|
#include "../view/elements/string_element.h"
|
||||||
|
|
||||||
void LfRfidAppSceneSavedInfo::on_enter(LfRfidApp* app, bool need_restore) {
|
void LfRfidAppSceneSavedInfo::on_enter(LfRfidApp* app, bool /* need_restore */) {
|
||||||
string_init(string_data);
|
string_init(string_data);
|
||||||
string_init(string_decrypted);
|
string_init(string_decrypted);
|
||||||
|
|
||||||
@ -59,10 +59,8 @@ void LfRfidAppSceneSavedInfo::on_enter(LfRfidApp* app, bool need_restore) {
|
|||||||
app->view_controller.switch_to<ContainerVM>();
|
app->view_controller.switch_to<ContainerVM>();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LfRfidAppSceneSavedInfo::on_event(LfRfidApp* app, LfRfidApp::Event* event) {
|
bool LfRfidAppSceneSavedInfo::on_event(LfRfidApp* /* app */, LfRfidApp::Event* /* event */) {
|
||||||
bool consumed = false;
|
return false;
|
||||||
|
|
||||||
return consumed;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LfRfidAppSceneSavedInfo::on_exit(LfRfidApp* app) {
|
void LfRfidAppSceneSavedInfo::on_exit(LfRfidApp* app) {
|
||||||
|
@ -8,11 +8,9 @@ void LfRfidAppSceneSelectKey::on_enter(LfRfidApp* app, bool need_restore) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LfRfidAppSceneSelectKey::on_event(LfRfidApp* app, LfRfidApp::Event* event) {
|
bool LfRfidAppSceneSelectKey::on_event(LfRfidApp* /* app */, LfRfidApp::Event* /* event */) {
|
||||||
bool consumed = false;
|
return false;
|
||||||
|
|
||||||
return consumed;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LfRfidAppSceneSelectKey::on_exit(LfRfidApp* app) {
|
void LfRfidAppSceneSelectKey::on_exit(LfRfidApp* /* app */) {
|
||||||
}
|
}
|
@ -1,6 +1,6 @@
|
|||||||
#include "lfrfid_app_scene_write.h"
|
#include "lfrfid_app_scene_write.h"
|
||||||
|
|
||||||
void LfRfidAppSceneWrite::on_enter(LfRfidApp* app, bool need_restore) {
|
void LfRfidAppSceneWrite::on_enter(LfRfidApp* app, bool /* need_restore */) {
|
||||||
card_not_supported = false;
|
card_not_supported = false;
|
||||||
string_init(data_string);
|
string_init(data_string);
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "lfrfid_app_scene_write_success.h"
|
#include "lfrfid_app_scene_write_success.h"
|
||||||
|
|
||||||
void LfRfidAppSceneWriteSuccess::on_enter(LfRfidApp* app, bool need_restore) {
|
void LfRfidAppSceneWriteSuccess::on_enter(LfRfidApp* app, bool /* need_restore */) {
|
||||||
auto popup = app->view_controller.get<PopupVM>();
|
auto popup = app->view_controller.get<PopupVM>();
|
||||||
popup->set_header("Successfully\nwritten!", 94, 3, AlignCenter, AlignTop);
|
popup->set_header("Successfully\nwritten!", 94, 3, AlignCenter, AlignTop);
|
||||||
popup->set_icon(0, 6, &I_RFIDDolphinSuccess_108x57);
|
popup->set_icon(0, 6, &I_RFIDDolphinSuccess_108x57);
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user