This commit is contained in:
Willy-JL
2023-11-12 02:20:45 +00:00
498 changed files with 4821 additions and 2206 deletions

View File

@@ -28,29 +28,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);
}
}