Rev 685 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 685 | Rev 743 | ||
---|---|---|---|
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; |
- | |
94 | 92 | { |
|
95 | switch(Compass_Device) |
93 | switch(Compass_Device) |
96 | { |
94 | { |
97 | case COMPASS_NONE: |
95 | case COMPASS_NONE: |
98 | UART1_PutString("\r\n Looking for compass"); |
96 | UART1_PutString("\r\n Looking for compass"); |
99 | if(UART_VersionInfo.HWMajor >= 20) |
97 | if(UART_VersionInfo.HWMajor > 20) |
100 | { |
98 | { |
101 | if( NCMAG_Init() ) Compass_Device = COMPASS_NCMAG; |
99 | if( NCMAG_Init() ) Compass_Device = COMPASS_NCMAG; |
102 | } |
100 | } |
103 | else |
101 | else |