Rev 330 | Rev 345 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 330 | Rev 338 | ||
---|---|---|---|
Line 70... | Line 70... | ||
70 | u8 DispPtr = 0; |
70 | u8 DispPtr = 0; |
71 | s8 DisplayBuff[DISPLAYBUFFSIZE]; |
71 | s8 DisplayBuff[DISPLAYBUFFSIZE]; |
Line 72... | Line 72... | ||
72 | 72 | ||
73 | 73 | ||
74 | u8 MenuItem = 0; |
- | |
75 | u8 MaxMenuItem = 16; |
- | |
Line 76... | Line 74... | ||
76 | 74 | u8 MenuItem = 0; |
|
77 | 75 | u8 MaxMenuItem = 17; |
|
78 | 76 | ||
79 | void Menu_Putchar(char c) |
77 | void Menu_Putchar(char c) |
Line 400... | Line 398... | ||
400 | LCD_printfxy(0,0,"Magnetic Field"); |
398 | LCD_printfxy(0,0,"Magnetic Field"); |
401 | LCD_printfxy(0,1,"X:%5i",MagVector.X); |
399 | LCD_printfxy(0,1,"X:%5i",MagVector.X); |
402 | LCD_printfxy(0,2,"Y:%5i",MagVector.Y); |
400 | LCD_printfxy(0,2,"Y:%5i",MagVector.Y); |
403 | LCD_printfxy(0,3,"Z:%5i",MagVector.Z); |
401 | LCD_printfxy(0,3,"Z:%5i",MagVector.Z); |
404 | LCD_printfxy(8,1,"Field:%3i",EarthMagneticField/5); |
402 | LCD_printfxy(8,1,"Field:%3i",EarthMagneticField/5); |
405 | LCD_printfxy(8,2,"Dec:%c%i.%1i", sign, abs(GeoMagDec)/10,abs(GeoMagDec)%10); |
403 | // LCD_printfxy(8,2,"Dec:%c%i.%1i", sign, abs(GeoMagDec)/10,abs(GeoMagDec)%10); |
406 | LCD_printfxy(8,3,"Inc:%2i", EarthMagneticInclination); |
404 | // LCD_printfxy(8,3,"Inc:%2i", EarthMagneticInclination); |
407 | LCD_printfxy(15,3,"(CAL)"); |
405 | LCD_printfxy(15,3,"(CAL)"); |
408 | } |
406 | } |
409 | if(Keys & KEY4) // next step |
407 | if(Keys & KEY4) // next step |
410 | { |
408 | { |
411 | if(Compass_CalState <5) Compass_SetCalState(Compass_CalState+1); |
409 | if(Compass_CalState <5) Compass_SetCalState(Compass_CalState+1); |
412 | else Compass_SetCalState(0); |
410 | else Compass_SetCalState(0); |
413 | } |
411 | } |
414 | if(Keys & KEY3)Compass_SetCalState(0); // cancel |
412 | if(Keys & KEY3)Compass_SetCalState(0); // cancel |
415 | break; |
413 | break; |
- | 414 | case 17: |
|
- | 415 | LCD_printfxy(0,0,"Magnetic Field"); |
|
- | 416 | LCD_printfxy(0,1,"Field:%3i (Percent)",EarthMagneticField/5); |
|
- | 417 | LCD_printfxy(0,2,"Declination:%c%i.%1i ", sign, abs(GeoMagDec)/10,abs(GeoMagDec)%10); |
|
- | 418 | LCD_printfxy(0,3,"Inclination:%2i (%2i)", EarthMagneticInclination, EarthMagneticInclinationTheoretic); |
|
- | 419 | break; |
|
416 | default: |
420 | default: |
417 | //MaxMenuItem = MenuItem - 1; |
421 | //MaxMenuItem = MenuItem - 1; |
418 | MenuItem = 0; |
422 | MenuItem = 0; |
419 | break; |
423 | break; |
420 | } |
424 | } |