Prof Greg Egan
/
UAVXArm-GKE
UAVX Multicopter Flight Controller.
Diff: ir.c
- Revision:
- 1:1e3318a30ddd
- Parent:
- 0:62a1c91a859a
- Child:
- 2:90292f8bd179
--- a/ir.c Fri Feb 18 22:28:05 2011 +0000 +++ b/ir.c Fri Feb 25 01:35:24 2011 +0000 @@ -49,9 +49,9 @@ if ( GyroType == IRSensors ) { - IR[Pitch] = -PitchADC.read() * 2.0 - IR_NEUTRAL; - IR[Roll] = RollADC.read() * 2.0 - IR_NEUTRAL; - IR[Yaw] = YawADC.read() * 2.0 - IR_NEUTRAL; + IR[Pitch] = -ADC(ADCPitch) * 2.0 - IR_NEUTRAL; + IR[Roll] = ADC(ADCRoll) * 2.0 - IR_NEUTRAL; + IR[Yaw] = ADC(YawADC) * 2.0 - IR_NEUTRAL; for ( i = 0; i < (uint8)3; i++ ) TrackIRMaxMin(IR[i]);