@@ -120,29 +120,48 @@ void xremote_scene_transmit_run_remote(void* context) {
120
120
CrossRemote * remote = app -> cross_remote ;
121
121
122
122
size_t item_count = xremote_cross_remote_get_item_count (remote );
123
- for (size_t i = 0 ; i < item_count ;) {
124
- if (xremote_cross_remote_get_transmitting (remote ) == XRemoteTransmittingIdle ) {
125
- xremote_cross_remote_set_transmitting (remote , XRemoteTransmittingStart );
126
- CrossRemoteItem * item = xremote_cross_remote_get_item (remote , i );
127
- xremote_scene_transmit_send_signal (app , item );
128
- //furi_thread_flags_wait(0, FuriFlagWaitAny, 1000);
129
- } else if (xremote_cross_remote_get_transmitting (remote ) == XRemoteTransmittingStopSubghz ) {
130
- i ++ ;
131
- app -> state_notifications = SubGhzNotificationStateIDLE ;
132
- app -> transmitting = false;
133
- subghz_txrx_stop (app -> subghz -> txrx );
134
- xremote_scene_ir_notification_message (app , SubGhzNotificationMessageBlinkStop );
135
- xremote_cross_remote_set_transmitting (remote , XRemoteTransmittingIdle );
136
- //furi_thread_flags_wait(0, FuriFlagWaitAny, 1000);
137
- } else if (xremote_cross_remote_get_transmitting (remote ) == XRemoteTransmittingStop ) {
138
- i ++ ;
139
- xremote_cross_remote_set_transmitting (remote , XRemoteTransmittingIdle );
123
+ if (app -> loop_transmit ) {
124
+ while (true) {
125
+ for (size_t i = 0 ; i < item_count ;) {
126
+ if (xremote_cross_remote_get_transmitting (remote ) == XRemoteTransmittingIdle ) {
127
+ xremote_cross_remote_set_transmitting (remote , XRemoteTransmittingStart );
128
+ CrossRemoteItem * item = xremote_cross_remote_get_item (remote , i );
129
+ xremote_scene_transmit_send_signal (app , item );
130
+ } else if (xremote_cross_remote_get_transmitting (remote ) == XRemoteTransmittingStopSubghz ) {
131
+ i ++ ;
132
+ app -> state_notifications = SubGhzNotificationStateIDLE ;
133
+ app -> transmitting = false;
134
+ subghz_txrx_stop (app -> subghz -> txrx );
135
+ xremote_scene_ir_notification_message (app , SubGhzNotificationMessageBlinkStop );
136
+ xremote_cross_remote_set_transmitting (remote , XRemoteTransmittingIdle );
137
+ } else if (xremote_cross_remote_get_transmitting (remote ) == XRemoteTransmittingStop ) {
138
+ i ++ ;
139
+ xremote_cross_remote_set_transmitting (remote , XRemoteTransmittingIdle );
140
+ }
141
+ }
140
142
}
143
+ } else {
144
+ for (size_t i = 0 ; i < item_count ;) {
145
+ if (xremote_cross_remote_get_transmitting (remote ) == XRemoteTransmittingIdle ) {
146
+ xremote_cross_remote_set_transmitting (remote , XRemoteTransmittingStart );
147
+ CrossRemoteItem * item = xremote_cross_remote_get_item (remote , i );
148
+ xremote_scene_transmit_send_signal (app , item );
149
+ } else if (xremote_cross_remote_get_transmitting (remote ) == XRemoteTransmittingStopSubghz ) {
150
+ i ++ ;
151
+ app -> state_notifications = SubGhzNotificationStateIDLE ;
152
+ app -> transmitting = false;
153
+ subghz_txrx_stop (app -> subghz -> txrx );
154
+ xremote_scene_ir_notification_message (app , SubGhzNotificationMessageBlinkStop );
155
+ xremote_cross_remote_set_transmitting (remote , XRemoteTransmittingIdle );
156
+ } else if (xremote_cross_remote_get_transmitting (remote ) == XRemoteTransmittingStop ) {
157
+ i ++ ;
158
+ xremote_cross_remote_set_transmitting (remote , XRemoteTransmittingIdle );
159
+ }
160
+ }
141
161
}
142
162
xremote_scene_ir_notification_message (app , InfraredNotificationMessageBlinkStop );
143
163
144
164
scene_manager_previous_scene (app -> scene_manager );
145
- //xremote_transmit_model_set_name(app->xremote_transmit, xremote_cross_remote_get_name(remote));
146
165
}
147
166
148
167
void xremote_scene_transmit_on_enter (void * context ) {
0 commit comments