2 * This file is part of Betaflight.
4 * Betaflight is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * Betaflight is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with Betaflight. If not, see <http://www.gnu.org/licenses/>.
27 #ifdef USE_CMS_GPS_RESCUE_MENU
29 #include "cli/settings.h"
32 #include "cms/cms_types.h"
33 #include "cms/cms_menu_gps_rescue.h"
35 #include "config/feature.h"
37 #include "config/config.h"
39 #include "flight/position.h"
41 #include "pg/autopilot.h"
42 #include "pg/gps_rescue.h"
44 static const void *cms_menuGpsRescuePidOnEnter(displayPort_t
*pDisp
)
51 static const void *cms_menuGpsRescuePidOnExit(displayPort_t
*pDisp
, const OSD_Entry
*self
)
59 const OSD_Entry cms_menuGpsRescuePidEntries
[] =
61 {"--- GPS RESCUE PID---", OME_Label
, NULL
, NULL
},
63 {"BACK", OME_Back
, NULL
, NULL
},
64 {NULL
, OME_END
, NULL
, NULL
}
67 CMS_Menu cms_menuGpsRescuePid
= {
69 .GUARD_text
= "MENUGPSRPID",
70 .GUARD_type
= OME_MENU
,
72 .onEnter
= cms_menuGpsRescuePidOnEnter
,
73 .onExit
= cms_menuGpsRescuePidOnExit
,
74 .onDisplayUpdate
= NULL
,
75 .entries
= cms_menuGpsRescuePidEntries
,
78 static const void *cmsx_menuGpsRescueOnEnter(displayPort_t
*pDisp
)
85 static const void *cmsx_menuGpsRescueOnExit(displayPort_t
*pDisp
, const OSD_Entry
*self
)
93 const OSD_Entry cmsx_menuGpsRescueEntries
[] =
95 {"--- GPS RESCUE ---", OME_Label
, NULL
, NULL
},
97 {"BACK", OME_Back
, NULL
, NULL
},
98 {NULL
, OME_END
, NULL
, NULL
}
101 CMS_Menu cmsx_menuGpsRescue
= {
102 #ifdef CMS_MENU_DEBUG
103 .GUARD_text
= "MENUGPSRES",
104 .GUARD_type
= OME_MENU
,
106 .onEnter
= cmsx_menuGpsRescueOnEnter
,
107 .onExit
= cmsx_menuGpsRescueOnExit
,
108 .onDisplayUpdate
= NULL
,
109 .entries
= cmsx_menuGpsRescueEntries
,