@@ -82,11 +82,8 @@ void xremote_scene_transmit_send_pause(XRemote* app, CrossRemoteItem* item) {
8282void xremote_scene_transmit_send_subghz (XRemote * app , CrossRemoteItem * item ) {
8383 app -> transmitting = true;
8484 xremote_scene_ir_notification_message (app , SubGhzNotificationMessageBlinkStartSend );
85- // ADD SEND METHOD HERE
86- subghz_send (app , furi_string_get_cstr (item -> filename )); //currently crashes, null pointer
87- //furi_thread_flags_wait(0, FuriFlagWaitAny, 2000); //Remove later
88- //app->transmitting = false;
89- //xremote_scene_ir_notification_message(app, SubGhzNotificationMessageBlinkStop);
85+ subghz_send (app , furi_string_get_cstr (item -> filename ));
86+ //furi_thread_flags_wait(0, FuriFlagWaitAny, 2000);
9087}
9188
9289void xremote_scene_transmit_send_signal (void * context , CrossRemoteItem * item ) {
@@ -109,8 +106,6 @@ void xremote_scene_transmit_send_signal(void* context, CrossRemoteItem* item) {
109106 } else if (item -> type == XRemoteRemoteItemTypeSubGhz ) {
110107 xremote_scene_transmit_send_subghz (app , item );
111108 }
112-
113- //xremote_cross_remote_set_transmitting(remote, XRemoteTransmittingStop);
114109}
115110
116111void xremote_scene_transmit_run_remote (void * context ) {
@@ -124,14 +119,12 @@ void xremote_scene_transmit_run_remote(void* context) {
124119 xremote_cross_remote_set_transmitting (remote , XRemoteTransmittingStart );
125120 CrossRemoteItem * item = xremote_cross_remote_get_item (remote , i );
126121 xremote_scene_transmit_send_signal (app , item );
127- //furi_thread_flags_wait(0, FuriFlagWaitAny, 2000);
128122 //furi_thread_flags_wait(0, FuriFlagWaitAny, 1000);
129- //xremote_scene_ir_notification_message(app, InfraredNotificationMessageBlinkStartSend);
130123 } else if (xremote_cross_remote_get_transmitting (remote ) == XRemoteTransmittingStopSubghz ) {
131124 i ++ ;
132125 app -> state_notifications = SubGhzNotificationStateIDLE ;
133- subghz_txrx_stop (app -> subghz -> txrx );
134126 app -> transmitting = false;
127+ subghz_txrx_stop (app -> subghz -> txrx );
135128 xremote_scene_ir_notification_message (app , SubGhzNotificationMessageBlinkStop );
136129 xremote_cross_remote_set_transmitting (remote , XRemoteTransmittingIdle );
137130 //furi_thread_flags_wait(0, FuriFlagWaitAny, 1000);
@@ -142,7 +135,6 @@ void xremote_scene_transmit_run_remote(void* context) {
142135 }
143136 xremote_scene_ir_notification_message (app , InfraredNotificationMessageBlinkStop );
144137
145- //scene_manager_next_scene(app->scene_manager, XRemoteSceneXrList);
146138 scene_manager_previous_scene (app -> scene_manager );
147139 //xremote_transmit_model_set_name(app->xremote_transmit, xremote_cross_remote_get_name(remote));
148140}
@@ -167,8 +159,8 @@ bool xremote_scene_transmit_on_event(void* context, SceneManagerEvent event) {
167159 FURI_LOG_D ("SUBGHZ" , "stop event" );
168160 //app->stop_transmit = true;
169161 app -> state_notifications = SubGhzNotificationStateIDLE ;
170- subghz_txrx_stop (app -> subghz -> txrx );
171162 app -> transmitting = false;
163+ subghz_txrx_stop (app -> subghz -> txrx );
172164 xremote_scene_ir_notification_message (app , SubGhzNotificationMessageBlinkStop );
173165 xremote_cross_remote_set_transmitting (app -> cross_remote , XRemoteTransmittingStop );
174166 break ;
@@ -189,7 +181,7 @@ bool xremote_scene_transmit_on_event(void* context, SceneManagerEvent event) {
189181void xremote_scene_transmit_on_exit (void * context ) {
190182 XRemote * app = context ;
191183 app -> transmitting = false;
192- subghz_txrx_stop (app -> subghz -> txrx );
193184 app -> state_notifications = SubGhzNotificationStateIDLE ;
185+ subghz_txrx_stop (app -> subghz -> txrx );
194186 //xremote_cross_remote_set_transmitting(remote, XRemoteTransmittingIdle);
195187}
0 commit comments