Skip to content

Commit 6d7aa87

Browse files
committed
LP-520 Add PIOS_RCVR_TIMEOUT for failsafe state
1 parent 34d27dc commit 6d7aa87

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

flight/targets/boards/oplinkmini/firmware/pios_board.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ static void PIOS_Board_PPM_callback(__attribute__((unused)) uint32_t context, co
437437
#if defined(PIOS_INCLUDE_PPM) && defined(PIOS_INCLUDE_PPM_OUT)
438438
if (pios_ppm_out_id) {
439439
for (uint8_t i = 0; i < RFM22B_PPM_NUM_CHANNELS; ++i) {
440-
if (channels[i] != PIOS_RCVR_INVALID) {
440+
if ((channels[i] != PIOS_RCVR_INVALID) && (channels[i] != PIOS_RCVR_TIMEOUT)) {
441441
PIOS_PPM_OUT_Set(PIOS_PPM_OUTPUT, i, channels[i]);
442442
}
443443
}
@@ -453,7 +453,7 @@ static void PIOS_Board_PPM_callback(__attribute__((unused)) uint32_t context, co
453453
}
454454
#if defined(PIOS_INCLUDE_SERVO)
455455
for (uint8_t i = 0; i < servo_count; ++i) {
456-
uint16_t val = (channels[i] == PIOS_RCVR_INVALID) ? 0 : channels[i];
456+
uint16_t val = ((channels[i] == PIOS_RCVR_INVALID) || (channels[i] == PIOS_RCVR_TIMEOUT)) ? 0 : channels[i];
457457
PIOS_Servo_Set(i, val);
458458
}
459459
#endif /* PIOS_INCLUDE_SERVO */

0 commit comments

Comments
 (0)