Subversion Repositories FlightCtrl

Rev

Rev 1964 | Rev 1967 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1964 Rev 1965
Line 1... Line 1...
1
#ifndef _ANALOG_H
1
#ifndef _ANALOG_H
2
#define _ANALOG_H
2
#define _ANALOG_H
3
#include <inttypes.h>
3
#include <inttypes.h>
4
 
-
 
5
//#include "invenSense.h"
4
#include "configuration.h"
6
//#include "ENC-03_FC1.3.h"
-
 
7
//#include "ADXRS610_FC2.0.h"
-
 
Line 8... Line 5...
8
 
5
 
9
/*
6
/*
10
 * How much low pass filtering to apply for gyro_PID.
7
 * How much low pass filtering to apply for gyro_PID.
11
 * 0=illegal, 1=no filtering, 2=50% last value + 50% new value, 3=67% last value + 33 % new value etc...
8
 * 0=illegal, 1=no filtering, 2=50% last value + 50% new value, 3=67% last value + 33 % new value etc...
Line 186... Line 183...
186
extern volatile int16_t UBat;
183
extern volatile int16_t UBat;
Line 187... Line 184...
187
 
184
 
188
// 1:11 voltage divider, 1024 counts per 3V, and result is divided by 3.
185
// 1:11 voltage divider, 1024 counts per 3V, and result is divided by 3.
Line 189... Line -...
189
#define UBAT_AT_5V (int16_t)((5.0 * (1.0/11.0)) * 1024 / (3.0 * 3))
-
 
190
 
-
 
191
typedef struct {
186
#define UBAT_AT_5V (int16_t)((5.0 * (1.0/11.0)) * 1024 / (3.0 * 3))
192
  int16_t offsets[3];
-
 
193
} sensorOffset_t;
187
 
194
 
188
extern volatile sensorOffset_t gyroOffset;
Line 195... Line 189...
195
extern sensorOffset_t gyroOffset;
189
extern volatile sensorOffset_t accOffset;
196
extern sensorOffset_t accOffset;
190
extern volatile sensorOffset_t DACValues;
197
 
191
 
198
/*
192
/*