added a rc status led

This commit is contained in:
Andreas Kleinert
2007-10-22 13:15:53 +00:00
parent 89bf2f3152
commit 053d453438
2 changed files with 12 additions and 5 deletions
+1 -1
View File
@@ -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
+11 -4
View File
@@ -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 ************************************************************/