mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-04 13:55:40 +08:00
trying to fix setup_actuators... didn't work
This commit is contained in:
@@ -97,11 +97,16 @@ endif
|
|||||||
|
|
||||||
# a test program to setup actuators
|
# a test program to setup actuators
|
||||||
ifeq ($(ARCH), lpc21)
|
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 += -DUSE_UART1 -DUART1_BAUD=B57600 -DDOWNLINK_DEVICE=Uart1 -DPPRZ_UART=Uart1
|
||||||
setup_actuators.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDATALINK=PPRZ
|
setup_actuators.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDATALINK=PPRZ
|
||||||
setup_actuators.CFLAGS += -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1
|
setup_actuators.CFLAGS += -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1
|
||||||
setup_actuators.CFLAGS += $(SETUP_INC) -Ifirmwares/fixedwing
|
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
|
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)
|
else ifeq ($(TARGET),setup_actuators)
|
||||||
$(error setup_actuators currently only implemented for the lpc21)
|
$(error setup_actuators currently only implemented for the lpc21)
|
||||||
|
|||||||
@@ -7,12 +7,17 @@
|
|||||||
#include "generated/airframe.h"
|
#include "generated/airframe.h"
|
||||||
#define DATALINK_C
|
#define DATALINK_C
|
||||||
#include "subsystems/datalink/datalink.h"
|
#include "subsystems/datalink/datalink.h"
|
||||||
#include "mcu_periph/uart.h"
|
|
||||||
#include "subsystems/datalink/pprz_transport.h"
|
#include "subsystems/datalink/pprz_transport.h"
|
||||||
#include "firmwares/fixedwing/main_fbw.h"
|
#include "firmwares/fixedwing/main_fbw.h"
|
||||||
#include "subsystems/datalink/downlink.h"
|
|
||||||
#include "generated/settings.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])
|
#define IdOfMsg(x) (x[1])
|
||||||
|
|
||||||
@@ -76,16 +81,5 @@ void periodic_task_fbw(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void event_task_fbw(void) {
|
void event_task_fbw(void) {
|
||||||
if (PprzBuffer()) {
|
DatalinkEvent();
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user