Rev 470 | Rev 473 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 470 | Rev 472 | ||
---|---|---|---|
Line 61... | Line 61... | ||
61 | #include "91x_lib.h" |
61 | #include "91x_lib.h" |
62 | #include "main.h" |
62 | #include "main.h" |
63 | #include "config.h" |
63 | #include "config.h" |
64 | #include "menu.h" |
64 | #include "menu.h" |
65 | #include "GPS.h" |
65 | #include "GPS.h" |
- | 66 | #include "i2c0.h" |
|
66 | #include "i2c1.h" |
67 | #include "i2c1.h" |
67 | #include "uart0.h" |
68 | #include "uart0.h" |
68 | #include "uart1.h" |
69 | #include "uart1.h" |
69 | #include "uart2.h" |
70 | #include "uart2.h" |
70 | #include "timer1.h" |
71 | #include "timer1.h" |
Line 699... | Line 700... | ||
699 | } |
700 | } |
700 | // +++++++++++++++++++++++++++++++++++++++++++ |
701 | // +++++++++++++++++++++++++++++++++++++++++++ |
701 | if(GPSData.Flags & FLAG_GPSFIXOK) |
702 | if(GPSData.Flags & FLAG_GPSFIXOK) |
702 | { |
703 | { |
703 | tmp1 = abs(GPSData.Position.Latitude)/10000000L; |
704 | tmp1 = abs(GPSData.Position.Latitude)/10000000L; |
704 | i += sprintf(&array[i],"%02d",tmp1); |
705 | i += sprintf(&array[i],"%02d",(int)tmp1); |
Line 705... | Line 706... | ||
705 | 706 | ||
706 | tmp1 = abs(GPSData.Position.Latitude)%10000000L; |
707 | tmp1 = abs(GPSData.Position.Latitude)%10000000L; |
707 | tmp1 *= 6; // in Minuten |
708 | tmp1 *= 6; // in Minuten |
708 | tmp2 = tmp1 / 1000000L; |
709 | tmp2 = tmp1 / 1000000L; |
709 | i += sprintf(&array[i],"%02d",tmp2); |
710 | i += sprintf(&array[i],"%02d",(int)tmp2); |
710 | tmp2 = tmp1 % 1000000L; |
711 | tmp2 = tmp1 % 1000000L; |
711 | tmp2 /= 10; // eine Stelle zu viel |
712 | tmp2 /= 10; // eine Stelle zu viel |
Line 712... | Line 713... | ||
712 | i += sprintf(&array[i],".%05d,",tmp2); |
713 | i += sprintf(&array[i],".%05d,",(int)tmp2); |
713 | 714 | ||
714 | if(GPSData.Position.Latitude >= 0) i += sprintf(&array[i],"N,"); |
715 | if(GPSData.Position.Latitude >= 0) i += sprintf(&array[i],"N,"); |
Line 715... | Line 716... | ||
715 | else i += sprintf(&array[i],"S,"); |
716 | else i += sprintf(&array[i],"S,"); |
716 | // +++++++++++++++++++++++++++++++++++++++++++ |
717 | // +++++++++++++++++++++++++++++++++++++++++++ |
Line 717... | Line 718... | ||
717 | 718 | ||
718 | tmp1 = abs(GPSData.Position.Longitude)/10000000L; |
719 | tmp1 = abs(GPSData.Position.Longitude)/10000000L; |
719 | i += sprintf(&array[i],"%03d",tmp1); |
720 | i += sprintf(&array[i],"%03d",(int)tmp1); |
720 | 721 | ||
721 | tmp1 = abs(GPSData.Position.Longitude)%10000000L; |
722 | tmp1 = abs(GPSData.Position.Longitude)%10000000L; |
722 | tmp1 *= 6; // in Minuten |
723 | tmp1 *= 6; // in Minuten |
723 | tmp2 = tmp1 / 1000000L; |
724 | tmp2 = tmp1 / 1000000L; |
Line 724... | Line 725... | ||
724 | i += sprintf(&array[i],"%02d",tmp2); |
725 | i += sprintf(&array[i],"%02d",(int)tmp2); |
725 | tmp2 = tmp1 % 1000000L; |
726 | tmp2 = tmp1 % 1000000L; |
726 | tmp2 /= 10; // eine Stelle zu viel |
727 | tmp2 /= 10; // eine Stelle zu viel |