Rev 340 | Rev 351 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 340 | Rev 342 | ||
---|---|---|---|
Line 76... | Line 76... | ||
76 | s32 EarthMagneticFieldFiltered = 100; |
76 | s32 EarthMagneticFieldFiltered = 100; |
77 | s32 EarthMagneticInclination = 0; |
77 | s32 EarthMagneticInclination = 0; |
78 | s32 EarthMagneticInclinationFiltered = 0; |
78 | s32 EarthMagneticInclinationFiltered = 0; |
79 | s32 EarthMagneticInclinationTheoretic = 0; |
79 | s32 EarthMagneticInclinationTheoretic = 0; |
80 | u8 ErrorDisturbedEarthMagnetField = 0; |
80 | u8 ErrorDisturbedEarthMagnetField = 0; |
- | 81 | s16 EarthMagneticStrengthTheoretic = 0; // in mT (50 in Germany - 22 in Brazil) |
|
Line 81... | Line 82... | ||
81 | 82 | ||
82 | #define COMPASS_NONE 0 |
83 | #define COMPASS_NONE 0 |
83 | #define COMPASS_MK3MAG 1 |
84 | #define COMPASS_MK3MAG 1 |
84 | #define COMPASS_NCMAG 2 |
85 | #define COMPASS_NCMAG 2 |
Line 88... | Line 89... | ||
88 | { |
89 | { |
89 | switch(Compass_Device) |
90 | switch(Compass_Device) |
90 | { |
91 | { |
91 | case COMPASS_NONE: |
92 | case COMPASS_NONE: |
92 | UART1_PutString("\r\n Looking for compass"); |
93 | UART1_PutString("\r\n Looking for compass"); |
- | 94 | if( MK3MAG_Init() ) Compass_Device = COMPASS_MK3MAG; |
|
- | 95 | else if( NCMAG_Init() ) Compass_Device = COMPASS_NCMAG; |
|
- | 96 | ||
93 | if(Version_HW > 11) |
97 | /* if(Version_HW > 11) |
94 | { |
98 | { |
95 | if( NCMAG_Init() ) Compass_Device = COMPASS_NCMAG; |
99 | if( NCMAG_Init() ) Compass_Device = COMPASS_NCMAG; |
96 | else if( MK3MAG_Init()) Compass_Device = COMPASS_MK3MAG; |
100 | else if( MK3MAG_Init()) Compass_Device = COMPASS_MK3MAG; |
97 | } |
101 | } |
98 | else |
102 | else |
99 | { |
103 | { |
100 | if( MK3MAG_Init() ) Compass_Device = COMPASS_MK3MAG; |
104 | if( MK3MAG_Init() ) Compass_Device = COMPASS_MK3MAG; |
101 | else if( NCMAG_Init() ) Compass_Device = COMPASS_NCMAG; |
105 | else if( NCMAG_Init() ) Compass_Device = COMPASS_NCMAG; |
102 | } |
106 | } |
- | 107 | */ |
|
103 | break; |
108 | break; |
Line 104... | Line 109... | ||
104 | 109 | ||
105 | case COMPASS_NCMAG: |
110 | case COMPASS_NCMAG: |
106 | if( NCMAG_Init() ) Compass_Device = COMPASS_NCMAG; |
111 | if( NCMAG_Init() ) Compass_Device = COMPASS_NCMAG; |