mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-06 07:53:43 +08:00
added a rc status led
This commit is contained in:
@@ -76,7 +76,7 @@ ctl.srcs += booz_estimator.c booz_control.c booz_autopilot.c
|
||||
ctl.CFLAGS += -DACTUATORS=\"servos_4017_hw.h\" -DSERVOS_4017 -DSERVOS_4017_CLOCK_FALLING
|
||||
ctl.srcs += $(SRC_ARCH)/servos_4017_hw.c actuators.c
|
||||
|
||||
ctl.CFLAGS += -DRADIO_CONTROL -DRADIO_CONTROL_TYPE=RC_FUTABA
|
||||
ctl.CFLAGS += -DRADIO_CONTROL -DRADIO_CONTROL_TYPE=RC_FUTABA -DRC_LED=4
|
||||
ctl.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c
|
||||
|
||||
ctl.srcs += commands.c
|
||||
|
||||
@@ -65,9 +65,6 @@ static inline void radio_control_periodic_task ( void ) {
|
||||
_1Hz = 0;
|
||||
last_ppm_cpt = ppm_cpt;
|
||||
ppm_cpt = 0;
|
||||
//#if defined TIME_LED
|
||||
// LED_TOGGLE(TIME_LED);
|
||||
//#endif
|
||||
}
|
||||
|
||||
if (time_since_last_ppm >= RC_REALLY_LOST_TIME) {
|
||||
@@ -76,7 +73,17 @@ static inline void radio_control_periodic_task ( void ) {
|
||||
if (time_since_last_ppm >= RC_LOST_TIME)
|
||||
rc_status = RC_LOST;
|
||||
time_since_last_ppm++;
|
||||
}
|
||||
}
|
||||
|
||||
#if defined RC_LED
|
||||
if (rc_status == RC_OK) {
|
||||
LED_OFF(RC_LED);
|
||||
}
|
||||
else {
|
||||
LED_ON(RC_LED);
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
/********** EVENT ************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user