@@ -82,11 +82,8 @@ void xremote_scene_transmit_send_pause(XRemote* app, CrossRemoteItem* item) {
82
82
void xremote_scene_transmit_send_subghz (XRemote * app , CrossRemoteItem * item ) {
83
83
app -> transmitting = true;
84
84
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);
90
87
}
91
88
92
89
void xremote_scene_transmit_send_signal (void * context , CrossRemoteItem * item ) {
@@ -109,8 +106,6 @@ void xremote_scene_transmit_send_signal(void* context, CrossRemoteItem* item) {
109
106
} else if (item -> type == XRemoteRemoteItemTypeSubGhz ) {
110
107
xremote_scene_transmit_send_subghz (app , item );
111
108
}
112
-
113
- //xremote_cross_remote_set_transmitting(remote, XRemoteTransmittingStop);
114
109
}
115
110
116
111
void xremote_scene_transmit_run_remote (void * context ) {
@@ -124,14 +119,12 @@ void xremote_scene_transmit_run_remote(void* context) {
124
119
xremote_cross_remote_set_transmitting (remote , XRemoteTransmittingStart );
125
120
CrossRemoteItem * item = xremote_cross_remote_get_item (remote , i );
126
121
xremote_scene_transmit_send_signal (app , item );
127
- //furi_thread_flags_wait(0, FuriFlagWaitAny, 2000);
128
122
//furi_thread_flags_wait(0, FuriFlagWaitAny, 1000);
129
- //xremote_scene_ir_notification_message(app, InfraredNotificationMessageBlinkStartSend);
130
123
} else if (xremote_cross_remote_get_transmitting (remote ) == XRemoteTransmittingStopSubghz ) {
131
124
i ++ ;
132
125
app -> state_notifications = SubGhzNotificationStateIDLE ;
133
- subghz_txrx_stop (app -> subghz -> txrx );
134
126
app -> transmitting = false;
127
+ subghz_txrx_stop (app -> subghz -> txrx );
135
128
xremote_scene_ir_notification_message (app , SubGhzNotificationMessageBlinkStop );
136
129
xremote_cross_remote_set_transmitting (remote , XRemoteTransmittingIdle );
137
130
//furi_thread_flags_wait(0, FuriFlagWaitAny, 1000);
@@ -142,7 +135,6 @@ void xremote_scene_transmit_run_remote(void* context) {
142
135
}
143
136
xremote_scene_ir_notification_message (app , InfraredNotificationMessageBlinkStop );
144
137
145
- //scene_manager_next_scene(app->scene_manager, XRemoteSceneXrList);
146
138
scene_manager_previous_scene (app -> scene_manager );
147
139
//xremote_transmit_model_set_name(app->xremote_transmit, xremote_cross_remote_get_name(remote));
148
140
}
@@ -167,8 +159,8 @@ bool xremote_scene_transmit_on_event(void* context, SceneManagerEvent event) {
167
159
FURI_LOG_D ("SUBGHZ" , "stop event" );
168
160
//app->stop_transmit = true;
169
161
app -> state_notifications = SubGhzNotificationStateIDLE ;
170
- subghz_txrx_stop (app -> subghz -> txrx );
171
162
app -> transmitting = false;
163
+ subghz_txrx_stop (app -> subghz -> txrx );
172
164
xremote_scene_ir_notification_message (app , SubGhzNotificationMessageBlinkStop );
173
165
xremote_cross_remote_set_transmitting (app -> cross_remote , XRemoteTransmittingStop );
174
166
break ;
@@ -189,7 +181,7 @@ bool xremote_scene_transmit_on_event(void* context, SceneManagerEvent event) {
189
181
void xremote_scene_transmit_on_exit (void * context ) {
190
182
XRemote * app = context ;
191
183
app -> transmitting = false;
192
- subghz_txrx_stop (app -> subghz -> txrx );
193
184
app -> state_notifications = SubGhzNotificationStateIDLE ;
185
+ subghz_txrx_stop (app -> subghz -> txrx );
194
186
//xremote_cross_remote_set_transmitting(remote, XRemoteTransmittingIdle);
195
187
}
0 commit comments