Rev 503 | Rev 513 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 503 | Rev 504 | ||
---|---|---|---|
Line 59... | Line 59... | ||
59 | #include <string.h> |
59 | #include <string.h> |
60 | #include "91x_lib.h" |
60 | #include "91x_lib.h" |
61 | #include "waypoints.h" |
61 | #include "waypoints.h" |
62 | #include "uart1.h" |
62 | #include "uart1.h" |
63 | #include "fat16.h" |
63 | #include "fat16.h" |
- | 64 | #include "main.h" |
|
Line 64... | Line 65... | ||
64 | 65 | ||
Line 65... | Line 66... | ||
65 | 66 | ||
Line 110... | Line 111... | ||
110 | PointList[i].AltitudeRate = 0; // no change of setpoint |
111 | PointList[i].AltitudeRate = 0; // no change of setpoint |
111 | PointList[i].Speed = 0; |
112 | PointList[i].Speed = 0; |
112 | PointList[i].CamAngle = 0; |
113 | PointList[i].CamAngle = 0; |
113 | PointList[i].Name[0] = 0; |
114 | PointList[i].Name[0] = 0; |
114 | } |
115 | } |
- | 116 | ClearWLP_Name(); |
|
115 | return TRUE; |
117 | return TRUE; |
116 | } |
118 | } |
Line 117... | Line 119... | ||
117 | 119 | ||
118 | u8 PointList_GetCount(void) |
120 | u8 PointList_GetCount(void) |
Line 403... | Line 405... | ||
403 | // dump all points if existent |
405 | // dump all points if existent |
404 | if(PointCount) |
406 | if(PointCount) |
405 | { |
407 | { |
406 | u8 i, u8_1; |
408 | u8 i, u8_1; |
407 | s32 i32_1, i32_2; |
409 | s32 i32_1, i32_2; |
408 | - | ||
- | 410 | NewWPL_Name = 1; |
|
409 | for (i = 0; i < PointCount; i++) |
411 | for (i = 0; i < PointCount; i++) |
410 | { |
412 | { |
411 | sprintf(wpline, "[Point%d]\r\n",PointList[i].Index); |
413 | sprintf(wpline, "[Point%d]\r\n",PointList[i].Index); |
412 | fputs_(wpline, fp); |
414 | fputs_(wpline, fp); |
413 | // write latitude in deg |
415 | // write latitude in deg |
Line 680... | Line 682... | ||
680 | { |
682 | { |
681 | value[len-1] = 0; |
683 | value[len-1] = 0; |
682 | len--; |
684 | len--; |
683 | } |
685 | } |
684 | if(len > 11) value[11] = 0; |
686 | if(len > 11) value[11] = 0; |
- | 687 | else for(;len < 11; len++) value[len] = ' '; |
|
685 | memcpy(pWPL_Store->Name, value, 12); |
688 | memcpy(pWPL_Store->Name, value, 12); |
- | 689 | NewWPL_Name = 1; |
|
686 | } |
690 | } |
687 | else |
691 | else |
688 | { |
692 | { |
689 | UART1_PutString("Unknown key: "); |
693 | UART1_PutString("Unknown key: "); |
690 | UART1_PutString(name); |
694 | UART1_PutString(name); |
Line 706... | Line 710... | ||
706 | retval = WPL_NO_SDCARD_FOUND; |
710 | retval = WPL_NO_SDCARD_FOUND; |
707 | } |
711 | } |
708 | return(retval); |
712 | return(retval); |
709 | } |
713 | } |
Line -... | Line 714... | ||
- | 714 | ||
- | 715 | void ClearWLP_Name(void) |
|
- | 716 | { |
|
- | 717 | unsigned char i; |
|
- | 718 | for(i=0; i<sizeof(WPL_Store.Name);i++) WPL_Store.Name[i] = 0; |
|
- | 719 | NewWPL_Name = 1; |
|
710 | 720 | } |
|
711 | // move actual point list to ref pos., the point in the list marked by index gets the RefPos afterwards |
721 | // move actual point list to ref pos., the point in the list marked by index gets the RefPos afterwards |
712 | u8 PointList_Move(u8 RefIndex, GPS_Pos_t* pRefPos, u16 RotationAngle) |
722 | u8 PointList_Move(u8 RefIndex, GPS_Pos_t* pRefPos, u16 RotationAngle) |
713 | { |
723 | { |
714 | u8 retval = 0; |
724 | u8 retval = 0; |