Files
paparazzi/conf/modules/logger_sd_spi_direct.xml
Christophe De Wagter 57756b0493 [important fixes] make test all confs (#3100)
* silent warnings make test_tudelft

* [fix] bugfix

* info instead of warning

* fix optical flow landing

* module that can not stop does not need a stop function

* missing CAMERA

* dangerous define not standard

* simulator not working at 120Hz

* When no if-statement was triggered, this is information and not a warning.

* remove doubles

* point to inexisting telemetry

* firmware settings hardcoded to need 7 actuators

* Merge double file into 1

* untested airframe

* old sim can only handle 60Hz

* non-existing telemetry

* old sim not accepting 120Hz

* Unify info messages

* only 60Hz sim

* survey no height

* Missing camera

* WP further from HOME than MAX_DIST_FROM_HOME

* No more warning when there is no heading feedback by design, only an info message

* clean releases

* no warning on free floating heading in manual controlled AC

* no double firmware block: use dual target instead

* fixedwing: PERIODIC must be multiple of TELEMETRY_FREQ

* missing camera

* error with dual heading feedback

* missing kill switch

* remove prefix

* implicit declaration of function 'scb_reset_system'

* implicit declaration of function 'spektrum_try_bind'

* no dual firmware

* shadowed variable

* wrong header

* typo in fix

* TELEMETRY_PERIOD should be a multiple of PERIODIC

* Missing struct dshot actuators_dshot_values in sim during e7781e7b87

* matek sim does not compile

* bebop misses a camera

* silent compile warnings opticflow

* silent compile warnings

* guido fixed

* double prefix

* changed confs

* new way

* setup_actuators setting up 8 actuators needs 8 actuators

* [openuas] so many comments that the compiler failed.

* [tests] make test_tudelft has 4 coonfs

* [ins_flow] depends on gps (called in initialization of  NED)

* [doc] update

* update naming convention

* an octocopter needs 8 ports please

* pprz_can_init type change

* changed conf
2023-09-25 01:12:39 +02:00

73 lines
4.8 KiB
XML

<!DOCTYPE module SYSTEM "module.dtd">
<module name="logger_sd_spi_direct" dir="loggers" task="core">
<doc>
<description>
Direct SPI SD Logger that saves pprzlog messages to SD Card.
Supported SD cards:
- SDv2 cards. Old SDv1 cards are not supported.
- Both SDSC and SDHC/SDXC are supported.
Some SD cards need to be zeroed out before use: https://askubuntu.com/a/511476
This module logs data directly to an SD Card which is connected on a SPI port.
Logging can be started/stopped by setting sdlogger_spi.do_log from the GCS
or by defining SDLOGGER_ON_ARM to TRUE.
The values to be logged are defined in the telemetry config file. An example is available in rotorcraft_with_logger.xml. The logmessage is defined as the default message in the process "Logger".
A LOGGER_LED can be enabled which indicates if the logger is writing or reading data.
Downloading of the data occurs over the configured serial device using sw/logalizer/sdlogger_download. There is no check to verify that all data is transfered. For UART it is recommended to use an FTDI cable.
</description>
<configure name="SDLOGGER_DIRECT_SPI" value="SPI1|SPI2|SPI3|SPI4|SPI5|SPI6" description="Port to which the SD Card is connected."/>
<configure name="SDLOGGER_DIRECT_SPI_SLAVE" value="SPI_SLAVE1|SPI_SLAVE2|SPI_SLAVE3|SPI_SLAVE4|SPI_SLAVE5|SPI_SLAVE6" description="Port to which the SD Card is connected."/>
<configure name="SDLOGGER_DIRECT_CONTROL_SWITCH" value="RADIO_AUX2"/>
<define name="SDLOGGER_ON_ARM" value="TRUE" description="Start/stop SD logger with motor arming"/>
<configure name="SDLOGGER_DOWNLOAD_DEVICE" value="DOWNLINK_DEVICE|uartX|usb_serial|..." description="Note: case sensitive!"/>
<configure name="LOGGER_LED" value="none"/>
</doc>
<settings>
<dl_settings NAME="sdlogger">
<dl_settings NAME="SD Logger">
<dl_setting module="loggers/sdlogger_spi_direct" var="sdlogger_spi.status" min="0" max="11" step="1" values="UnInit|Error|Init|Index|Ready|Log|FinalBlock|Stop|GetIndexUp|UpInd|GetIndDwn|Down"/>
<dl_setting module="loggers/sdlogger_spi_direct" var="sdcard1.status" min="0" max="31" step="1" values="UnInit|Error|Idle|Busy|BeforeDummyClock|SendingDummyClock|SendingCMD0|ReadingCMD0Resp|SendingCMD8|ReadingCMD8Resp|ReadingCMD8Param|SendingACMD41v2|ReadingACMD41v2Resp|SendingCMD58|ReadingCMD58Resp|ReadingCMD58Param|SendingCMD16|ReadingCMD16Resp|SendingCMD24|ReadingCMD24Resp|BeforeDataBlock|SendingDataBlock|SendingCMD17|ReadingCMD17Resp|WaitForToken|ReadingDataBlock|SendingCMD25|ReadingCMD25Resp|MWIdle|MWWriting|MWBusy|MWStopping"/>
<dl_setting module="loggers/sdlogger_spi_direct" var="sdcard1.error_status" min="0" max="15" step="1" values="None|InitNoResp|CardInfoNoResponse|CardInfoInvalid|ACMD41Timeout|ACMD41NoRes|ACMD58NoRes|CCSInval|SBNoRes|WBNoRes|SPIErr|BlockErr|RBNoRes|RBTimeout|MWNoRes|MWErr"/>
<dl_setting module="loggers/sdlogger_spi_direct" var="sdlogger_spi.command" min="1" max="42" step="1" />
<dl_setting module="loggers/sdlogger_spi_direct" var="sdlogger_spi.do_log" min="0" max="1" step="1" values="Off|On"/>
</dl_settings>
</dl_settings>
</settings>
<dep>
<depends>pprzlog,spi_master</depends>
</dep>
<header>
<file name="sdlogger_spi_direct.h"/>
</header>
<init fun="sdlogger_spi_direct_init()"/>
<periodic fun="sdlogger_spi_direct_periodic()" freq="512" start="sdlogger_spi_direct_start()" autorun="LOCK"/><!-- remove stop when autorun=LOCK stop="sdlogger_spi_direct_stop()"-->
<datalink message="SETTING" fun="sdlogger_spi_direct_command()"/>
<makefile target="ap">
<configure name="SDLOGGER_DIRECT_SPI" default="spi2" case="upper|lower"/>
<configure name="SDLOGGER_DIRECT_SPI_SLAVE" default="spi_slave2" case="upper|lower"/>
<configure name="LOGGER_LED" default="none"/>
<define name="LOGGER_LED" value="$(LOGGER_LED)" cond="ifneq ($(LOGGER_LED),none)"/>
<file name="sdcard_spi.c" dir="peripherals"/>
<file name="sdlogger_spi_direct.c"/>
<define name="USE_$(SDLOGGER_DIRECT_SPI_UPPER)" value="1" />
<define name="SDLOGGER_SPI_LINK_DEVICE" value="$(SDLOGGER_DIRECT_SPI_LOWER)" />
<define name="USE_$(SDLOGGER_DIRECT_SPI_SLAVE_UPPER)" value="1" />
<define name="SDLOGGER_SPI_LINK_SLAVE_NUMBER" value="$(SDLOGGER_DIRECT_SPI_SLAVE_UPPER)" />
<configure name="SDLOGGER_DOWNLOAD_DEVICE" default="DOWNLINK_DEVICE" case="upper"/>
<define name="SDLOGGER_DOWNLOAD_DEVICE" value="$(SDLOGGER_DOWNLOAD_DEVICE)"/>
<define name="USE_$(SDLOGGER_DOWNLOAD_DEVICE_UPPER)" cond="ifneq ($(SDLOGGER_DOWNLOAD_DEVICE_UPPER),DOWNLINK_DEVICE)"/>
<file_arch name="usb_ser_hw.c" dir="." cond="ifeq ($(SDLOGGER_DOWNLOAD_DEVICE_UPPER),USB_SERIAL)"/>
<define name="SDLOGGER_DOWNLOAD_DEVICE_LISTEN" cond="ifneq ($(SDLOGGER_DOWNLOAD_DEVICE_UPPER),DOWNLINK_DEVICE)"/>
</makefile>
</module>