/trunk/compass.c |
---|
90,12 → 90,21 |
void Compass_Init(void) |
{ |
if(UART_VersionInfo.HWMajor >= 30) NCMAG_Compass_use_Orientation = 1; else NCMAG_Compass_use_Orientation = 0; |
switch(Compass_Device) |
{ |
case COMPASS_NONE: |
UART1_PutString("\r\n Looking for compass"); |
if(UART_VersionInfo.HWMajor >= 20) |
{ |
if( NCMAG_Init() ) Compass_Device = COMPASS_NCMAG; |
} |
else |
{ |
if( MK3MAG_Init() ) Compass_Device = COMPASS_MK3MAG; |
else if( NCMAG_Init() ) Compass_Device = COMPASS_NCMAG; |
} |
break; |
case COMPASS_NCMAG: |