mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-02-07 03:52:47 +08:00
- old way (based on ins_vectornav) is not supported anymore - directly send sensor data and receive commands with a dedicated link - examples with USB link for better results - update sphinx documentation - compilation in a single build
30 lines
1.3 KiB
XML
30 lines
1.3 KiB
XML
<!DOCTYPE module SYSTEM "module.dtd">
|
|
|
|
<module name="dfu_command" task="datalink"><!-- task="datalink" to run before telemetry_transparent_usb -->
|
|
<doc>
|
|
<description>
|
|
THIS MODULE MUST BE PLACED ABOVE ANY USB SERIAL CONSUMERS IN THE AIRFRAME!
|
|
|
|
Read USB serial for dfu command. Send '#\n', 'bl\n' to reset to DFU mode.
|
|
The same command works with betaflight (tested with 4.1.1), allowing
|
|
paparazzi to be uploaded directly to these boards.
|
|
|
|
The dfu command is automatically sent when uploading with DFU or DFU-UTIL
|
|
(see configure below).
|
|
</description>
|
|
</doc>
|
|
<header>
|
|
<file name="dfu_command.h"/>
|
|
</header>
|
|
<event fun="dfu_command_event()"/>
|
|
<makefile target="!fbw|sim|nps">
|
|
<configure name="SERIAL_TTY" default="/dev/ttyACM0"/>
|
|
<configure name="DFU_PRE_UPLOAD_CMD" default="@(printf '\043\012' $(REDIRECT) $(SERIAL_TTY) $(AND) sleep 1 $(AND) printf 'bl\012' $(REDIRECT) $(SERIAL_TTY) $(AND) sleep 1) $(OR) echo 'Warning: DFU command failed!'"/>
|
|
<configure name="DFU_UTIL_PRE_UPLOAD_CMD" default="@(printf '\043\012' $(REDIRECT) $(SERIAL_TTY) $(AND) sleep 1 $(AND) printf 'bl\012' $(REDIRECT) $(SERIAL_TTY) $(AND) sleep 1) $(OR) echo 'Warning: DFU command failed!'"/>
|
|
<define name="USE_USB_SERIAL"/>
|
|
<file name="dfu_command.c"/>
|
|
<file_arch name="usb_ser_hw.c" dir="."/>
|
|
</makefile>
|
|
</module>
|
|
|