Menu Editor
Menu Editor Overview
This is the menu editor module is the aplication module which will edit the menu contents provided by the user.
In application text menu, the menu list and variables are declared.
The main buffer structure variable and the internal data buffer both should be declared on the application side and the pointers of the variables are used in the module.
Usage
The API functions have the first argument as the strucure instance and next followed by config structure.
Menu config and variables are initialized with module open function.
The module has an edit mode to modify the menu contents and a view mode to display the menu data.
Return codes of API functions are defined in header file.
Application Interface
Function |
Description |
|---|---|
rs_menu_editor_open |
Function to open the menu editor module |
rs_menu_editor_refresh_lcd_contents |
Function to refresh the menu editor contents in lcd module |
rs_menu_editor_process |
Function to process the menu editor contents. |
rs_menu_editor_update_contents |
Function to update the menu editor contents. |
The below table contains callback functions that are to be performed from the HAL.
Function |
Description |
|---|---|
rcb_keypad_action |
It executes an action when a key event (press or release) occurs. It processes the key event and triggers the appropriate response. |
Example Usecase
The example of menu listed below:
const rs_lcd_menu_list_t arr_menu_Items[] =
{
//label parent child next data id format prop
{"menu", 0, 1, 0, 0, 0, 0},//0
{"Configuration", 0, 4, 2, 0, 0, 0}, //1
{"Status", 0, 10, 3, 0, 0, 0}, //2
{"About", 0, 12, 0, 0, 0, 0}, //3
{"Control mode", 1, 0, 5, FLINT_DATA_BRIDGE_ID_DEFAULT_DATA_DB_ENUM_CONTROL_MODE, RS_DATA_PROP_STORAGE_ENUM, MENU_PROP_EDITTABLE | MENU_PROP_HAS_VALUE}, //4
{"CAN Baud rate", 1, 0, 6, FLINT_DATA_BRIDGE_ID_DEFAULT_DATA_DB_ENUM_BAUDRATE, RS_DATA_PROP_STORAGE_ENUM, MENU_PROP_EDITTABLE | MENU_PROP_HAS_VALUE}, //5
{"Open circuit", 1, 0, 9, FLINT_DATA_BRIDGE_ID_DEFAULT_DATA_DB_ENUM_OPEN_CIRCUIT, RS_DATA_PROP_STORAGE_ENUM, MENU_PROP_EDITTABLE | MENU_PROP_HAS_VALUE}, //8
{"Drive mode", 1, 0, 0, FLINT_DATA_BRIDGE_ID_DEFAULT_DATA_DB_ENUM_DRIVE_MODE, RS_DATA_PROP_STORAGE_ENUM, MENU_PROP_EDITTABLE | MENU_PROP_HAS_VALUE}, //9
{"CAN comm", 2, 0, 11, FLINT_DATA_BRIDGE_ID_DEFAULT_DATA_DB_ENUM_CAN_COMM, RS_DATA_PROP_STORAGE_ENUM, MENU_PROP_EDITTABLE | MENU_PROP_HAS_VALUE}, //10
};
Dependency
This menu editor module depends on the below RAPIDSEA modules.
Error Code
Every API’s for the menu editor returns some success or failure values. Please refer below section,
The below diagram captures the high level of Menu editor with keypad and lcd
Menu editor module Header Details
Documentation from the relevant header as follows:
Warning
doxygenfile: Cannot find file “rs_menu_editor.h