trying to fix setup_actuators... didn't work

This commit is contained in:
Felix Ruess
2012-02-25 03:50:42 +01:00
parent 691d40fbf7
commit a8ec1f9f5c
2 changed files with 14 additions and 15 deletions
+6 -1
View File
@@ -97,11 +97,16 @@ endif
# a test program to setup actuators
ifeq ($(ARCH), lpc21)
setup_actuators.CFLAGS += -DFBW -DUSE_LED -DSYS_TIME_LED=1
setup_actuators.CFLAGS += -DFBW -DUSE_LED
setup_actuators.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600 -DDOWNLINK_DEVICE=Uart1 -DPPRZ_UART=Uart1
setup_actuators.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDATALINK=PPRZ
setup_actuators.CFLAGS += -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1
setup_actuators.CFLAGS += $(SETUP_INC) -Ifirmwares/fixedwing
ifneq ($(SYS_TIME_LED),none)
setup_actuators.CFLAGS += -DSYS_TIME_LED=$(SYS_TIME_LED)
endif
setup_actuators.CFLAGS += -DPERIODIC_FREQUENCY='60'
setup_actuators.CFLAGS += -DUSE_SYS_TIME
setup_actuators.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c $(SRC_ARCH)/armVIC.c subsystems/datalink/pprz_transport.c subsystems/datalink/downlink.c $(SRC_FIRMWARE)/setup_actuators.c mcu_periph/uart.c $(SRC_ARCH)/mcu_periph/uart_arch.c firmwares/fixedwing/main.c mcu.c $(SRC_ARCH)/mcu_arch.c
else ifeq ($(TARGET),setup_actuators)
$(error setup_actuators currently only implemented for the lpc21)
+8 -14
View File
@@ -7,12 +7,17 @@
#include "generated/airframe.h"
#define DATALINK_C
#include "subsystems/datalink/datalink.h"
#include "mcu_periph/uart.h"
#include "subsystems/datalink/pprz_transport.h"
#include "firmwares/fixedwing/main_fbw.h"
#include "subsystems/datalink/downlink.h"
#include "generated/settings.h"
#ifndef DOWNLINK_DEVICE
#define DOWNLINK_DEVICE DOWNLINK_FBW_DEVICE
#endif
#include "mcu_periph/uart.h"
#include "subsystems/datalink/downlink.h"
#include "ap_downlink.h"
#define IdOfMsg(x) (x[1])
@@ -76,16 +81,5 @@ void periodic_task_fbw(void) {
}
void event_task_fbw(void) {
if (PprzBuffer()) {
ReadPprzBuffer();
}
if (pprz_msg_received) {
pprz_msg_received = FALSE;
pprz_parse_payload();
LED_TOGGLE(3);
}
if (dl_msg_available) {
dl_parse_msg();
dl_msg_available = FALSE;
}
DatalinkEvent();
}