Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions logic/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@
#include "gps.h"
#endif

#ifdef CONFIG_OTP
#include "otp.h"
#endif



// *************************************************************************************************
// Defines section
Expand Down Expand Up @@ -442,6 +447,19 @@ const struct menu menu_L2_Gps =
};
#endif

#ifdef CONFIG_OTP
// OTP
const struct menu menu_L2_Otp =
{
FUNCTION(otp_sx), // direct function
FUNCTION(otp_switch), // sub menu function
FUNCTION(menu_skip_next), // next item function
FUNCTION(display_otp), // display function
FUNCTION(update_otp), // new display data
};
#endif


// *************************************************************************************************
// menu array

Expand Down Expand Up @@ -488,6 +506,9 @@ const struct menu *menu_L2[]={
#ifdef CONFIG_BATTERY
&menu_L2_Battery,
#endif
#ifdef CONFIG_OTP
&menu_L2_Otp,
#endif
#ifdef CONFIG_PHASE_CLOCK
&menu_L2_Phase,
#endif
Expand Down
5 changes: 5 additions & 0 deletions logic/menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ extern const struct menu menu_L2_Vario;
extern const struct menu menu_L2_Gps;
#endif

#ifdef CONFIG_USE_OTP
extern const struct menu menu_L2_Otp;
#endif


// Pointers to current menu item
extern const struct menu * ptrMenu_L1;
extern const struct menu * ptrMenu_L2;
Expand Down
Loading