Rev 454 | Rev 474 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 454 | Rev 473 | ||
---|---|---|---|
Line 105... | Line 105... | ||
105 | } |
105 | } |
106 | */ |
106 | */ |
107 | break; |
107 | break; |
Line 108... | Line 108... | ||
108 | 108 | ||
- | 109 | case COMPASS_NCMAG: |
|
109 | case COMPASS_NCMAG: |
110 | UART1_PutString("\r\n Re-Init compass"); |
110 | if( NCMAG_Init() ) Compass_Device = COMPASS_NCMAG; |
111 | if( NCMAG_Init() ) Compass_Device = COMPASS_NCMAG; |
111 | else Compass_Device = COMPASS_NONE; |
112 | else Compass_Device = COMPASS_NONE; |
Line 112... | Line 113... | ||
112 | break; |
113 | break; |
Line 169... | Line 170... | ||
169 | DebugOut.Analog[24] = MagVector.X; |
170 | DebugOut.Analog[24] = MagVector.X; |
170 | DebugOut.Analog[25] = MagVector.Y; |
171 | DebugOut.Analog[25] = MagVector.Y; |
171 | DebugOut.Analog[26] = MagVector.Z; |
172 | DebugOut.Analog[26] = MagVector.Z; |
172 | break; |
173 | break; |
173 | case COMPASS_NCMAG: |
174 | case COMPASS_NCMAG: |
- | 175 | if(check_value_counter == 2000) InitNC_MagnetSensor(); // 2 seconds noch change of the compass value |
|
174 | NCMAG_Update(); |
176 | else NCMAG_Update(); |
175 | DebugOut.Analog[24] = MagRawVector.X; |
177 | DebugOut.Analog[24] = MagRawVector.X; |
176 | DebugOut.Analog[25] = MagRawVector.Y; |
178 | DebugOut.Analog[25] = MagRawVector.Y; |
177 | DebugOut.Analog[26] = MagRawVector.Z; |
179 | DebugOut.Analog[26] = MagRawVector.Z; |
178 | default: |
180 | default: |
179 | break; |
181 | break; |