mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-27 00:37:37 +08:00
Actuators modules (#1985)
Convert actuators subsystems to modules. Some drivers (4015, 4017, pwm) makefiles are kept so that autoload for some boards is still working.
This commit is contained in:
committed by
Felix Ruess
parent
27134d490f
commit
f1cc62c088
@@ -18,7 +18,7 @@
|
||||
<module name="radio_control" type="ppm"/>
|
||||
<module name="telemetry" type="transparent"/>
|
||||
<module name="actuators" type="mkk">
|
||||
<define name="MKK_I2C_SCL_TIME" value="25"/>
|
||||
<configure name="ACTUATORS_MKK_I2C_SCL_TIME" value="25"/>
|
||||
</module>
|
||||
<module name="motor_mixing"/>
|
||||
<module name="imu" type="hbmini"/>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<module name="radio_control" type="ppm"/>
|
||||
<module name="telemetry" type="transparent"/>
|
||||
<module name="actuators" type="mkk">
|
||||
<define name="MKK_I2C_SCL_TIME" value="25"/>
|
||||
<configure name="ACTUATORS_MKK_I2C_SCL_TIME" value="25"/>
|
||||
</module>
|
||||
<module name="motor_mixing"/>
|
||||
<module name="actuators" type="pwm">
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
|
||||
# Actuator drivers for the raw ardrone version are included here
|
||||
|
||||
ap.CFLAGS += -DACTUATORS
|
||||
ap.srcs += $(SRC_BOARD)/actuators.c
|
||||
@@ -1,47 +0,0 @@
|
||||
# asctec controllers
|
||||
#
|
||||
# required xml configuration:
|
||||
#
|
||||
# servo section with driver="Asctec"
|
||||
# command_laws section to map motor_mixing commands to servos
|
||||
#
|
||||
|
||||
$(TARGET).CFLAGS += -DACTUATORS
|
||||
ACTUATORS_ASCTEC_SRCS = subsystems/actuators/actuators_asctec.c
|
||||
|
||||
|
||||
# set default i2c device if not already configured
|
||||
ifeq ($(ARCH), lpc21)
|
||||
ACTUATORS_ASCTEC_I2C_DEV ?= i2c0
|
||||
else ifeq ($(ARCH), stm32)
|
||||
ACTUATORS_ASCTEC_I2C_DEV ?= i2c1
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET), ap)
|
||||
ifndef ACTUATORS_ASCTEC_I2C_DEV
|
||||
$(error Error: ACTUATORS_ASCTEC_I2C_DEV not configured!)
|
||||
endif
|
||||
endif
|
||||
|
||||
# convert i2cx to upper/lower case
|
||||
ACTUATORS_ASCTEC_I2C_DEV_UPPER=$(shell echo $(ACTUATORS_ASCTEC_I2C_DEV) | tr a-z A-Z)
|
||||
ACTUATORS_ASCTEC_I2C_DEV_LOWER=$(shell echo $(ACTUATORS_ASCTEC_I2C_DEV) | tr A-Z a-z)
|
||||
|
||||
ACTUATORS_ASCTEC_CFLAGS += -DACTUATORS_ASCTEC_I2C_DEV=$(ACTUATORS_ASCTEC_I2C_DEV_LOWER)
|
||||
ACTUATORS_ASCTEC_CFLAGS += -DUSE_$(ACTUATORS_ASCTEC_I2C_DEV_UPPER)
|
||||
|
||||
ifeq ($(ARCH), lpc21)
|
||||
# set default i2c timing if not already configured
|
||||
ACTUATORS_ASCTEC_I2C_SCL_TIME ?= 150
|
||||
ACTUATORS_ASCTEC_CFLAGS += -D$(ACTUATORS_ASCTEC_I2C_DEV_UPPER)_SCLL=$(ACTUATORS_ASCTEC_I2C_SCL_TIME)
|
||||
ACTUATORS_ASCTEC_CFLAGS += -D$(ACTUATORS_ASCTEC_I2C_DEV_UPPER)_SCLH=$(ACTUATORS_ASCTEC_I2C_SCL_TIME)
|
||||
endif
|
||||
|
||||
ap.CFLAGS += $(ACTUATORS_ASCTEC_CFLAGS)
|
||||
ap.srcs += $(ACTUATORS_ASCTEC_SRCS)
|
||||
|
||||
|
||||
# Simulator
|
||||
nps.srcs += subsystems/actuators/actuators_asctec.c
|
||||
nps.CFLAGS += -DUSE_I2C0 -DACTUATORS_ASCTEC_I2C_DEV=i2c0
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
# asctec controllers v2
|
||||
#
|
||||
# required xml configuration:
|
||||
#
|
||||
# servo section with driver="Asctec_v2"
|
||||
# command_laws section to map motor_mixing commands to servos
|
||||
#
|
||||
|
||||
$(TARGET).CFLAGS += -DACTUATORS
|
||||
ACTUATORS_ASCTEC_V2_SRCS = subsystems/actuators/actuators_asctec_v2.c
|
||||
|
||||
|
||||
# set default i2c device if not already configured
|
||||
ifeq ($(ARCH), lpc21)
|
||||
ACTUATORS_ASCTEC_V2_I2C_DEV ?= i2c0
|
||||
else ifeq ($(ARCH), stm32)
|
||||
ACTUATORS_ASCTEC_V2_I2C_DEV ?= i2c1
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET), ap)
|
||||
ifndef ACTUATORS_ASCTEC_V2_I2C_DEV
|
||||
$(error Error: ACTUATORS_ASCTEC_V2_I2C_DEV not configured!)
|
||||
endif
|
||||
endif
|
||||
|
||||
# convert i2cx to upper/lower case
|
||||
ACTUATORS_ASCTEC_V2_I2C_DEV_UPPER=$(shell echo $(ACTUATORS_ASCTEC_V2_I2C_DEV) | tr a-z A-Z)
|
||||
ACTUATORS_ASCTEC_V2_I2C_DEV_LOWER=$(shell echo $(ACTUATORS_ASCTEC_V2_I2C_DEV) | tr A-Z a-z)
|
||||
|
||||
ACTUATORS_ASCTEC_V2_CFLAGS += -DACTUATORS_ASCTEC_V2_I2C_DEV=$(ACTUATORS_ASCTEC_V2_I2C_DEV_LOWER)
|
||||
ACTUATORS_ASCTEC_V2_CFLAGS += -DUSE_$(ACTUATORS_ASCTEC_V2_I2C_DEV_UPPER)
|
||||
|
||||
ifeq ($(ARCH), lpc21)
|
||||
# set default i2c timing if not already configured
|
||||
ACTUATORS_ASCTEC_V2_I2C_SCL_TIME ?= 150
|
||||
ACTUATORS_ASCTEC_V2_CFLAGS += -D$(ACTUATORS_ASCTEC_V2_I2C_DEV_UPPER)_SCLL=$(ACTUATORS_ASCTEC_V2_I2C_SCL_TIME)
|
||||
ACTUATORS_ASCTEC_V2_CFLAGS += -D$(ACTUATORS_ASCTEC_V2_I2C_DEV_UPPER)_SCLH=$(ACTUATORS_ASCTEC_V2_I2C_SCL_TIME)
|
||||
endif
|
||||
|
||||
ap.CFLAGS += $(ACTUATORS_ASCTEC_V2_CFLAGS)
|
||||
ap.srcs += $(ACTUATORS_ASCTEC_V2_SRCS)
|
||||
|
||||
|
||||
|
||||
# Simulator
|
||||
nps.srcs += subsystems/actuators/actuators_asctec_v2.c
|
||||
nps.CFLAGS += -DUSE_I2C0 -DACTUATORS_ASCTEC_V2_I2C_DEV=i2c0
|
||||
@@ -1,47 +0,0 @@
|
||||
# asctec controllers v2 with new I2C protocol
|
||||
#
|
||||
# required xml configuration:
|
||||
#
|
||||
# servo section with driver="Asctec_v2_new"
|
||||
# command_laws section to map motor_mixing commands to servos
|
||||
#
|
||||
|
||||
$(TARGET).CFLAGS += -DACTUATORS
|
||||
ACTUATORS_ASCTEC_V2_SRCS = subsystems/actuators/actuators_asctec_v2_new.c
|
||||
|
||||
|
||||
# set default i2c device if not already configured
|
||||
ifeq ($(ARCH), lpc21)
|
||||
ACTUATORS_ASCTEC_V2_I2C_DEV ?= i2c0
|
||||
else ifeq ($(ARCH), stm32)
|
||||
ACTUATORS_ASCTEC_V2_I2C_DEV ?= i2c1
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET), ap)
|
||||
ifndef ACTUATORS_ASCTEC_V2_I2C_DEV
|
||||
$(error Error: ACTUATORS_ASCTEC_V2_I2C_DEV not configured!)
|
||||
endif
|
||||
endif
|
||||
|
||||
# convert i2cx to upper/lower case
|
||||
ACTUATORS_ASCTEC_V2_I2C_DEV_UPPER=$(shell echo $(ACTUATORS_ASCTEC_V2_I2C_DEV) | tr a-z A-Z)
|
||||
ACTUATORS_ASCTEC_V2_I2C_DEV_LOWER=$(shell echo $(ACTUATORS_ASCTEC_V2_I2C_DEV) | tr A-Z a-z)
|
||||
|
||||
ACTUATORS_ASCTEC_V2_CFLAGS += -DACTUATORS_ASCTEC_V2_I2C_DEV=$(ACTUATORS_ASCTEC_V2_I2C_DEV_LOWER)
|
||||
ACTUATORS_ASCTEC_V2_CFLAGS += -DUSE_$(ACTUATORS_ASCTEC_V2_I2C_DEV_UPPER)
|
||||
|
||||
ifeq ($(ARCH), lpc21)
|
||||
# set default i2c timing if not already configured
|
||||
ACTUATORS_ASCTEC_V2_I2C_SCL_TIME ?= 150
|
||||
ACTUATORS_ASCTEC_V2_CFLAGS += -D$(ACTUATORS_ASCTEC_V2_I2C_DEV_UPPER)_SCLL=$(ACTUATORS_ASCTEC_V2_I2C_SCL_TIME)
|
||||
ACTUATORS_ASCTEC_V2_CFLAGS += -D$(ACTUATORS_ASCTEC_V2_I2C_DEV_UPPER)_SCLH=$(ACTUATORS_ASCTEC_V2_I2C_SCL_TIME)
|
||||
endif
|
||||
|
||||
ap.CFLAGS += $(ACTUATORS_ASCTEC_V2_CFLAGS)
|
||||
ap.srcs += $(ACTUATORS_ASCTEC_V2_SRCS)
|
||||
|
||||
|
||||
|
||||
# Simulator
|
||||
nps.srcs += subsystems/actuators/actuators_asctec_v2_new.c
|
||||
nps.CFLAGS += -DUSE_I2C0 -DACTUATORS_ASCTEC_V2_I2C_DEV=i2c0
|
||||
@@ -1,11 +0,0 @@
|
||||
|
||||
# Actuator drivers for the bebop
|
||||
|
||||
BEBOP_ACTUATORS_I2C_DEV ?= i2c1
|
||||
BEBOP_ACTUATORS_I2C_DEV_UPPER=$(shell echo $(BEBOP_ACTUATORS_I2C_DEV) | tr a-z A-Z)
|
||||
BEBOP_ACTUATORS_I2C_DEV_LOWER=$(shell echo $(BEBOP_ACTUATORS_I2C_DEV) | tr A-Z a-z)
|
||||
|
||||
BEBOP_ACTUATORS_CFLAGS += -DBEBOP_ACTUATORS_I2C_DEV=$(BEBOP_ACTUATORS_I2C_DEV_LOWER) -DUSE_$(BEBOP_ACTUATORS_I2C_DEV_UPPER)=1
|
||||
|
||||
ap.CFLAGS += -DACTUATORS $(BEBOP_ACTUATORS_CFLAGS)
|
||||
ap.srcs += $(SRC_BOARD)/actuators.c
|
||||
@@ -1,10 +0,0 @@
|
||||
ifeq ($(ARCH), lpc21)
|
||||
$(error Error: dualpwm actuators only implemented for stm32)
|
||||
endif
|
||||
|
||||
$(TARGET).CFLAGS += -DACTUATORS
|
||||
$(TARGET).srcs += $(SRC_ARCH)/subsystems/actuators/actuators_dualpwm_arch.c
|
||||
ifeq ($(ARCH), stm32)
|
||||
$(TARGET).srcs += $(SRC_ARCH)/subsystems/actuators/actuators_shared_arch.c
|
||||
endif
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
# for split AP/FBW
|
||||
@@ -1,18 +0,0 @@
|
||||
# AutoQuad ESC32
|
||||
#
|
||||
# required xml configuration:
|
||||
#
|
||||
# servo section with driver="ESC32"
|
||||
# command_laws section to map motor_mixing commands to servos
|
||||
#
|
||||
|
||||
$(TARGET).CFLAGS += -DACTUATORS -DUSE_CAN_EXT_ID
|
||||
ACTUATORS_ESC32_SRCS = mcu_periph/can.c $(SRC_ARCH)/mcu_periph/can_arch.c subsystems/actuators/actuators_esc32.c
|
||||
|
||||
|
||||
ap.srcs += $(ACTUATORS_ESC32_SRCS)
|
||||
|
||||
|
||||
# Simulator
|
||||
#nps.srcs += subsystems/actuators/actuators_asctec_v2.c
|
||||
#nps.CFLAGS += -DUSE_I2C0 -DACTUATORS_ASCTEC_V2_I2C_DEV=i2c0
|
||||
@@ -1,60 +0,0 @@
|
||||
#
|
||||
# Mikrokopter Actuators
|
||||
#
|
||||
# enable the subsystem for your firmware:
|
||||
# <firmware name="rotorcraft">
|
||||
# ...
|
||||
# <subsystem name="actuators" type="mkk">
|
||||
# <configure name="MKK_I2C_SCL_TIME" value="50"/> <!-- this is optional, 150 is default, use 50 for 8 motors-->
|
||||
# </subsystem>
|
||||
# <define name="I2C_TRANSACTION_QUEUE_LEN" value="10"/> <!-- default is 8, increase to 10 or more for 8 motors-->
|
||||
# </firmware>
|
||||
#
|
||||
#
|
||||
# required xml configuration:
|
||||
# <section name="ACTUATORS_MKK" prefix="ACTUATORS_MKK_">
|
||||
# <define name="NB" value="4"/>
|
||||
# <define name="ADDR" value="{ 0x52, 0x54, 0x56, 0x58 }"/>
|
||||
# </section>
|
||||
#
|
||||
# servo section with driver="Mkk"
|
||||
# command_laws section to map motor_mixing commands to servos
|
||||
# max command = 255
|
||||
|
||||
$(TARGET).CFLAGS += -DACTUATORS
|
||||
|
||||
ACTUATORS_MKK_SRCS = subsystems/actuators/actuators_mkk.c
|
||||
|
||||
|
||||
ifeq ($(ARCH), lpc21)
|
||||
ACTUATORS_MKK_I2C_DEV ?= i2c0
|
||||
else ifeq ($(ARCH), stm32)
|
||||
ACTUATORS_MKK_I2C_DEV ?= i2c1
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET), ap)
|
||||
ifndef ACTUATORS_MKK_I2C_DEV
|
||||
$(error Error: ACTUATORS_MKK_I2C_DEV not configured!)
|
||||
endif
|
||||
endif
|
||||
|
||||
# convert i2cx to upper/lower case
|
||||
ACTUATORS_MKK_I2C_DEV_UPPER=$(shell echo $(ACTUATORS_MKK_I2C_DEV) | tr a-z A-Z)
|
||||
ACTUATORS_MKK_I2C_DEV_LOWER=$(shell echo $(ACTUATORS_MKK_I2C_DEV) | tr A-Z a-z)
|
||||
|
||||
ACTUATORS_MKK_CFLAGS += -DACTUATORS_MKK_I2C_DEV=$(ACTUATORS_MKK_I2C_DEV_LOWER)
|
||||
ACTUATORS_MKK_CFLAGS += -DUSE_$(ACTUATORS_MKK_I2C_DEV_UPPER)
|
||||
|
||||
ifeq ($(ARCH), lpc21)
|
||||
# set default i2c timing if not already configured
|
||||
ACTUATORS_MKK_I2C_SCL_TIME ?= 150
|
||||
ACTUATORS_MKK_CFLAGS += -D$(ACTUATORS_MKK_I2C_DEV_UPPER)_SCLL=$(ACTUATORS_MKK_I2C_SCL_TIME)
|
||||
ACTUATORS_MKK_CFLAGS += -D$(ACTUATORS_MKK_I2C_DEV_UPPER)_SCLH=$(ACTUATORS_MKK_I2C_SCL_TIME)
|
||||
endif
|
||||
|
||||
ap.CFLAGS += $(ACTUATORS_MKK_CFLAGS)
|
||||
ap.srcs += $(ACTUATORS_MKK_SRCS)
|
||||
|
||||
# Simulator
|
||||
nps.srcs += subsystems/actuators/actuators_mkk.c
|
||||
nps.CFLAGS += -DUSE_I2C0 -DACTUATORS_MKK_I2C_DEV=i2c0
|
||||
@@ -1,59 +0,0 @@
|
||||
#
|
||||
# Mikrokopter v2 Actuators
|
||||
#
|
||||
# enable the subsystem for your firmware:
|
||||
# <firmware name="rotorcraft">
|
||||
# ...
|
||||
# <subsystem name="actuators" type="mkk_v2">
|
||||
# <configure name="MKK_V2_I2C_SCL_TIME" value="50"/> <!-- this is optional and only for lpc, 150 is default, use 50 for 8 motors-->
|
||||
# </subsystem>
|
||||
# <define name="I2C_TRANSACTION_QUEUE_LEN" value="10"/> <!-- default is 8, increase to 10 or more for 8 motors-->
|
||||
# </firmware>
|
||||
#
|
||||
#
|
||||
# required xml configuration:
|
||||
# <section name="ACTUATORS_MKK_V2" prefix="ACTUATORS_MKK_V2_">
|
||||
# <define name="NB" value="4"/>
|
||||
# <define name="ADDR" value="{ 0x52, 0x54, 0x56, 0x58 }"/>
|
||||
# </section>
|
||||
#
|
||||
# servo section with driver="Mkk_v2"
|
||||
# command_laws section to map motor_mixing commands to servos
|
||||
# max command = 2047
|
||||
|
||||
$(TARGET).CFLAGS += -DACTUATORS
|
||||
ACTUATORS_MKK_V2_SRCS = subsystems/actuators/actuators_mkk_v2.c
|
||||
|
||||
|
||||
ifeq ($(ARCH), lpc21)
|
||||
ACTUATORS_MKK_V2_I2C_DEV ?= i2c0
|
||||
else ifeq ($(ARCH), stm32)
|
||||
ACTUATORS_MKK_V2_I2C_DEV ?= i2c1
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET), ap)
|
||||
ifndef ACTUATORS_MKK_V2_I2C_DEV
|
||||
$(error Error: ACTUATORS_MKK_V2_I2C_DEV not configured!)
|
||||
endif
|
||||
endif
|
||||
|
||||
# convert i2cx to upper/lower case
|
||||
ACTUATORS_MKK_V2_I2C_DEV_UPPER=$(shell echo $(ACTUATORS_MKK_V2_I2C_DEV) | tr a-z A-Z)
|
||||
ACTUATORS_MKK_V2_I2C_DEV_LOWER=$(shell echo $(ACTUATORS_MKK_V2_I2C_DEV) | tr A-Z a-z)
|
||||
|
||||
ACTUATORS_MKK_V2_CFLAGS += -DACTUATORS_MKK_V2_I2C_DEV=$(ACTUATORS_MKK_V2_I2C_DEV_LOWER)
|
||||
ACTUATORS_MKK_V2_CFLAGS += -DUSE_$(ACTUATORS_MKK_V2_I2C_DEV_UPPER)
|
||||
|
||||
ifeq ($(ARCH), lpc21)
|
||||
# set default i2c timing if not already configured
|
||||
ACTUATORS_MKK_V2_I2C_SCL_TIME ?= 150
|
||||
ACTUATORS_MKK_V2_CFLAGS += -D$(ACTUATORS_MKK_V2_I2C_DEV_UPPER)_SCLL=$(ACTUATORS_MKK_V2_I2C_SCL_TIME)
|
||||
ACTUATORS_MKK_V2_CFLAGS += -D$(ACTUATORS_MKK_V2_I2C_DEV_UPPER)_SCLH=$(ACTUATORS_MKK_V2_I2C_SCL_TIME)
|
||||
endif
|
||||
|
||||
ap.CFLAGS += $(ACTUATORS_MKK_V2_CFLAGS)
|
||||
ap.srcs += $(ACTUATORS_MKK_V2_SRCS)
|
||||
|
||||
# Simulator:
|
||||
nps.srcs += subsystems/actuators/actuators_mkk_v2.c
|
||||
nps.CFLAGS += -DUSE_I2C0 -DACTUATORS_MKK_V2_I2C_DEV=i2c0
|
||||
@@ -1,10 +0,0 @@
|
||||
# to output standard PPM to a R/C receiver
|
||||
#
|
||||
# This is used in the case where you want to directly drive a receiver which has a microcontroller
|
||||
# to do the decoding and driving of the servos (not a 4015 or 4017 decoder chip).
|
||||
# The PPM is output on the SERV_CLK pin. The PPM frame rate, pulse width, and number of channels
|
||||
# can be adjusted in the "servos_ppm_hw.h" file to suit your particular receiver.
|
||||
|
||||
$(TARGET).CFLAGS += -DACTUATORS -DSERVOS_PPM_MAT
|
||||
$(TARGET).srcs += $(SRC_ARCH)/subsystems/actuators/servos_ppm_hw.c
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
|
||||
# Actuator drivers for sbus output
|
||||
# Use an inverter after the serial output
|
||||
|
||||
ACTUATORS_SBUS_DEV ?= UART4
|
||||
ACTUATORS_SBUS_DEV_UPPER =$(shell echo $(ACTUATORS_SBUS_DEV) | tr a-z A-Z)
|
||||
ACTUATORS_SBUS_DEV_LOWER =$(shell echo $(ACTUATORS_SBUS_DEV) | tr A-Z a-z)
|
||||
|
||||
ACTUATORS_SBUS_CFLAGS = -DACTUATORS_SBUS_DEV=$(ACTUATORS_SBUS_DEV_LOWER) -DUSE_$(ACTUATORS_SBUS_DEV_UPPER)
|
||||
ACTUATORS_SBUS_CFLAGS += -D$(ACTUATORS_SBUS_DEV_UPPER)_BAUD=100000 -DUSE_$(ACTUATORS_SBUS_DEV_UPPER)_RX=FALSE
|
||||
|
||||
$(TARGET).CFLAGS += -DACTUATORS $(ACTUATORS_SBUS_CFLAGS)
|
||||
$(TARGET).srcs += subsystems/actuators/actuators_sbus.c
|
||||
@@ -1,57 +0,0 @@
|
||||
#
|
||||
# Skiron Actuators
|
||||
#
|
||||
# enable the subsystem for your firmware:
|
||||
# <firmware name="rotorcraft">
|
||||
# ...
|
||||
# <subsystem name="actuators" type="skiron">
|
||||
# <configure name="SKIRON_I2C_SCL_TIME" value="50"/> <!-- this is optional, 150 is default -->
|
||||
# </subsystem>
|
||||
# ...
|
||||
# </firmware>
|
||||
#
|
||||
#
|
||||
# required xml configuration:
|
||||
#
|
||||
# servo section with driver="Skiron"
|
||||
# command_laws section to map motor_mixing commands to servos
|
||||
#
|
||||
|
||||
$(TARGET).CFLAGS += -DACTUATORS
|
||||
ACTUATORS_SKIRON_SRCS = subsystems/actuators/actuators_skiron.c
|
||||
|
||||
# set default i2c device if not already configured
|
||||
ifeq ($(ARCH), lpc21)
|
||||
ACTUATORS_SKIRON_I2C_DEV ?= i2c0
|
||||
else ifeq ($(ARCH), stm32)
|
||||
ACTUATORS_SKIRON_I2C_DEV ?= i2c1
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET), ap)
|
||||
ifndef ACTUATORS_SKIRON_I2C_DEV
|
||||
$(error Error: ACTUATORS_SKIRON_I2C_DEV not configured!)
|
||||
endif
|
||||
endif
|
||||
|
||||
# convert i2cx to upper/lower case
|
||||
ACTUATORS_SKIRON_I2C_DEV_UPPER=$(shell echo $(ACTUATORS_SKIRON_I2C_DEV) | tr a-z A-Z)
|
||||
ACTUATORS_SKIRON_I2C_DEV_LOWER=$(shell echo $(ACTUATORS_SKIRON_I2C_DEV) | tr A-Z a-z)
|
||||
|
||||
ACTUATORS_SKIRON_CFLAGS += -DACTUATORS_SKIRON_I2C_DEV=$(ACTUATORS_SKIRON_I2C_DEV_LOWER)
|
||||
ACTUATORS_SKIRON_CFLAGS += -DUSE_$(ACTUATORS_SKIRON_I2C_DEV_UPPER)
|
||||
|
||||
ifeq ($(ARCH), lpc21)
|
||||
# set default i2c timing if not already configured
|
||||
ACTUATORS_SKIRON_I2C_SCL_TIME ?= 150
|
||||
ACTUATORS_SKIRON_CFLAGS += -D$(ACTUATORS_SKIRON_I2C_DEV_UPPER)_SCLL=$(ACTUATORS_SKIRON_I2C_SCL_TIME)
|
||||
ACTUATORS_SKIRON_CFLAGS += -D$(ACTUATORS_SKIRON_I2C_DEV_UPPER)_SCLH=$(ACTUATORS_SKIRON_I2C_SCL_TIME)
|
||||
endif
|
||||
|
||||
ap.CFLAGS += $(ACTUATORS_SKIRON_CFLAGS)
|
||||
ap.srcs += $(ACTUATORS_SKIRON_SRCS)
|
||||
|
||||
|
||||
# Simulator
|
||||
nps.srcs += subsystems/actuators/actuators_skiron.c
|
||||
nps.CFLAGS += -DUSE_I2C0 -DACTUATORS_SKIRON_I2C_DEV=i2c0
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
|
||||
# Actuator drivers for spektrum output
|
||||
|
||||
ACTUATORS_SPEKTRUM_DEV ?= UART4
|
||||
ACTUATORS_SPEKTRUM_DEV_UPPER =$(shell echo $(ACTUATORS_SPEKTRUM_DEV) | tr a-z A-Z)
|
||||
ACTUATORS_SPEKTRUM_DEV_LOWER =$(shell echo $(ACTUATORS_SPEKTRUM_DEV) | tr A-Z a-z)
|
||||
|
||||
ACTUATORS_SPEKTRUM_CFLAGS = -DACTUATORS_SPEKTRUM_DEV=$(ACTUATORS_SPEKTRUM_DEV_LOWER) -DUSE_$(ACTUATORS_SPEKTRUM_DEV_UPPER)
|
||||
ACTUATORS_SPEKTRUM_CFLAGS += -D$(ACTUATORS_SPEKTRUM_DEV_UPPER)_BAUD=115200 -DUSE_$(ACTUATORS_SPEKTRUM_DEV_UPPER)_RX=FALSE
|
||||
|
||||
ifdef ACTUATORS_SPEKTRUM_DEV2
|
||||
ACTUATORS_SPEKTRUM_DEV2_UPPER =$(shell echo $(ACTUATORS_SPEKTRUM_DEV2) | tr a-z A-Z)
|
||||
ACTUATORS_SPEKTRUM_DEV2_LOWER =$(shell echo $(ACTUATORS_SPEKTRUM_DEV2) | tr A-Z a-z)
|
||||
ACTUATORS_SPEKTRUM_CFLAGS += -DACTUATORS_SPEKTRUM_DEV2=$(ACTUATORS_SPEKTRUM_DEV2_LOWER) -DUSE_$(ACTUATORS_SPEKTRUM_DEV2_UPPER)
|
||||
ACTUATORS_SPEKTRUM_CFLAGS += -D$(ACTUATORS_SPEKTRUM_DEV2_UPPER)_BAUD=115200 -DUSE_$(ACTUATORS_SPEKTRUM_DEV2_UPPER)_RX=FALSE
|
||||
endif
|
||||
|
||||
$(TARGET).CFLAGS += -DACTUATORS $(ACTUATORS_SPEKTRUM_CFLAGS)
|
||||
$(TARGET).srcs += subsystems/actuators/actuators_spektrum.c
|
||||
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="actuators_4015" dir="actuators" task="actuators">
|
||||
<doc>
|
||||
<description>
|
||||
Actuators Driver using a 4015
|
||||
</description>
|
||||
</doc>
|
||||
<header>
|
||||
<file name="actuators_4015.h" dir="subsystems/actuators"/>
|
||||
</header>
|
||||
<makefile target="!sim|nps">
|
||||
<define name="ACTUATORS"/>
|
||||
<define name="SERVOS_4015_MAT"/>
|
||||
<file_arch name="servos_4015_MAT_hw.c" dir="subsystems/actuators"/>
|
||||
</makefile>
|
||||
</module>
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="actuators_4017" dir="actuators" task="actuators">
|
||||
<doc>
|
||||
<description>
|
||||
Actuators Driver using a 4017 chip
|
||||
</description>
|
||||
</doc>
|
||||
<header>
|
||||
<file name="actuators_4017.h" dir="subsystems/actuators"/>
|
||||
</header>
|
||||
<makefile target="!sim|nps">
|
||||
<define name="ACTUATORS"/>
|
||||
<define name="SERVOS_4017"/>
|
||||
<file_arch name="actuators_4017_hw.c" dir="subsystems/actuators"/>
|
||||
</makefile>
|
||||
</module>
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="actuators_ardrone2" dir="actuators" task="actuators">
|
||||
<doc>
|
||||
<description>
|
||||
Actuators Driver for ARDrone2
|
||||
</description>
|
||||
</doc>
|
||||
<header>
|
||||
<file name="actuators.h" dir="boards/ardrone"/>
|
||||
</header>
|
||||
<makefile target="ap">
|
||||
<define name="ACTUATORS"/>
|
||||
<file name="actuators.c" dir="$(SRC_BOARD)"/>
|
||||
</makefile>
|
||||
</module>
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="actuators_asctec" dir="actuators" task="actuators">
|
||||
<doc>
|
||||
<description>
|
||||
Actuators Driver for Asctec V1 ESC
|
||||
|
||||
required xml configuration:
|
||||
- servo section with driver="Asctec"
|
||||
- command_laws section to map motor_mixing commands to servos
|
||||
</description>
|
||||
<configure name="ACTUATORS_ASCTEC_I2C_DEV" value="i2cX" description="I2C port (default i2c1)"/>
|
||||
<configure name="ACTUATORS_ASCTEC_I2C_SCL_TIME" value="150" description="configurable I2C timing on lpc21 boards"/>
|
||||
</doc>
|
||||
<header>
|
||||
<file name="actuators_asctec.h" dir="subsystems/actuators"/>
|
||||
</header>
|
||||
<makefile target="!sim|nps">
|
||||
<configure name="ACTUATORS_ASCTEC_I2C_DEV" default="i2c1" case="upper|lower"/>
|
||||
<configure name="ACTUATORS_ASCTEC_I2C_SCL_TIME" default="150"/>
|
||||
<define name="ACTUATORS"/>
|
||||
<define name="ACTUATORS_ASCTEC_I2C_DEV" value="$(ACTUATORS_ASCTEC_I2C_DEV_LOWER)"/>
|
||||
<define name="USE_$(ACTUATORS_ASCTEC_I2C_DEV_UPPER)"/>
|
||||
<define name="$(ACTUATORS_ASCTEC_I2C_DEV_UPPER)_SCLL" value="$(ACTUATORS_ASCTEC_I2C_SCL_TIME)" cond="ifeq ($(ARCH), lpc21)"/>
|
||||
<define name="$(ACTUATORS_ASCTEC_I2C_DEV_UPPER)_SCLH" value="$(ACTUATORS_ASCTEC_I2C_SCL_TIME)" cond="ifeq ($(ARCH), lpc21)"/>
|
||||
<file name="actuators_asctec.c" dir="subsystems/actuators"/>
|
||||
</makefile>
|
||||
<makefile target="nps">
|
||||
<define name="USE_I2C0"/>
|
||||
<define name="ACTUATORS_ASCTEC_I2C_DEV" value="i2c0"/>
|
||||
<file name="actuators_asctec.c" dir="subsystems/actuators"/>
|
||||
</makefile>
|
||||
</module>
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="actuators_asctec_v2" dir="actuators" task="actuators">
|
||||
<doc>
|
||||
<description>
|
||||
Actuators Driver for Asctec V2 ESC
|
||||
|
||||
required xml configuration:
|
||||
- servo section with driver="Asctec_v2"
|
||||
- command_laws section to map motor_mixing commands to servos
|
||||
</description>
|
||||
<configure name="ACTUATORS_ASCTEC_V2_I2C_DEV" value="i2cX" description="I2C port (default i2c1)"/>
|
||||
<configure name="ACTUATORS_ASCTEC_V2_I2C_SCL_TIME" value="150" description="configurable I2C timing on lpc21 boards"/>
|
||||
</doc>
|
||||
<header>
|
||||
<file name="actuators_asctec_v2.h" dir="subsystems/actuators"/>
|
||||
</header>
|
||||
<makefile target="!sim|nps">
|
||||
<configure name="ACTUATORS_ASCTEC_V2_I2C_DEV" default="i2c1" case="upper|lower"/>
|
||||
<configure name="ACTUATORS_ASCTEC_V2_I2C_SCL_TIME" default="150"/>
|
||||
<define name="ACTUATORS"/>
|
||||
<define name="ACTUATORS_ASCTEC_V2_I2C_DEV" value="$(ACTUATORS_ASCTEC_V2_I2C_DEV_LOWER)"/>
|
||||
<define name="USE_$(ACTUATORS_ASCTEC_V2_I2C_DEV_UPPER)"/>
|
||||
<define name="$(ACTUATORS_ASCTEC_V2_I2C_DEV_UPPER)_SCLL" value="$(ACTUATORS_ASCTEC_V2_I2C_SCL_TIME)" cond="ifeq ($(ARCH), lpc21)"/>
|
||||
<define name="$(ACTUATORS_ASCTEC_V2_I2C_DEV_UPPER)_SCLH" value="$(ACTUATORS_ASCTEC_V2_I2C_SCL_TIME)" cond="ifeq ($(ARCH), lpc21)"/>
|
||||
<file name="actuators_asctec_v2.c" dir="subsystems/actuators"/>
|
||||
</makefile>
|
||||
<makefile target="nps">
|
||||
<define name="USE_I2C0"/>
|
||||
<define name="ACTUATORS_ASCTEC_V2_I2C_DEV" value="i2c0"/>
|
||||
<file name="actuators_asctec_v2.c" dir="subsystems/actuators"/>
|
||||
</makefile>
|
||||
</module>
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="actuators_asctec_v2_new" dir="actuators" task="actuators">
|
||||
<doc>
|
||||
<description>
|
||||
New Actuators Driver for Asctec V2 ESC
|
||||
|
||||
required xml configuration:
|
||||
- servo section with driver="Asctec_v2_new"
|
||||
- command_laws section to map motor_mixing commands to servos
|
||||
</description>
|
||||
<configure name="ACTUATORS_ASCTEC_V2_I2C_DEV" value="i2cX" description="I2C port (default i2c1)"/>
|
||||
<configure name="ACTUATORS_ASCTEC_V2_I2C_SCL_TIME" value="150" description="configurable I2C timing on lpc21 boards"/>
|
||||
</doc>
|
||||
<header>
|
||||
<file name="actuators_asctec_v2_new.h" dir="subsystems/actuators"/>
|
||||
</header>
|
||||
<makefile target="!sim|nps">
|
||||
<configure name="ACTUATORS_ASCTEC_V2_I2C_DEV" default="i2c1" case="upper|lower"/>
|
||||
<configure name="ACTUATORS_ASCTEC_V2_I2C_SCL_TIME" default="150"/>
|
||||
<define name="ACTUATORS"/>
|
||||
<define name="ACTUATORS_ASCTEC_V2_I2C_DEV" value="$(ACTUATORS_ASCTEC_V2_I2C_DEV_LOWER)"/>
|
||||
<define name="USE_$(ACTUATORS_ASCTEC_V2_I2C_DEV_UPPER)"/>
|
||||
<define name="$(ACTUATORS_ASCTEC_V2_I2C_DEV_UPPER)_SCLL" value="$(ACTUATORS_ASCTEC_V2_I2C_SCL_TIME)" cond="ifeq ($(ARCH), lpc21)"/>
|
||||
<define name="$(ACTUATORS_ASCTEC_V2_I2C_DEV_UPPER)_SCLH" value="$(ACTUATORS_ASCTEC_V2_I2C_SCL_TIME)" cond="ifeq ($(ARCH), lpc21)"/>
|
||||
<file name="actuators_asctec_v2_new.c" dir="subsystems/actuators"/>
|
||||
</makefile>
|
||||
<makefile target="nps">
|
||||
<define name="USE_I2C0"/>
|
||||
<define name="ACTUATORS_ASCTEC_V2_I2C_DEV" value="i2c0"/>
|
||||
<file name="actuators_asctec_v2_new.c" dir="subsystems/actuators"/>
|
||||
</makefile>
|
||||
</module>
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="actuators_bebop" dir="actuators" task="actuators">
|
||||
<doc>
|
||||
<description>
|
||||
Actuators Driver for Bebop 1 and 2
|
||||
</description>
|
||||
<configure name="BEBOP_ACTUATORS_I2C_DEV" value="i2cX" description="I2C port (default i2c1)"/>
|
||||
</doc>
|
||||
<header>
|
||||
<file name="actuators.h" dir="boards/bebop"/>
|
||||
</header>
|
||||
<makefile target="ap">
|
||||
<configure name="BEBOP_ACTUATORS_I2C_DEV" default="i2c1" case="upper|lower"/>
|
||||
<define name="ACTUATORS"/>
|
||||
<define name="BEBOP_ACTUATORS_I2C_DEV" value="$(BEBOP_ACTUATORS_I2C_DEV_LOWER)"/>
|
||||
<define name="USE_$(BEBOP_ACTUATORS_I2C_DEV_UPPER)"/>
|
||||
<file name="actuators.c" dir="$(SRC_BOARD)"/>
|
||||
</makefile>
|
||||
</module>
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="actuators_dualpwm" dir="actuators" task="actuators">
|
||||
<doc>
|
||||
<description>
|
||||
Actuators Driver for dual PWM output
|
||||
Only with stm32
|
||||
</description>
|
||||
</doc>
|
||||
<header>
|
||||
<file name="actuators_dualpwm.h" dir="subsystems/actuators"/>
|
||||
</header>
|
||||
<makefile target="!sim|nps">
|
||||
<define name="ACTUATORS"/>
|
||||
<file_arch name="actuators_dualpwm_arch.c" dir="subsystems/actuators"/>
|
||||
<file_arch name="actuators_shared_arch.c" dir="subsystems/actuators"/>
|
||||
</makefile>
|
||||
</module>
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="actuators_dummy" dir="actuators" task="actuators">
|
||||
<doc>
|
||||
<description>
|
||||
Dummy actuators driver
|
||||
</description>
|
||||
</doc>
|
||||
<header/>
|
||||
<makefile/>
|
||||
</module>
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="actuators_esc32" dir="actuators" task="actuators">
|
||||
<doc>
|
||||
<description>
|
||||
Actuators Driver for AutoQuad ESC32 over CAN
|
||||
|
||||
Only with stm32
|
||||
required xml configuration:
|
||||
- servo section with driver="ESC32"
|
||||
- command_laws section to map motor_mixing commands to servos
|
||||
</description>
|
||||
</doc>
|
||||
<header>
|
||||
<file name="actuators_esc32.h" dir="subsystems/actuators"/>
|
||||
</header>
|
||||
<makefile target="ap">
|
||||
<define name="ACTUATORS"/>
|
||||
<define name="USE_CAN_EXT_ID"/>
|
||||
<file name="can.c" dir="mcu_periph"/>
|
||||
<file_arch name="can_arch.c" dir="mcu_periph"/>
|
||||
<file_arch name="actuators_esc32.c" dir="subsystems/actuators"/>
|
||||
</makefile>
|
||||
</module>
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="actuators_mkk" dir="actuators" task="actuators">
|
||||
<doc>
|
||||
<description>
|
||||
Actuators Driver for Mikrokopter V1 ESC
|
||||
|
||||
required xml configuration:
|
||||
- configuration section (number of motors and addresses)
|
||||
- servo section with driver="Mkk"
|
||||
- command_laws section to map motor_mixing commands to servos (max command = 255)
|
||||
</description>
|
||||
<configure name="ACTUATORS_MKK_I2C_DEV" value="i2cX" description="I2C port (default i2c1)"/>
|
||||
<configure name="ACTUATORS_MKK_I2C_SCL_TIME" value="150" description="configurable I2C timing on lpc21 boards (150 is default, use 50 for 8 motors)"/>
|
||||
<define name="I2C_TRANSACTION_QUEUE_LEN" value="8" description="I2C queue length, default is 8, increase to 10 or more for 8 motors"/>
|
||||
<section name="ACTUATORS_MKK" prefix="ACTUATORS_MKK_">
|
||||
<define name="NB" value="4" description="number of motors"/>
|
||||
<define name="ADDR" value="{ 0x52, 0x54, 0x56, 0x58 }" description="array of I2C addresses"/>
|
||||
</section>
|
||||
</doc>
|
||||
<header>
|
||||
<file name="actuators_mkk.h" dir="subsystems/actuators"/>
|
||||
</header>
|
||||
<makefile target="ap">
|
||||
<configure name="ACTUATORS_MKK_I2C_DEV" default="i2c1" case="upper|lower"/>
|
||||
<configure name="ACTUATORS_MKK_I2C_SCL_TIME" default="150"/>
|
||||
<define name="ACTUATORS"/>
|
||||
<define name="ACTUATORS_MKK_I2C_DEV" value="$(ACTUATORS_MKK_I2C_DEV_LOWER)"/>
|
||||
<define name="USE_$(ACTUATORS_MKK_I2C_DEV_UPPER)"/>
|
||||
<define name="$(ACTUATORS_MKK_I2C_DEV_UPPER)_SCLL" value="$(ACTUATORS_MKK_I2C_SCL_TIME)" cond="ifeq ($(ARCH), lpc21)"/>
|
||||
<define name="$(ACTUATORS_MKK_I2C_DEV_UPPER)_SCLH" value="$(ACTUATORS_MKK_I2C_SCL_TIME)" cond="ifeq ($(ARCH), lpc21)"/>
|
||||
<file name="actuators_mkk.c" dir="subsystems/actuators"/>
|
||||
</makefile>
|
||||
<makefile target="nps">
|
||||
<define name="USE_I2C0"/>
|
||||
<define name="ACTUATORS_MKK_I2C_DEV" value="i2c0"/>
|
||||
<file name="actuators_mkk.c" dir="subsystems/actuators"/>
|
||||
</makefile>
|
||||
</module>
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="actuators_mkk_v2" dir="actuators" task="actuators">
|
||||
<doc>
|
||||
<description>
|
||||
Actuators Driver for Mikrokopter V2 ESC
|
||||
|
||||
required xml configuration:
|
||||
- configuration section (number of motors and addresses)
|
||||
- servo section with driver="Mkk_v2"
|
||||
- command_laws section to map motor_mixing commands to servos (max command = 255)
|
||||
</description>
|
||||
<configure name="ACTUATORS_MKK_V2_I2C_DEV" value="i2cX" description="I2C port (default i2c1)"/>
|
||||
<configure name="ACTUATORS_MKK_V2_I2C_SCL_TIME" value="150" description="configurable I2C timing on lpc21 boards (150 is default, use 50 for 8 motors)"/>
|
||||
<define name="I2C_TRANSACTION_QUEUE_LEN" value="8" description="I2C queue length, default is 8, increase to 10 or more for 8 motors"/>
|
||||
<section name="ACTUATORS_MKK_V2" prefix="ACTUATORS_MKK_V2_">
|
||||
<define name="NB" value="4" description="number of motors"/>
|
||||
<define name="ADDR" value="{ 0x52, 0x54, 0x56, 0x58 }" description="array of I2C addresses"/>
|
||||
</section>
|
||||
</doc>
|
||||
<header>
|
||||
<file name="actuators_mkk.h" dir="subsystems/actuators"/>
|
||||
</header>
|
||||
<makefile target="ap">
|
||||
<configure name="ACTUATORS_MKK_V2_I2C_DEV" default="i2c1" case="upper|lower"/>
|
||||
<configure name="ACTUATORS_MKK_V2_I2C_SCL_TIME" default="150"/>
|
||||
<define name="ACTUATORS"/>
|
||||
<define name="ACTUATORS_MKK_V2_I2C_DEV" value="$(ACTUATORS_MKK_V2_I2C_DEV_LOWER)"/>
|
||||
<define name="USE_$(ACTUATORS_MKK_V2_I2C_DEV_UPPER)"/>
|
||||
<define name="$(ACTUATORS_MKK_V2_I2C_DEV_UPPER)_SCLL" value="$(ACTUATORS_MKK_V2_I2C_SCL_TIME)" cond="ifeq ($(ARCH), lpc21)"/>
|
||||
<define name="$(ACTUATORS_MKK_V2_I2C_DEV_UPPER)_SCLH" value="$(ACTUATORS_MKK_V2_I2C_SCL_TIME)" cond="ifeq ($(ARCH), lpc21)"/>
|
||||
<file name="actuators_mkk_v2.c" dir="subsystems/actuators"/>
|
||||
</makefile>
|
||||
<makefile target="nps">
|
||||
<define name="USE_I2C0"/>
|
||||
<define name="ACTUATORS_MKK_V2_I2C_DEV" value="i2c0"/>
|
||||
<file name="actuators_mkk_v2.c" dir="subsystems/actuators"/>
|
||||
</makefile>
|
||||
</module>
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="actuators_ppm" dir="actuators" task="actuators">
|
||||
<doc>
|
||||
<description>
|
||||
Actuators Driver using PPM output
|
||||
|
||||
This is used in the case where you want to directly drive a receiver which has a microcontroller
|
||||
to do the decoding and driving of the servos (not a 4015 or 4017 decoder chip).
|
||||
The PPM is output on the SERV_CLK pin. The PPM frame rate, pulse width, and number of channels
|
||||
Can be adjusted in the "servos_ppm_hw.h" file to suit your particular receiver.
|
||||
</description>
|
||||
</doc>
|
||||
<header>
|
||||
<file name="actuators_ppm.h" dir="subsystems/actuators"/>
|
||||
</header>
|
||||
<makefile>
|
||||
<define name="ACTUATORS"/>
|
||||
<define name="SERVOS_PPM_MAT"/>
|
||||
<file_arch name="actuators_ppm_hw.c" dir="subsystems/actuators"/>
|
||||
</makefile>
|
||||
</module>
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="actuators_pwm" dir="actuators" task="actuators">
|
||||
<doc>
|
||||
<description>
|
||||
Actuators Driver using direct PWM output
|
||||
</description>
|
||||
</doc>
|
||||
<header>
|
||||
<file name="actuators_pwm.h" dir="subsystems/actuators"/>
|
||||
</header>
|
||||
<makefile>
|
||||
<define name="ACTUATORS"/>
|
||||
<file_arch name="actuators_pwm_arch.c" dir="subsystems/actuators"/>
|
||||
<file_arch name="actuators_shared_arch.c" dir="subsystems/actuators" cond="ifeq ($(ARCH), stm32)"/>
|
||||
</makefile>
|
||||
</module>
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="actuators_sbus" dir="actuators" task="actuators">
|
||||
<doc>
|
||||
<description>
|
||||
Actuators Driver using Futaba SBUS
|
||||
|
||||
Use an inverter after the serial output
|
||||
</description>
|
||||
<configure name="ACTUATORS_SBUS_DEV" value="UARTX" description="UART port (default uart4)"/>
|
||||
</doc>
|
||||
<header>
|
||||
<file name="actuators_sbus.h" dir="subsystems/actuators"/>
|
||||
</header>
|
||||
<makefile>
|
||||
<configure name="ACTUATORS_SBUS_DEV" default="uart4" case="upper|lower"/>
|
||||
<define name="ACTUATORS"/>
|
||||
<define name="ACTUATORS_SBUS_DEV" value="$(ACTUATORS_SBUS_DEV_LOWER)"/>
|
||||
<define name="USE_$(ACTUATORS_SBUS_DEV_UPPER)"/>
|
||||
<define name="$(ACTUATORS_SBUS_DEV_UPPER)_BAUD" value="100000"/>
|
||||
<define name="USE_$(ACTUATORS_SBUS_DEV_UPPER)_RX" value="FALSE"/>
|
||||
<file name="actuators_sbus.c" dir="subsystems/actuators"/>
|
||||
</makefile>
|
||||
</module>
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="actuators_skiron" dir="actuators" task="actuators">
|
||||
<doc>
|
||||
<description>
|
||||
Actuators Driver for Skiron ESC
|
||||
|
||||
required xml configuration:
|
||||
- servo section with driver="Skiron"
|
||||
- command_laws section to map motor_mixing commands to servos
|
||||
</description>
|
||||
<configure name="ACTUATORS_SKIRON_I2C_DEV" value="i2cX" description="I2C port (default i2c1)"/>
|
||||
<configure name="ACTUATORS_SKIRON_I2C_SCL_TIME" value="150" description="configurable I2C timing on lpc21 boards"/>
|
||||
</doc>
|
||||
<header>
|
||||
<file name="actuators_asctec.h" dir="subsystems/actuators"/>
|
||||
</header>
|
||||
<makefile target="ap">
|
||||
<configure name="ACTUATORS_SKIRON_I2C_DEV" default="i2c1" case="upper|lower"/>
|
||||
<configure name="ACTUATORS_SKIRON_I2C_SCL_TIME" default="150"/>
|
||||
<define name="ACTUATORS"/>
|
||||
<define name="ACTUATORS_SKIRON_I2C_DEV" value="$(ACTUATORS_SKIRON_I2C_DEV_LOWER)"/>
|
||||
<define name="USE_$(ACTUATORS_SKIRON_I2C_DEV_UPPER)"/>
|
||||
<define name="$(ACTUATORS_SKIRON_I2C_DEV_UPPER)_SCLL" value="$(ACTUATORS_SKIRON_I2C_SCL_TIME)" cond="ifeq ($(ARCH), lpc21)"/>
|
||||
<define name="$(ACTUATORS_SKIRON_I2C_DEV_UPPER)_SCLH" value="$(ACTUATORS_SKIRON_I2C_SCL_TIME)" cond="ifeq ($(ARCH), lpc21)"/>
|
||||
<file name="actuators_skiron.c" dir="subsystems/actuators"/>
|
||||
</makefile>
|
||||
<makefile target="nps">
|
||||
<define name="USE_I2C0"/>
|
||||
<define name="ACTUATORS_SKIRON_I2C_DEV" value="i2c0"/>
|
||||
<file name="actuators_skiron.c" dir="subsystems/actuators"/>
|
||||
</makefile>
|
||||
</module>
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="actuators_spektrum" dir="actuators" task="actuators">
|
||||
<doc>
|
||||
<description>
|
||||
Actuators Driver with Spektrum output
|
||||
|
||||
required xml configuration:
|
||||
- servo section with driver="Spektrum"
|
||||
- command_laws section to map motor_mixing commands to servos
|
||||
</description>
|
||||
<configure name="ACTUATORS_SPEKTRUM_DEV" value="UARTX" description="UART port (default uart4)"/>
|
||||
<configure name="ACTUATORS_SPEKTRUM_DEV2" value="UARTX" description="UART port for optional secondary output"/>
|
||||
</doc>
|
||||
<header>
|
||||
<file name="actuators_spektrum.h" dir="subsystems/actuators"/>
|
||||
</header>
|
||||
<makefile>
|
||||
<configure name="ACTUATORS_SPEKTRUM_DEV" default="uart4" case="upper|lower"/>
|
||||
<configure name="ACTUATORS_SPEKTRUM_DEV2" case="upper|lower"/>
|
||||
<define name="ACTUATORS"/>
|
||||
<define name="ACTUATORS_SPEKTRUM_DEV" value="$(ACTUATORS_SPEKTRUM_DEV_LOWER)"/>
|
||||
<define name="USE_$(ACTUATORS_SPEKTRUM_DEV_UPPER)"/>
|
||||
<define name="$(ACTUATORS_SPEKTRUM_DEV_UPPER)_BAUD" value="115200"/>
|
||||
<define name="USE_$(ACTUATORS_SPEKTRUM_DEV_UPPER)_RC" value="FALSE"/>
|
||||
<define name="ACTUATORS_SPEKTRUM_DEV2" value="$(ACTUATORS_SPEKTRUM_DEV2_LOWER)" cond="ifdef ACTUATORS_SPEKTRUM_DEV2"/>
|
||||
<define name="USE_$(ACTUATORS_SPEKTRUM_DEV2_UPPER)"/>
|
||||
<define name="$(ACTUATORS_SPEKTRUM_DEV2_UPPER)_BAUD" value="115200" cond="ifdef ACTUATORS_SPEKTRUM_DEV2"/>
|
||||
<define name="USE_$(ACTUATORS_SPEKTRUM_DEV2_UPPER)_RC" value="FALSE" cond="ifdef ACTUATORS_SPEKTRUM_DEV2"/>
|
||||
<file name="actuators_spektrum.c" dir="subsystems/actuators"/>
|
||||
</makefile>
|
||||
</module>
|
||||
|
||||
@@ -113,7 +113,7 @@ let raw_xml2mk = fun f name xml ->
|
||||
let file_xml2mk = fun f ?(arch = false) dir_name target xml ->
|
||||
let name = Xml.attrib xml "name" in
|
||||
let dir_name = ExtXml.attrib_or_default xml "dir" ("$(" ^ dir_name ^ ")") in
|
||||
let cond, cond_end = try "\n"^(Xml.attrib xml "cond"), "\nendif" with Xml.No_attribute _ -> "", "" in
|
||||
let cond, cond_end = try "\n"^(Xml.attrib xml "cond")^"\n", "\nendif" with Xml.No_attribute _ -> "", "" in
|
||||
let fmt =
|
||||
if arch then format_of_string "%s%s.srcs += arch/$(ARCH)/%s/%s%s\n"
|
||||
else format_of_string "%s%s.srcs += %s/%s%s\n" in
|
||||
|
||||
Reference in New Issue
Block a user