mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
Merge branch 'ofw_dev' into nfcrefactoring
This commit is contained in:
@@ -26,29 +26,31 @@ void subghz_tick_event_callback(void* context) {
|
||||
scene_manager_handle_tick_event(subghz->scene_manager);
|
||||
}
|
||||
|
||||
static void subghz_rpc_command_callback(RpcAppSystemEvent event, void* context) {
|
||||
static void subghz_rpc_command_callback(const RpcAppSystemEvent* event, void* context) {
|
||||
furi_assert(context);
|
||||
SubGhz* subghz = context;
|
||||
|
||||
furi_assert(subghz->rpc_ctx);
|
||||
|
||||
if(event == RpcAppEventSessionClose) {
|
||||
if(event->type == RpcAppEventTypeSessionClose) {
|
||||
view_dispatcher_send_custom_event(
|
||||
subghz->view_dispatcher, SubGhzCustomEventSceneRpcSessionClose);
|
||||
rpc_system_app_set_callback(subghz->rpc_ctx, NULL, NULL);
|
||||
subghz->rpc_ctx = NULL;
|
||||
} else if(event == RpcAppEventAppExit) {
|
||||
} else if(event->type == RpcAppEventTypeAppExit) {
|
||||
view_dispatcher_send_custom_event(subghz->view_dispatcher, SubGhzCustomEventSceneExit);
|
||||
} else if(event == RpcAppEventLoadFile) {
|
||||
} else if(event->type == RpcAppEventTypeLoadFile) {
|
||||
furi_assert(event->data.type == RpcAppSystemEventDataTypeString);
|
||||
furi_string_set(subghz->file_path, event->data.string);
|
||||
view_dispatcher_send_custom_event(subghz->view_dispatcher, SubGhzCustomEventSceneRpcLoad);
|
||||
} else if(event == RpcAppEventButtonPress) {
|
||||
} else if(event->type == RpcAppEventTypeButtonPress) {
|
||||
view_dispatcher_send_custom_event(
|
||||
subghz->view_dispatcher, SubGhzCustomEventSceneRpcButtonPress);
|
||||
} else if(event == RpcAppEventButtonRelease) {
|
||||
} else if(event->type == RpcAppEventTypeButtonRelease) {
|
||||
view_dispatcher_send_custom_event(
|
||||
subghz->view_dispatcher, SubGhzCustomEventSceneRpcButtonRelease);
|
||||
} else {
|
||||
rpc_system_app_confirm(subghz->rpc_ctx, event, false);
|
||||
rpc_system_app_confirm(subghz->rpc_ctx, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user