mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-06 16:58:48 +08:00
start fixing setup_actuators
This commit is contained in:
@@ -10,7 +10,7 @@ CFG_FIXEDWING=$(PAPARAZZI_SRC)/conf/autopilot/subsystems/fixedwing
|
||||
|
||||
|
||||
SRC_FIXEDWING=.
|
||||
SRC_ARCH=$(SRC_FIXEDWING)/arch/$(ARCH)
|
||||
SRC_ARCH=arch/$(ARCH)
|
||||
SRC_FIXEDWING_TEST=$(SRC_FIXEDWING)/
|
||||
|
||||
SRC_FIRMWARE=firmwares/fixedwing
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
#
|
||||
#
|
||||
|
||||
SRC_ARCH=arch/$(ARCH)
|
||||
|
||||
CFG_SETUP=$(PAPARAZZI_SRC)/conf/autopilot/subsystems/SETUP
|
||||
CFG_SETUP=$(PAPARAZZI_SRC)/conf/autopilot/subsystems/setup
|
||||
|
||||
|
||||
SRC_SETUP=.
|
||||
@@ -49,9 +50,36 @@ usb_tunnel_1.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
|
||||
|
||||
|
||||
|
||||
|
||||
ifeq ($(ACTUATORS),)
|
||||
ifeq ($(BOARD),tiny)
|
||||
ifeq ($(BOARD_VERSION),1.1)
|
||||
include $(CFG_SETUP)/actuators_4015.makefile
|
||||
else
|
||||
ifeq ($(BOARD_VERSION),0.99)
|
||||
include $(CFG_SETUP)/actuators_4015.makefile
|
||||
else
|
||||
include $(CFG_SETUP)/actuators_4017.makefile
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifeq ($(BOARD),twog)
|
||||
include $(CFG_SETUP)/actuators_4017.makefile
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD),lisa_l)
|
||||
include $(CFG_SETUP)/actuators_direct.makefile
|
||||
endif
|
||||
|
||||
else
|
||||
include $(CFG_SETUP)/$(ACTUATORS).makefile
|
||||
endif
|
||||
|
||||
|
||||
# a test program to setup actuators
|
||||
setup_actuators.CFLAGS += -DFBW -DLED -DTIME_LED=1 -DACTUATORS=\"servos_4017_hw.h\" -DSERVOS_4017
|
||||
setup_actuators.CFLAGS += -DFBW -DLED -DTIME_LED=1
|
||||
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.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c pprz_transport.c downlink.c actuators.c setup_actuators.c $(SRC_ARCH)/uart_hw.c $(SRC_ARCH)/servos_4017_hw.c main.c
|
||||
setup_actuators.CFLAGS += $(SETUP_INC) -Ifirmwares/fixedwing
|
||||
setup_actuators.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c pprz_transport.c downlink.c setup_actuators.c $(SRC_ARCH)/uart_hw.c firmwares/fixedwing/main.c
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# for Tiny v1.1
|
||||
|
||||
$(TARGET).CFLAGS += -DACTUATORS=\"servos_4015_MAT_hw.h\" -DSERVOS_4015_MAT
|
||||
$(TARGET).srcs += $(SRC_ARCH)/servos_4015_MAT_hw.c actuators.c
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# for Tiny v2 or Twog v1
|
||||
|
||||
$(TARGET).CFLAGS += -DACTUATORS=\"servos_4017_hw.h\" -DSERVOS_4017
|
||||
$(TARGET).srcs += $(SRC_ARCH)/servos_4017_hw.c actuators.c
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
# for lisa_l
|
||||
|
||||
$(TARGET).CFLAGS += -DACTUATORS=\"servos_direct_hw.h\" -DSERVOS_DIRECT
|
||||
$(TARGET).srcs += $(SRC_ARCH)/servos_direct_hw.c actuators.c
|
||||
|
||||
|
||||
# TODO TODO UGLY HACK: We re-use the booz actuators: Should become universal actuator code!!
|
||||
# Carefull: paths might get broken with this silly rotorcraft/fixedwing mixup of directories
|
||||
|
||||
ifeq ($(ARCH), stm32)
|
||||
$(TARGET).srcs += firmwares/rotorcraft/actuators/arch/stm32/actuators_pwm_arch.c
|
||||
$(TARGET).CFLAGS += -Ifirmwares/rotorcraft/actuators/arch/stm32
|
||||
endif
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "estimator.h"
|
||||
#include "nav.h"
|
||||
#include "generated/airframe.h"
|
||||
#include "autopilot.h"
|
||||
#include "firmwares/fixedwing/autopilot.h"
|
||||
|
||||
/* mode */
|
||||
uint8_t v_ctl_mode;
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#include "gyro.h"
|
||||
#include "ap_downlink.h"
|
||||
#include "nav.h"
|
||||
#include "autopilot.h"
|
||||
#include "firmwares/fixedwing/autopilot.h"
|
||||
#include "estimator.h"
|
||||
#include "generated/settings.h"
|
||||
#include "link_mcu.h"
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
#include "firmwares/fixedwing/actuators.h"
|
||||
#include "subsystems/radio_control.h"
|
||||
#include "fbw_downlink.h"
|
||||
#include "autopilot.h"
|
||||
#include "firmwares/fixedwing/autopilot.h"
|
||||
#include "paparazzi.h"
|
||||
#include "estimator.h"
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "nav.h"
|
||||
#include "generated/airframe.h"
|
||||
#include "firmwares/fixedwing/guidance/guidance_v.h"
|
||||
#include "autopilot.h"
|
||||
#include "firmwares/fixedwing/autopilot.h"
|
||||
|
||||
|
||||
/* outer loop parameters */
|
||||
|
||||
Reference in New Issue
Block a user