Skip to content

Commit

Permalink
Review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Astrrra committed Dec 17, 2024
1 parent 9484ad2 commit cc8639a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions applications/main/infrared/scenes/infrared_scene_rpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,11 @@ bool infrared_scene_rpc_on_event(void* context, SceneManagerEvent event) {
TAG, "Sending signal with index \"%ld\"", app_state->current_button_index);
}
if(infrared->app_state.current_button_index != InfraredButtonIndexNone) {
InfraredErrorCode error =
infrared_tx_start_button_index(infrared, app_state->current_button_index);
InfraredSignal* signal = infrared_signal_alloc();
InfraredErrorCode error = infrared_remote_load_signal(
infrared->remote, signal, app_state->current_button_index);
if(!INFRARED_ERROR_PRESENT(error)) {
infrared_signal_transmit(signal);
const char* remote_name = infrared_remote_get_name(infrared->remote);
infrared_text_store_set(infrared, 0, "emulating\n%s", remote_name);

Expand All @@ -163,13 +165,10 @@ bool infrared_scene_rpc_on_event(void* context, SceneManagerEvent event) {
}

if(result) {
infrared_tx_stop(infrared);
scene_manager_set_scene_state(
infrared->scene_manager, InfraredSceneRpc, InfraredRpcStateLoaded);
scene_manager_stop(infrared->scene_manager);
view_dispatcher_stop(infrared->view_dispatcher);
}

infrared_signal_free(infrared->current_signal);
rpc_system_app_confirm(infrared->rpc_ctx, result);
} else if(
event.event == InfraredCustomEventTypeRpcExit ||
Expand Down

0 comments on commit cc8639a

Please sign in to comment.