Rev 515 | Rev 517 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 515 | Rev 516 | ||
---|---|---|---|
Line 737... | Line 737... | ||
737 | } |
737 | } |
738 | return PointList_Save(filename, pWPL_Store->Name, pWPL_Store->OverwriteFile); |
738 | return PointList_Save(filename, pWPL_Store->Name, pWPL_Store->OverwriteFile); |
739 | } |
739 | } |
Line 740... | Line 740... | ||
740 | 740 | ||
741 | 741 | ||
742 | // save actual gps position and heading to file |
742 | // save actual gps positiin and heading to file |
743 | u8 PointList_SaveSinglePoint(WPL_Store_t * pWPL_Store) |
743 | u8 PointList_SaveSinglePoint(WPL_Store_t * pWPL_Store) |
744 | { |
744 | { |
745 | u8 retval = WPL_ERROR; |
745 | u8 retval = WPL_ERROR; |
Line 763... | Line 763... | ||
763 | WP.ToleranceRadius = 15; |
763 | WP.ToleranceRadius = 15; |
764 | WP.HoldTime = 5; |
764 | WP.HoldTime = 5; |
765 | WP.Index = 1; |
765 | WP.Index = 1; |
766 | WP.Type = POINT_TYPE_WP; |
766 | WP.Type = POINT_TYPE_WP; |
767 | WP.WP_EventChannelValue = 0; |
767 | WP.WP_EventChannelValue = 0; |
768 | if(FC.StatusFlags & FC_STATUS_FLY && (NaviData.Altimeter) > 8 * 20) |
768 | if(FC.StatusFlags & FC_STATUS_FLY) |
769 | { |
769 | { |
770 | WP.AltitudeRate = 30; |
770 | WP.AltitudeRate = 15; |
771 | WP.Position.Altitude = NaviData.Altimeter / 2; |
771 | WP.Position.Altitude = NaviData.Altimeter / 2; |
772 | } |
772 | } |
773 | else |
773 | else |
774 | { |
774 | { |
775 | WP.AltitudeRate = 0; |
775 | WP.AltitudeRate = 0; |
Line 789... | Line 789... | ||
789 | 789 | ||
790 | // clear current point list |
790 | // clear current point list |
791 | PointList_Clear(); |
791 | PointList_Clear(); |
792 | return(retval); |
792 | return(retval); |
793 | } |
- | |
794 | 793 | } |
|
795 | // load target gps posititon and heading from file |
794 | // load target gps posititon and heading from file |
796 | u8 PointList_LoadSinglePoint(WPL_Store_t * pWPL_Store) |
795 | u8 PointList_LoadSinglePoint(WPL_Store_t * pWPL_Store) |
797 | { |
796 | { |
Line 801... | Line 800... | ||
801 | pWPL_Store->Name[0] = 0; // clear current list name |
800 | pWPL_Store->Name[0] = 0; // clear current list name |
802 | return PointList_Load(filename, pWPL_Store->Name, sizeof(pWPL_Store->Name)); |
801 | return PointList_Load(filename, pWPL_Store->Name, sizeof(pWPL_Store->Name)); |
803 | } |
802 | } |
Line -... | Line 803... | ||
- | 803 | ||
804 | 804 | ||
805 | 805 | ||
806 | void ClearWLP_Name(void) |
806 | void ClearWLP_Name(void) |
807 | { |
807 | { |
808 | u8 i; |
808 | u8 i; |