mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-09 22:49:53 +08:00
[modules] convert current_sensor subsystem to module
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
# Hey Emacs, this is a -*- makefile -*-
|
||||
|
||||
# Activate current sensor
|
||||
|
||||
#
|
||||
# MilliAmpereOfAdc needs to be defined in the airframe file
|
||||
#
|
||||
|
||||
ap.CFLAGS += -DADC_CHANNEL_CURRENT=$(ADC_CURRENT_SENSOR) -DUSE_$(ADC_CURRENT_SENSOR)
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="current_sensor">
|
||||
<doc>
|
||||
<description>
|
||||
Current sensor via onboard ADC.
|
||||
</description>
|
||||
<configure name="ADC_CURRENT_SENSOR" value="ADC_0|ADC_1|ADC_2|ADC_3" description="ADC to use"/>
|
||||
</doc>
|
||||
<makefile target="ap">
|
||||
<define name="ADC_CHANNEL_CURRENT" value="$(ADC_CURRENT_SENSOR)"/>
|
||||
<define name="USE_$(ADC_CURRENT_SENSOR)"/>
|
||||
</makefile>
|
||||
</module>
|
||||
Reference in New Issue
Block a user