Module to read wing skew angle from ADC
No detailed description...
Example for airframe file
Add to your firmware section: This example contains all possible configuration options, not all of them are mandatory!
<module name="wing_rotation_adc_sensor">
b'<configure name="ADC_CHANNEL_WING_ROTATION_CONTROLLER_POSITION" default="ADC_5" />\n '
</module>
Module configuration options
Configure Options
- name:
ADC_CHANNEL_WING_ROTATION_CONTROLLER_POSITION
value: None
Description: ADC channel connected to the wing rotation potentiometer
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.
- wing_rotation_adc_to_deg()
- Running at maximum module frequency.
- Autorun: LOCK
Periodic function automatically starts after init and can't be stopped.
Files
Header Files
The following headers are automatically included in modules.h
Source Files
Raw wing_rotation_adc_sensor.xml file:
<!DOCTYPE module SYSTEM "module.dtd">
<module name="wing_rotation_adc_sensor" dir="rotwing_drone">
<doc>
<description>Module to read wing skew angle from ADC</description>
<configure name="ADC_CHANNEL_WING_ROTATION_CONTROLLER_POSITION" default="ADC_5" description="ADC channel connected to the wing rotation potentiometer"/>
</doc>
<header>
<file name="wing_rotation_adc_sensor.h"/>
</header>
<init fun="wing_rotation_adc_init()"/>
<periodic fun="wing_rotation_adc_to_deg()"/>
<makefile>
<configure name="ADC_CHANNEL_WING_ROTATION_CONTROLLER_POSITION" default="ADC_5" case="lower|upper"/>
<define name="ADC_CHANNEL_WING_ROTATION_CONTROLLER_POSITION" value="$(ADC_CHANNEL_WING_ROTATION_CONTROLLER_POSITION_UPPER)"/>
<define name="USE_$(ADC_CHANNEL_WING_ROTATION_CONTROLLER_POSITION_UPPER)"/>
<define name="ADC_WING_ROTATION" value="TRUE"/>
<file name="wing_rotation_adc_sensor.c"/>
</makefile>
</module>