Subversion Repositories NaviCtrl

Rev

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

Rev 493 Rev 685
Line 88... Line 88...
88
u8 Compass_Device = COMPASS_NONE;
88
u8 Compass_Device = COMPASS_NONE;
89
I2C_TypeDef* Compass_I2CPort = I2C1;
89
I2C_TypeDef* Compass_I2CPort = I2C1;
Line 90... Line 90...
90
 
90
 
91
void Compass_Init(void)
91
void Compass_Init(void)
-
 
92
{
-
 
93
  if(UART_VersionInfo.HWMajor >= 30) NCMAG_Compass_use_Orientation = 1; else NCMAG_Compass_use_Orientation = 0;
92
{
94
 
93
        switch(Compass_Device)
95
        switch(Compass_Device)
94
        {
96
        {
95
                case COMPASS_NONE:
97
                case COMPASS_NONE:
-
 
98
                        UART1_PutString("\r\n Looking for compass");
-
 
99
                        if(UART_VersionInfo.HWMajor >= 20)
-
 
100
                         {
-
 
101
                          if( NCMAG_Init() )    Compass_Device = COMPASS_NCMAG;
-
 
102
                         }
-
 
103
                         else
96
                        UART1_PutString("\r\n Looking for compass");
104
                         {
97
                        if(     MK3MAG_Init() ) Compass_Device = COMPASS_MK3MAG;
105
                          if( MK3MAG_Init() ) Compass_Device = COMPASS_MK3MAG;
-
 
106
                          else if( NCMAG_Init() )       Compass_Device = COMPASS_NCMAG;
98
                        else if( NCMAG_Init() ) Compass_Device = COMPASS_NCMAG;
107
                         }
Line 99... Line 108...
99
                        break;
108
                        break;
100
 
109
 
101
                case COMPASS_NCMAG:
110
                case COMPASS_NCMAG: