Difference between revisions of "Module/ADC generic"
Jump to navigation
Jump to search
(created module page for adc generic) |
m |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<categorytree style="float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;" mode=pages>Modules</categorytree> | |||
If you want to receive the value of some ADC channel, you can use the "ADC Generic" [[Modules|module]]. When activated, the aircraft sends 2 values corresponding to the selected ADC channels. They can be read from the "Messages" application. | If you want to receive the value of some ADC channel, you can use the "ADC Generic" [[Modules|module]]. When activated, the aircraft sends 2 values corresponding to the selected ADC channels. They can be read from the "Messages" application. | ||
Add the adc_generic to your modules: | Add the adc_generic to your modules: | ||
< | {{Box Code|conf/airframes/myplane.xml| | ||
<source lang="xml"> | |||
<modules> | <modules> | ||
... | ... | ||
Line 9: | Line 11: | ||
</load> | </load> | ||
</modules> | </modules> | ||
</ | </source> | ||
}} | |||
In this example, the ADC channels 3 and 4 are read and sent by telemetry at 4Hz: | In this example, the ADC channels 3 and 4 are read and sent by telemetry at 4Hz: | ||
<source lang="xml"> | |||
<message name="ADC_GENERIC" ID="18"> | <message name="ADC_GENERIC" ID="18"> | ||
<field name="val1" type="uint16"/> | <field name="val1" type="uint16"/> | ||
<field name="val2" type="uint16"/> | <field name="val2" type="uint16"/> | ||
</message> | </message> | ||
</source> | |||
Only one or two channels can be defined. If only one is activated, 0 will be sent for the unused value. | Only one or two channels can be defined. If only one is activated, 0 will be sent for the unused value. | ||
[[Category:User_Documentation | [[Category:User_Documentation]] [[Category:Modules]] |
Latest revision as of 13:58, 7 March 2012
If you want to receive the value of some ADC channel, you can use the "ADC Generic" module. When activated, the aircraft sends 2 values corresponding to the selected ADC channels. They can be read from the "Messages" application. Add the adc_generic to your modules:
File: conf/airframes/myplane.xml |
<modules>
...
<load name="adc_generic.xml">
<configure name="ADC_CHANNEL_GENERIC1" value="ADC_3"/>
<configure name="ADC_CHANNEL_GENERIC2" value="ADC_4"/>
</load>
</modules>
|
In this example, the ADC channels 3 and 4 are read and sent by telemetry at 4Hz:
<message name="ADC_GENERIC" ID="18">
<field name="val1" type="uint16"/>
<field name="val2" type="uint16"/>
</message>
Only one or two channels can be defined. If only one is activated, 0 will be sent for the unused value.