A simple module for Viking Motorsports Engine Control Unit demonstration,
showing it usability for Formula SAE student competition. More info at https://wiki.paparazziuav.org/wiki/VMS_ECU
Example for airframe file
Add to your firmware section:
1 <module name="vms_ecu_demo"/>
Module configuration options
Airframe file section
Module functions
Init Functions
These initialization functions are called once on startup.
Periodic Functions
These functions are called periodically at the specified frequency from the module periodic loop.
- vms_ecu_demo_periodic()
- Frequency in Hz: 10.
- Autorun: LOCK
Periodic function automatically starts after init and can't be stopped.
- vms_ecu_demo_downlink()
- Frequency in Hz: 4.
- Autorun: TRUE
Periodic function automatically starts after init.
Files
Header Files
The following headers are automatically included in modules.h
Source Files
Raw vms_ecu_demo.xml file:
<!DOCTYPE module SYSTEM "module.dtd">
<module name="vms_ecu_demo" dir="fsae_electric">
<doc>
<description>
A simple module for Viking Motorsports Engine Control Unit demonstration,
showing it usability for Formula SAE student competition.
More info at https://wiki.paparazziuav.org/wiki/VMS_ECU
</description>
<section name="ECU">
<!-- optionally define parameters here -->
</section>
</doc>
<settings>
<dl_settings>
<dl_settings NAME="ECU">
<dl_setting min="0" max="1" step="1" values="FALSE|TRUE" var="ams_status" type="bool" shortname="AMS_EN" module="modules/fsae_electric/vms_ecu_demo"/>
<dl_setting min="0" max="1" step="1" values="FALSE|TRUE" var="pwr_ready" type="bool" shortname="PWR_READY" module="modules/fsae_electric/vms_ecu_demo"/>
<dl_setting min="0" max="1" step="1" values="FALSE|TRUE" var="pwr_stdby" type="bool" shortname="PWR_STDBY" module="modules/fsae_electric/vms_ecu_demo"/>
<dl_setting min="0" max="1" step="1" values="FALSE|TRUE" var="rtds" type="bool" shortname="RTDS" module="modules/fsae_electric/vms_ecu_demo"/>
<dl_setting min="0" max="4095" step="1" var="dac_1" type="uint16" shortname="DAC_1" module="modules/fsae_electric/vms_ecu_demo" handler="UpdateDac1"/>
<dl_setting min="0" max="4095" step="1" var="dac_2" type="uint16" shortname="DAC_2" module="modules/fsae_electric/vms_ecu_demo" handler="UpdateDac2"/>
</dl_settings>
</dl_settings>
</settings>
<header>
<file name="vms_ecu_demo.h"/>
</header>
<init fun="vms_ecu_demo_init()"/>
<periodic fun="vms_ecu_demo_periodic()" freq="10."/>
<periodic fun="vms_ecu_demo_downlink()" freq="4." autorun="TRUE"/>
<makefile>
<file name="vms_ecu_demo.c"/>
<define name="USE_DAC1" value="1" />
<define name="USE_DAC2" value="1" />
<define name="USE_CAN1" value="1" />
<define name="USE_CAN2" value="1" />
</makefile>
</module>