Subversion Repositories FlightCtrl

Rev

Rev 1968 | Rev 2033 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1968 Rev 1969
Line 6... Line 6...
6
#include "analog.h"
6
#include "analog.h"
Line 7... Line 7...
7
 
7
 
8
#define EEPROM_ADR_PARAM_BEGIN  0
8
#define EEPROM_ADR_PARAM_BEGIN  0
Line 9... Line 9...
9
#define EEPROM_CHECKSUMMED_BLOCK_OVERHEAD 3
9
#define EEPROM_CHECKSUMMED_BLOCK_OVERHEAD 3
10
 
10
 
11
#define PID_ACTIVE_SET          0   // byte
11
#define PID_ACTIVE_SET                  0   // byte
12
#define EEPROM_ADR_ACCOFFSET    1
12
//#define EEPROM_ADR_ACCOFFSET          1
13
#define EEPROM_ADR_GYROOFFSET   (EEPROM_ADR_ACCOFFSET+sizeof(sensorOffset_t)+EEPROM_CHECKSUMMED_BLOCK_OVERHEAD)
13
//#define EEPROM_ADR_GYROOFFSET         (EEPROM_ADR_ACCOFFSET+sizeof(sensorOffset_t)+EEPROM_CHECKSUMMED_BLOCK_OVERHEAD)
14
#define EEPROM_ADR_GYROAMPLIFIER  (EEPROM_ADR_GYROOFFSET+sizeof(sensorOffset_t)+EEPROM_CHECKSUMMED_BLOCK_OVERHEAD)
14
//#define EEPROM_ADR_GYROAMPLIFIER      (EEPROM_ADR_GYROOFFSET+sizeof(sensorOffset_t)+EEPROM_CHECKSUMMED_BLOCK_OVERHEAD)
15
#define EEPROM_ADR_CHANNELMAP     (EEPROM_ADR_GYROAMPLIFIER+sizeof(sensorOffset_t)+EEPROM_CHECKSUMMED_BLOCK_OVERHEAD)
15
//#define EEPROM_ADR_CHANNELMAP             (EEPROM_ADR_GYROAMPLIFIER+sizeof(sensorOffset_t)+EEPROM_CHECKSUMMED_BLOCK_OVERHEAD)
16
#define EEPROM_ADR_MIXER_TABLE    (EEPROM_ADR_CHANNELMAP+sizeof(channelMap_t)+EEPROM_CHECKSUMMED_BLOCK_OVERHEAD)
16
//#define EEPROM_ADR_MIXER_TABLE                (EEPROM_ADR_CHANNELMAP+sizeof(channelMap_t)+EEPROM_CHECKSUMMED_BLOCK_OVERHEAD)
17
#define EEPROM_ADR_PARAMSET_BEGIN (EEPROM_ADR_MIXER_TABLE+sizeof(mixerMatrix_t)+EEPROM_CHECKSUMMED_BLOCK_OVERHEAD)
17
//#define EEPROM_ADR_PARAMSET_BEGIN     (EEPROM_ADR_MIXER_TABLE+sizeof(mixerMatrix_t)+EEPROM_CHECKSUMMED_BLOCK_OVERHEAD)
18
 
18
 
19
//#define EEPROM_ADR_ACCOFFSET    10
19
#define EEPROM_ADR_ACCOFFSET            16
20
//#define EEPROM_ADR_GYROOFFSET   20
20
#define EEPROM_ADR_GYROOFFSET           32
21
//#define EEPROM_ADR_GYROAMPLIFIER  30
21
#define EEPROM_ADR_GYROAMPLIFIER    48
22
//#define EEPROM_ADR_CHANNELMAP   40
22
#define EEPROM_ADR_CHANNELMAP           64
Line 23... Line 23...
23
//#define EEPROM_ADR_MIXER_TABLE          60
23
#define EEPROM_ADR_MIXER_TABLE          128
24
//#define EEPROM_ADR_PARAMSET_BEGIN 200
24
#define EEPROM_ADR_PARAMSET_BEGIN   256
25
 
25
 
26
#define CHANNELMAP_REVISION         0
26
#define CHANNELMAP_REVISION         0
Line 27... Line 27...
27
#define EEPARAM_REVISION            0
27
#define EEPARAM_REVISION                0
28
#define EEMIXER_REVISION            0
28
#define EEMIXER_REVISION                0
29
#define SENSOROFFSET_REVISION       0
29
#define SENSOROFFSET_REVISION       0
Line 30... Line 30...
30
 
30
 
31
void paramSet_readOrDefault(void);
31
void paramSet_readOrDefault(void);
Line 32... Line 32...
32
void channelMap_readOrDefault(void);
32
void channelMap_readOrDefault(void);
33
void mixerMatrix_readOrDefault(void);
33
void mixerMatrix_readOrDefault(void);
Line 34... Line 34...
34
 
34
 
35
uint8_t paramSet_readFromEEProm(uint8_t setnumber);
35
uint8_t paramSet_readFromEEProm(uint8_t setnumber);
Line 36... Line 36...
36
void paramSet_writeToEEProm(uint8_t setnumber);
36
void paramSet_writeToEEProm(uint8_t setnumber);
37
 
37