Rev 234 | Rev 242 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 234 | Rev 241 | ||
---|---|---|---|
Line 58... | Line 58... | ||
58 | #include "91x_lib.h" |
58 | #include "91x_lib.h" |
59 | #include "main.h" |
59 | #include "main.h" |
60 | #include "ubx.h" |
60 | #include "ubx.h" |
61 | #include "GPS.h" |
61 | #include "GPS.h" |
62 | #include "timer1.h" |
62 | #include "timer1.h" |
63 | #include "i2c.h" |
63 | #include "mk3mag.h" |
64 | #include "spi_slave.h" |
64 | #include "spi_slave.h" |
65 | #include "menu.h" |
65 | #include "menu.h" |
66 | #include "uart1.h" |
66 | #include "uart1.h" |
Line 67... | Line 67... | ||
67 | 67 | ||
Line 312... | Line 312... | ||
312 | LCD_printfxy(0,2,"GyroYaw: %4i", FromFlightCtrl.GyroYaw); |
312 | LCD_printfxy(0,2,"GyroYaw: %4i", FromFlightCtrl.GyroYaw); |
313 | break; |
313 | break; |
314 | case 13: // Remote Control Level from FC |
314 | case 13: // Remote Control Level from FC |
315 | LCD_printfxy(0,0,"RC-Level: %3i", FC.RC_Quality); |
315 | LCD_printfxy(0,0,"RC-Level: %3i", FC.RC_Quality); |
316 | LCD_printfxy(0,1,"Ubat: %2i.%1i V", FC.BAT_Voltage/10, FC.BAT_Voltage%10); |
316 | LCD_printfxy(0,1,"Ubat: %2i.%1i V", FC.BAT_Voltage/10, FC.BAT_Voltage%10); |
317 | LCD_printfxy(0,2,"CompHeading: %3i", I2C_Heading.Heading); |
317 | LCD_printfxy(0,2,"CompHeading: %3i", MK3MAG_Heading.Heading); |
318 | if(GeoMagDec < 0) sign = '-'; |
318 | if(GeoMagDec < 0) sign = '-'; |
319 | else sign = '+'; |
319 | else sign = '+'; |
320 | LCD_printfxy(0,3,"GeoMagDec: %c%i.%1i", sign, abs(GeoMagDec)/10,abs(GeoMagDec)%10); |
320 | LCD_printfxy(0,3,"GeoMagDec: %c%i.%1i", sign, abs(GeoMagDec)/10,abs(GeoMagDec)%10); |
321 | break; |
321 | break; |
322 | case 14: // User Parameter |
322 | case 14: // User Parameter |
Line 324... | Line 324... | ||
324 | LCD_printfxy(0,1,"UP3:%3i UP4:%3i",Parameter.User3,Parameter.User4); |
324 | LCD_printfxy(0,1,"UP3:%3i UP4:%3i",Parameter.User3,Parameter.User4); |
325 | LCD_printfxy(0,2,"UP5:%3i UP6:%3i",Parameter.User5,Parameter.User6); |
325 | LCD_printfxy(0,2,"UP5:%3i UP6:%3i",Parameter.User5,Parameter.User6); |
326 | LCD_printfxy(0,3,"UP7:%3i UP8:%3i",Parameter.User7,Parameter.User8); |
326 | LCD_printfxy(0,3,"UP7:%3i UP8:%3i",Parameter.User7,Parameter.User8); |
327 | break; |
327 | break; |
328 | case 15: // MK3MAG |
328 | case 15: // MK3MAG |
329 | I2C1_SendCommand(I2C_CMD_READ_MAG); |
329 | MK3MAG_SendCommand(MK3MAG_CMD_READ_MAGVECT); |
330 | LCD_printfxy(0,0,"MK3MAG V%i.%i%c",MK3MAG_Version.Major, MK3MAG_Version.Minor, 'a'+ MK3MAG_Version.Patch); |
330 | LCD_printfxy(0,0,"MK3MAG V%i.%i%c",MK3MAG_Version.Major, MK3MAG_Version.Minor, 'a'+ MK3MAG_Version.Patch); |
331 | LCD_printfxy(0,1,"MagX: %4i ",I2C_Mag.MagX); |
331 | LCD_printfxy(0,1,"MagX: %4i ",MK3MAG_MagVector.X); |
332 | LCD_printfxy(0,2,"MagY: %4i ",I2C_Mag.MagY); |
332 | LCD_printfxy(0,2,"MagY: %4i ",MK3MAG_MagVector.Y); |
333 | LCD_printfxy(0,3,"MagZ: %4i ",I2C_Mag.MagZ); |
333 | LCD_printfxy(0,3,"MagZ: %4i ",MK3MAG_MagVector.Z); |
334 | break; |
334 | break; |
335 | default: |
335 | default: |
336 | //MaxMenuItem = MenuItem - 1; |
336 | //MaxMenuItem = MenuItem - 1; |
337 | MenuItem = 0; |
337 | MenuItem = 0; |
338 | break; |
338 | break; |