mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-24 22:05:58 +08:00
[setup] setup_actuators for lisa/m as well
you can use the settings to just move each servo
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<!-- this is a quadrotor frame equiped with Lisa/M and MKK motor controllers -->
|
||||
|
||||
<airframe name="setup_lisam2">
|
||||
|
||||
<firmware name="setup">
|
||||
<target name="tunnel" board="lisa_m_2.0"/>
|
||||
<target name="setup_actuators" board="lisa_m_2.0"/>
|
||||
</firmware>
|
||||
|
||||
<servos min="0" neutral="0" max="0xff">
|
||||
<servo name="1" no="0" min="1000" neutral="1000" max="2000"/>
|
||||
<servo name="2" no="1" min="1000" neutral="1000" max="2000"/>
|
||||
<servo name="3" no="2" min="1000" neutral="1000" max="2000"/>
|
||||
<servo name="4" no="3" min="1000" neutral="1000" max="2000"/>
|
||||
<servo name="5" no="4" min="1000" neutral="1000" max="2000"/>
|
||||
<servo name="6" no="5" min="1000" neutral="1000" max="2000"/>
|
||||
<servo name="7" no="6" min="1000" neutral="1000" max="2000"/>
|
||||
<servo name="8" no="7" min="1000" neutral="1000" max="2000"/>
|
||||
</servos>
|
||||
|
||||
</airframe>
|
||||
+10
-1
@@ -76,7 +76,16 @@
|
||||
settings="settings/fixedwing_basic.xml settings/estimation/infrared.xml"
|
||||
gui_color="red"
|
||||
/>
|
||||
|
||||
<aircraft
|
||||
name="setup_lisam2"
|
||||
ac_id="16"
|
||||
airframe="airframes/examples/setup_lisam2.xml"
|
||||
radio="radios/cockpitSX.xml"
|
||||
telemetry="telemetry/dummy.xml"
|
||||
flight_plan="flight_plans/dummy.xml"
|
||||
settings=" settings/test_fixedwing_actuators.xml"
|
||||
gui_color="blue"
|
||||
/>
|
||||
<!-- Hardware test Lisa/L -->
|
||||
<aircraft
|
||||
name="LisaLv11_Booz2v12_RC"
|
||||
|
||||
@@ -88,6 +88,9 @@ ifeq ($(TARGET), setup_actuators)
|
||||
ifeq ($(BOARD),lisa_l)
|
||||
include $(CFG_SHARED)/actuators_direct.makefile
|
||||
endif
|
||||
ifeq ($(BOARD),lisa_m)
|
||||
include $(CFG_SHARED)/actuators_direct.makefile
|
||||
endif
|
||||
|
||||
else
|
||||
include $(CFG_SHARED)/$(ACTUATORS).makefile
|
||||
@@ -96,18 +99,32 @@ endif
|
||||
|
||||
|
||||
# a test program to setup actuators
|
||||
ifeq ($(ARCH), lpc21)
|
||||
|
||||
setup_actuators.CFLAGS += -DFBW -DUSE_LED -DPERIPHERALS_AUTO_INIT
|
||||
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
|
||||
setup_actuators.srcs += mcu.c $(SRC_ARCH)/mcu_arch.c
|
||||
|
||||
setup_actuators.CFLAGS += -DUSE_$(MODEM_PORT)
|
||||
setup_actuators.CFLAGS += -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD)
|
||||
setup_actuators.srcs += mcu_periph/uart.c $(SRC_ARCH)/mcu_periph/uart_arch.c
|
||||
|
||||
setup_actuators.CFLAGS += -DDOWNLINK -DDOWNLINK_FBW_DEVICE=$(MODEM_PORT) -DDOWNLINK_AP_DEVICE=$(MODEM_PORT) -DPPRZ_UART=$(MODEM_PORT)
|
||||
setup_actuators.CFLAGS += -DDOWNLINK_TRANSPORT=PprzTransport -DDATALINK=PPRZ
|
||||
setup_actuators.srcs += subsystems/datalink/downlink.c subsystems/datalink/pprz_transport.c
|
||||
|
||||
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)
|
||||
setup_actuators.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c
|
||||
setup_actuators.srcs += $(SRC_FIRMWARE)/setup_actuators.c firmwares/fixedwing/main.c
|
||||
|
||||
ifeq ($(ARCH), lpc21)
|
||||
setup_actuators.srcs += $(SRC_ARCH)/armVIC.c
|
||||
else ifeq ($(ARCH), stm32)
|
||||
setup_actuators.ARCHDIR = $(ARCH)
|
||||
setup_actuators.CFLAGS += -I$(ARCH)
|
||||
setup_actuators.srcs += $(SRC_ARCH)/led_hw.c
|
||||
setup_actuators.srcs += $(SRC_ARCH)/stm32_exceptions.c $(SRC_ARCH)/stm32_vector_table.c
|
||||
endif
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<!-- A conf to use for setup_actuators -->
|
||||
|
||||
<settings>
|
||||
<dl_settings>
|
||||
<dl_settings NAME="Actuators" >
|
||||
<dl_setting VAR="actuators[0]" MIN="900" STEP="1" MAX="2100" module="firmwares/fixedwing/actuators" shortname="chan0"/>
|
||||
<dl_setting VAR="actuators[1]" MIN="900" STEP="1" MAX="2100" shortname="chan1"/>
|
||||
@@ -13,4 +14,5 @@
|
||||
<dl_setting VAR="actuators[6]" MIN="900" STEP="1" MAX="2100" shortname="chan6"/>
|
||||
<dl_setting VAR="actuators[7]" MIN="900" STEP="1" MAX="2100" shortname="chan7"/>
|
||||
</dl_settings>
|
||||
</dl_settings>
|
||||
</settings>
|
||||
|
||||
@@ -1,16 +1,23 @@
|
||||
#include "generated/airframe.h"
|
||||
|
||||
#include "std.h"
|
||||
#include "mcu.h"
|
||||
#include "mcu_periph/sys_time.h"
|
||||
#include "led.h"
|
||||
#include "firmwares/fixedwing/actuators.h"
|
||||
//#include "actuators.h"
|
||||
#include "generated/airframe.h"
|
||||
|
||||
#include "firmwares/fixedwing/main_fbw.h"
|
||||
|
||||
#ifndef DOWNLINK_DEVICE
|
||||
#define DOWNLINK_DEVICE DOWNLINK_AP_DEVICE
|
||||
#endif
|
||||
|
||||
#define DATALINK_C
|
||||
#include "subsystems/datalink/datalink.h"
|
||||
#include "subsystems/datalink/pprz_transport.h"
|
||||
#include "mcu_periph/uart.h"
|
||||
#include "subsystems/datalink/downlink.h"
|
||||
#include "firmwares/fixedwing/main_fbw.h"
|
||||
|
||||
#include "generated/settings.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user