Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 684 → Rev 685

/branches/V0.68d Code Redesign killagreg/analog.c
4,8 → 4,11
// + www.MikroKopter.com
// + see the File "License.txt" for further Informations
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
#include "analog.h"
#include "main.h"
#include "timer0.h"
#include "fc.h"
#include "printf_P.h"
 
volatile int16_t Current_Nick = 0, Current_Roll = 0, Current_Gier = 0;
volatile int16_t Current_AccX = 0, Current_AccY = 0, Current_AccZ = 0;
18,7 → 21,7
volatile uint16_t MessLuftdruck = 1023;
uint8_t DruckOffsetSetting;
volatile int16_t HoeheD = 0;
volatile int16_t tmpLuftdruck;
volatile int16_t tmpLuftdruck;
volatile uint16_t ZaehlMessungen = 0;
 
/*****************************************************/
115,19 → 118,19
break;
case 6:
// average over two samples to create current ADValueGier
if(PlatinenVersion == 10) AdValueGyrGier = (ADC + gier1) / 2;
if(BoardRelease == 10) AdValueGyrGier = (ADC + gier1) / 2;
else AdValueGyrGier = ADC + gier1; // gain is 2 times lower on FC 1.1
adc_channel = 1; // set next channel to ADC7 = ROLL GYRO
break;
case 7:
// average over two samples to create current ADValueRoll
if(PlatinenVersion == 10) AdValueGyrRoll = (ADC + roll1) / 2;
if(BoardRelease == 10) AdValueGyrRoll = (ADC + roll1) / 2;
else AdValueGyrRoll = ADC + roll1; // gain is 2 times lower on FC 1.1
adc_channel = 2; // set next channel to ADC2 = NICK GYRO
break;
case 8:
// average over two samples to create current ADValueNick
if(PlatinenVersion == 10) AdValueGyrNick = (ADC + nick1) / 2;
if(BoardRelease == 10) AdValueGyrNick = (ADC + nick1) / 2;
else AdValueGyrNick = ADC + nick1; // gain is 2 times lower on FC 1.1
adc_channel = 5; // set next channel to ADC5 = ACC_Z
break;