Prof Greg Egan
/
UAVXArm-GKE
UAVX Multicopter Flight Controller.
Diff: analog.c
- Revision:
- 2:90292f8bd179
- Parent:
- 1:1e3318a30ddd
--- a/analog.c Fri Feb 25 01:35:24 2011 +0000 +++ b/analog.c Tue Apr 26 12:12:29 2011 +0000 @@ -2,7 +2,7 @@ // = UAVXArm Quadrocopter Controller = // = Copyright (c) 2008 by Prof. Greg Egan = // = Original V3.15 Copyright (c) 2007 Ing. Wolfgang Mahringer = -// = http://code.google.com/p/uavp-mods/ http://uavp.ch = +// = http://code.google.com/p/uavp-mods/ = // =============================================================================================== // This is part of UAVXArm. @@ -35,7 +35,7 @@ static uint32 data; // Select channel and start conversion - LPC_ADC->ADCR &= ~0xFF; + LPC_ADC->ADCR &= ~0xff; LPC_ADC->ADCR |= 1 << 5; // ADC0[5] LPC_ADC->ADCR |= 1 << 24; @@ -51,7 +51,7 @@ void InitDirectAnalog(void) { -// power on, clk divider /4 + // power on, clk divider /4 LPC_SC->PCONP |= (1 << 12); LPC_SC->PCLKSEL0 &= ~(0x3 << 24); @@ -77,7 +77,6 @@ static real32 r; -DebugPin = 1; switch (p) { case ADCPitch: r = PitchADC.read(); @@ -98,8 +97,6 @@ r = BatteryVoltsADC.read(); break; } - - DebugPin = 0; return ( r );