Rev 267 | Rev 304 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 267 | Rev 292 | ||
---|---|---|---|
Line 329... | Line 329... | ||
329 | LCD_printfxy(0,1,"UP3:%3i UP4:%3i",Parameter.User3,Parameter.User4); |
329 | LCD_printfxy(0,1,"UP3:%3i UP4:%3i",Parameter.User3,Parameter.User4); |
330 | LCD_printfxy(0,2,"UP5:%3i UP6:%3i",Parameter.User5,Parameter.User6); |
330 | LCD_printfxy(0,2,"UP5:%3i UP6:%3i",Parameter.User5,Parameter.User6); |
331 | LCD_printfxy(0,3,"UP7:%3i UP8:%3i",Parameter.User7,Parameter.User8); |
331 | LCD_printfxy(0,3,"UP7:%3i UP8:%3i",Parameter.User7,Parameter.User8); |
332 | break; |
332 | break; |
333 | case 15: // magnetic field |
333 | case 15: // magnetic field |
334 | if(Compass_Device == COMPASS_NCMAG) |
334 | if(Compass_CalState) |
335 | { |
335 | { |
- | 336 | LCD_printfxy(0,0,"Calibration:"); |
|
- | 337 | LCD_printfxy(0,1,"Step %d/", Compass_CalState); |
|
- | 338 | LCD_printfxy(0,2,"X %4i Y %4i Z %4i",MagVector.X,MagVector.Y,MagVector.Z); |
|
- | 339 | LCD_printfxy(9,3,"(ESC)(NEXT)"); |
|
336 | if(Compass_CalState) |
340 | switch(Compass_CalState) |
337 | { |
341 | { |
338 | LCD_printfxy(0,0,"Calibration:"); |
- | |
339 | LCD_printfxy(0,1,"Step %d/", Compass_CalState); |
- | |
340 | LCD_printfxy(0,2,"X %4i Y %4i Z %4i",MagVector.X,MagVector.Y,MagVector.Z); |
- | |
341 | LCD_printfxy(9,3,"(ESC)(NEXT)"); |
- | |
342 | switch(Compass_CalState) |
- | |
343 | { |
- | |
344 | case 1: |
342 | case 1: |
345 | case 3: |
343 | case 3: |
346 | LCD_printfxy(7,1,"pause"); |
344 | LCD_printfxy(7,1,"pause"); |
347 | break; |
345 | break; |
348 | 346 | ||
349 | case 2: |
347 | case 2: |
350 | LCD_printfxy(7,1,"horizontal"); |
348 | LCD_printfxy(7,1,"horizontal"); |
351 | break; |
349 | break; |
352 | 350 | ||
353 | case 4: |
351 | case 4: |
354 | LCD_printfxy(7,1,"vertical"); |
352 | LCD_printfxy(7,1,"vertical"); |
355 | break; |
353 | break; |
356 | 354 | ||
357 | case 5: |
355 | case 5: |
358 | LCD_printfxy(7,1,"data saved"); |
356 | LCD_printfxy(7,1,"data saved"); |
359 | LCD_printfxy(8,3," (END) "); |
357 | LCD_printfxy(8,3," (END) "); |
360 | break; |
358 | break; |
361 | 359 | ||
362 | default: |
360 | default: |
363 | break; |
361 | break; |
364 | } |
- | |
365 | } |
362 | } |
366 | else |
- | |
367 | { |
- | |
368 | LCD_printfxy(0,0,"Magnetic Field"); |
- | |
369 | LCD_printfxy(0,1,"X:%5i (%4i) ",MagVector.X, MagRawVector.X); |
- | |
370 | LCD_printfxy(0,2,"Y:%5i (%4i) ",MagVector.Y, MagRawVector.Y); |
- | |
371 | LCD_printfxy(0,3,"Z:%5i (%4i) ",MagVector.Z, MagRawVector.Z); |
- | |
372 | LCD_printfxy(15,3,"(CAL)"); |
- | |
373 | } |
- | |
374 | if(Keys & KEY4) // next step |
- | |
375 | { |
- | |
376 | if(Compass_CalState <5) Compass_SetCalState(Compass_CalState+1); |
- | |
377 | else Compass_SetCalState(0); |
- | |
378 | } |
- | |
379 | if(Keys & KEY3)Compass_SetCalState(0); // cancel |
- | |
380 | } |
363 | } |
381 | else // other compass |
364 | else |
382 | { |
365 | { |
383 | Compass_UpdateMagVector(); |
- | |
384 | LCD_printfxy(0,0,"Magnetic Field"); |
366 | LCD_printfxy(0,0,"Magnetic Field"); |
385 | LCD_printfxy(0,1,"X: %4i",MagVector.X); |
367 | LCD_printfxy(0,1,"X:%5i",MagVector.X); |
386 | LCD_printfxy(0,2,"Y: %4i",MagVector.Y); |
368 | LCD_printfxy(0,2,"Y:%5i",MagVector.Y); |
387 | LCD_printfxy(0,3,"Z: %4i",MagVector.Z); |
369 | LCD_printfxy(0,3,"Z:%5i",MagVector.Z); |
- | 370 | LCD_printfxy(15,3,"(CAL)"); |
|
- | 371 | } |
|
- | 372 | if(Keys & KEY4) // next step |
|
- | 373 | { |
|
- | 374 | if(Compass_CalState <5) Compass_SetCalState(Compass_CalState+1); |
|
- | 375 | else Compass_SetCalState(0); |
|
388 | } |
376 | } |
- | 377 | if(Keys & KEY3)Compass_SetCalState(0); // cancel |
|
389 | break; |
378 | break; |
390 | default: |
379 | default: |
391 | //MaxMenuItem = MenuItem - 1; |
380 | //MaxMenuItem = MenuItem - 1; |
392 | MenuItem = 0; |
381 | MenuItem = 0; |
393 | break; |
382 | break; |