mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-09 22:49:53 +08:00
e436d78c84
There is no longer a separated FBW in normal operation for fixedwing, only a single AP task/thread. The code for main_ap is now factorized for all firmwares. Dual MCU support (separated AP and FBW) is still possible, based on the rotorcraft implementation and intermcu pprzlink messages. Relevant code is also factorized and available in all firmwares. The recovery mode (in case of hard fault) is still available for fixedwing with ChibiOS implementation. Only intermcu_uart is supported at the moment. Other options (spi/can) might be added back in the future if really used. Some other evolution are made: - in the radio_control and actuators modules, now integrated to AP and using ABI messages - the message parsing on datalink event (defined in module) that is now properly filtering the messages based on their class and allowing to have multiple callbacks for the same message - cleaning the part of code that were using the old intermcu fixedwing interface
59 lines
2.6 KiB
XML
59 lines
2.6 KiB
XML
<!DOCTYPE module SYSTEM "module.dtd">
|
|
|
|
<module name="intermcu_uart" dir="intermcu" task="core">
|
|
<doc>
|
|
<description>
|
|
Inter-MCU communication over UART
|
|
</description>
|
|
<configure name="INTERMCU_PORT" value="UARTx" description="UART used for inter mcu communication (default: UART2 for FBW, UART5 for AP)"/>
|
|
<configure name="INTERMCU_BAUD" value="B57600" description="UART baud rate"/>
|
|
<configure name="FBW_MODE_LED" value="none|num" description="LED number or 'none'"/>
|
|
</doc>
|
|
<dep>
|
|
<depends>uart,radio_control_intermcu,datalink_common</depends>
|
|
<provides>intermcu,commands</provides>
|
|
</dep>
|
|
<header>
|
|
<file name="intermcu.h"/>
|
|
<file name="intermcu_ap.h" cond="INTERMCU_AP"/>
|
|
<file name="intermcu_fbw.h" cond="INTERMCU_FBW"/>
|
|
</header>
|
|
<init fun="intermcu_init()"/>
|
|
<periodic fun="intermcu_periodic()"/>
|
|
<periodic fun="intermcu_send_status()" freq="10." cond="INTERMCU_FBW"/>
|
|
<event fun="intermcu_event()"/>
|
|
<datalink message="IMCU_FBW_STATUS" fun="intermcu_parse_IMCU_FBW_STATUS(buf)" class="intermcu" cond="INTERMCU_AP"/>
|
|
<datalink message="IMCU_COMMANDS" fun="intermcu_parse_IMCU_COMMANDS(buf)" class="intermcu" cond="INTERMCU_FBW"/>
|
|
<datalink message="IMCU_SPEKTRUM_SOFT_BIND" fun="intermcu_parse_IMCU_SPEKTRUM_SOFT_BIND(buf)" class="intermcu" cond="INTERMCU_FBW"/>
|
|
<datalink message="*" fun="intermcu_forward_uplink(buf)" cond="INTERMCU_FBW"/>
|
|
<makefile target="ap|fbw">
|
|
<configure name="INTERMCU_PORT" default="UART3" case="upper|lower"/>
|
|
<configure name="INTERMCU_BAUD" default="B230400"/>
|
|
<define name="INTERMCU_LINK" value="$(INTERMCU_PORT_LOWER)"/>
|
|
<define name="USE_$(INTERMCU_PORT_UPPER)"/>
|
|
<define name="$(INTERMCU_PORT_UPPER)_BAUD" value="$(INTERMCU_BAUD)"/>
|
|
<define name="DOWNLINK_DEVICE" value="$(INTERMCU_LINK)" cond="ifndef MODEM_PORT"/>
|
|
<define name="DOWNLINK_TRANSPORT" value="intermcu.transport" cond="ifndef MODEM_PORT"/>
|
|
<file name="pprz_transport.c" dir="pprzlink/src"/>
|
|
</makefile>
|
|
<makefile target="fbw">
|
|
<configure name="FBW_MODE_LED" default="none"/>
|
|
<define name="FBW_MODE_LED" value="$(FBW_MODE_LED)" cond="ifneq ($(FBW_MODE_LED),none)"/>
|
|
<define name="INTERMCU_FBW"/>
|
|
<file name="intermcu_fbw.c"/>
|
|
<test firmware="fixedwing">
|
|
<define name="INTERMCU_LINK" value="uart1"/>
|
|
<define name="USE_UART1"/>
|
|
</test>
|
|
</makefile>
|
|
<makefile target="ap">
|
|
<define name="INTERMCU_AP"/>
|
|
<file name="intermcu_ap.c"/>
|
|
<test firmware="fixedwing">
|
|
<define name="INTERMCU_LINK" value="uart1"/>
|
|
<define name="USE_UART1"/>
|
|
</test>
|
|
</makefile>
|
|
</module>
|
|
|