Skip to content

Commit 5addbb8

Browse files
committed
Enable PWM/PPM outputs only after first packet is received.
1 parent d35c09d commit 5addbb8

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

RX.h

+5-6
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,6 @@ void setup()
261261
RF_channel = 0;
262262
rfmSetChannel(bind_data.hopchannel[RF_channel]);
263263

264-
setupPPMout();
265-
266264
//################### RX SYNC AT STARTUP #################
267265
RF_Mode = Receive;
268266
to_rx_mode();
@@ -289,10 +287,6 @@ void loop()
289287
last_pack_time = micros(); // record last package time
290288
lostpack = 0;
291289

292-
if (firstpack == 0) {
293-
firstpack = 1;
294-
}
295-
296290
Red_LED_OFF;
297291
Green_LED_ON;
298292

@@ -315,6 +309,11 @@ void loop()
315309
sei();
316310
}
317311

312+
if (firstpack == 0) {
313+
firstpack = 1;
314+
setupPPMout();
315+
}
316+
318317
if (rx_buf[0] == 0xF5) {
319318
if (!fs_saved) {
320319
save_failsafe_values();

0 commit comments

Comments
 (0)