Hi Balazs,
you don't need a raw makefile section for that.
It's enough to add the defines for your additional adcs to firmware,
target ap:
<firmware name="fixedwing/rotorcraft">
<target name="ap" board="your_board">
<define name="USE_ADC_3"/>
<define name="USE_ADC_4"/>
...
</target>
...
</firmware>
Also the define ADC is obsolete and was replaced by USE_ADC a while ago
(which is already defined for fixedwing and rotorcraft firmwares where
the adc code is included by default).
Cheers, Felix
On Fri, Mar 2, 2012 at 12:47 PM, Balazs GATI <address@hidden
<mailto:address@hidden>> wrote:
Dear Felix,
I just finished the application of the redefined
ADC_CHANNEL_VSUPPLY. It works great!
For everybody, who would like to apply it: dont forget to complete
the airframe file with a raw makefile section. In case of a current
sensor (measures voltage and current) with the following line:
<makefile>
ap.CFLAGS += -DADC -DUSE_ADC_3 -DUSE_ADC_4
</makefile>
(if you are using different ADC channels, replace the numbers with
the current ones)
Balazs
2012.01.18. 23 <tel:2012.01.18.%2023>:55 keltezéssel, Felix Ruess írta:
Hi Balazs,
you can add<define name="VoltageOfAdc(adc)" value="(0.0246*adc)"/>
(with the ratio you need of course to your airframe file (e.g. BAT
section).
Then you also need to change the ADC channel that is used to
read the
voltage, e.g.<define name="ADC_CHANNEL_VSUPPLY" value="ADC_4"/>. You
have to add that to the ap firmware section, so it will be a global
define and just one in the generated airframe file.
To not get errors because ADC_CHANNEL_VSUPPLY gets redefined, pull
again from master...
Cheers, Felix
On Sun, Jan 15, 2012 at 7:52 PM,<address@hidden
<mailto:address@hidden>> wrote:
Dear Developer,
we are using a TWOG in an EasyGlider for two years, and we
are very
satisfied with it and very pleased that you make it
accessible for all the
world.
We would ask you for some support now. We changed the
airframe to a
Trainer 60 with a 6cell 5000mAh LiPo. Because of the higher
accu voltage
(22.2V) we had to apply a switching power supply to provide
power for
TWOG. We installed a Sparkfun Current Sensor to the ESC, too. We
configured successfully the ADC channels, and now we are
able to display
the actual motor current and battery voltage on the GCS with
a papget.
Unfortunately we didn't find the way, how to use the ADC
channel of
battery voltage for generating the warnings (LOW, CRITICAL,
CATASTROPHIC
BATT. LEVEL). Is there any way to do it without to change
the code
directly?
Thank you in advance
Balazs
Budapest University of Technology and Economics
Department of Aircraft and Ships
_________________________________________________
Paparazzi-devel mailing list
address@hidden <mailto:address@hidden>
https://lists.nongnu.org/__mailman/listinfo/paparazzi-__devel
<https://lists.nongnu.org/mailman/listinfo/paparazzi-devel>
_________________________________________________
Paparazzi-devel mailing list
address@hidden <mailto:address@hidden>
https://lists.nongnu.org/__mailman/listinfo/paparazzi-__devel
<https://lists.nongnu.org/mailman/listinfo/paparazzi-devel>
--
Balazs GATI, PhD
Department of Aircraft and Ships
Budapest University of Technology and Economics
Address: Budapest
Stoczek u 6. J. ép. 423
1111
Tel: +(36)-1-463-1960 <tel:%2B%2836%29-1-463-1960>
Fax: +(36)-1-463-3080 <tel:%2B%2836%29-1-463-3080>
Homepage: http://rht.bme.hu/~gatib/ <http://rht.bme.hu/%7Egatib/>
_________________________________________________
Paparazzi-devel mailing list
address@hidden <mailto:address@hidden>
https://lists.nongnu.org/__mailman/listinfo/paparazzi-__devel
<https://lists.nongnu.org/mailman/listinfo/paparazzi-devel>
_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel