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; |
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; |