Skip to content

Commit

Permalink
feat: apps & features menuconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
Otrebor671 committed Aug 15, 2024
1 parent a65ce3e commit 297aa63
Show file tree
Hide file tree
Showing 3 changed files with 239 additions and 68 deletions.
121 changes: 119 additions & 2 deletions firmware/main/Kconfig.projbuild
Original file line number Diff line number Diff line change
Expand Up @@ -563,8 +563,8 @@ menu "Frequency Configuration"
default 32 if EXAMPLE_MIN_CPU_FREQ_32M
endmenu

menu "Enable or Disable Features"

menu "Apps & Features"
################################# WIFI ###################################
config WIFI_APPS_ENABLE
bool "Enable WiFi Apps"
default y
Expand Down Expand Up @@ -593,4 +593,121 @@ config WIFI_APP_DOS

endif # WIFI_APPS_ENABLE

############################### BLUETOOTH #################################

config BLUETOOTH_APPS_ENABLE
bool "Enable Bluetooth Apps"
default y
help
Enable or disable all Bluetooth applications.

if BLUETOOTH_APPS_ENABLE

config BLUETOOTH_APP_TRAKERS
bool "Enable Trakers App"
default y
help
Enable or disable the Bluetooth Trakers application.

config BLUETOOTH_APP_SPAM
bool "Enable Spam App"
default y
help
Enable or disable the Bluetooth Spam application.
endif # BLUETOOTH_APPS_ENABLE

################################# ZIGBEE ###################################

config ZIGBEE_APPS_ENABLE
bool "Enable Zigbee Apps"
default y
help
Enable or disable all Zigbee applications.

if ZIGBEE_APPS_ENABLE

config ZIGBEE_APP_SPOOFING
bool "Enable Spoofing App"
default y
help
Enable or disable the Zigbee Spoofing application.

config ZIGBEE_APP_SNIFFER
bool "Enable Sniffer App"
default y
help
Enable or disable the Zigbee Sniffer application.
endif # ZIGBEE_APPS_ENABLE

################################# THREAD ###################################

config THREAD_APPS_ENABLE
bool "Enable Thread Apps"
default y
help
Enable or disable all Thread applications.

if THREAD_APPS_ENABLE

config THREAD_APP_BROADCAST
bool "Enable Boradcast App"
default y
help
Enable or disable the Thread Broadcast application.

config THREAD_APP_SNIFFER
bool "Enable Sniffer App"
default y
help
Enable or disable the Thread Sniffer application.
endif # THREAD_APPS_ENABLE

################################# GPS ###################################

config GPS_APPS_ENABLE
bool "Enable GPS Apps"
default y
help
Enable or disable all GPS applications.

if GPS_APPS_ENABLE

config GPS_APP_WARDRIVING
bool "Enable Wardriving App"
default y
help
Enable or disable the GPS Wardriving application.
endif # GPS_APPS_ENABLE

################################# OTA ###################################

config OTA_ENABLE
bool "Enable OTA feature"
default y
help
Enable or disable OTA feature.

########################### FILE MANAGER #############################

config FILE_MANAGER_ENABLE
bool "Enable File Manager Features"
default y
help
Enable or disable all File Manager Features.

if FILE_MANAGER_ENABLE

config FILE_MANAGER_LOCAL
bool "Enable Local File Manager"
default y
help
Enable or disable the Local File Manager feature.

config FILE_MANAGER_WEB
bool "Enable Web File Manager"
default y
help
Enable or disable the Web File Manager Feature.
endif # FILE_MANAGER_ENABLE

endmenu
134 changes: 82 additions & 52 deletions firmware/main/modules/menus_module/menus.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,34 @@ menu_t menus[] = { //////////////////////////////////
.on_enter_cb = NULL,
.on_exit_cb = NULL,
.is_visible = true},
{.display_name = "Version",
.menu_idx = MENU_ABOUT_VERSION_2,
.parent_idx = MENU_ABOUT_2,
.input_cb = NULL,
.on_enter_cb = NULL,
.on_exit_cb = NULL,
.is_visible = true},
{.display_name = "License",
.menu_idx = MENU_ABOUT_LICENSE_2,
.parent_idx = MENU_ABOUT_2,
.input_cb = NULL,
.on_enter_cb = NULL,
.on_exit_cb = NULL,
.is_visible = true},
{.display_name = "Credits",
.menu_idx = MENU_ABOUT_CREDITS_2,
.parent_idx = MENU_ABOUT_2,
.input_cb = NULL,
.on_enter_cb = NULL,
.on_exit_cb = NULL,
.is_visible = true},
{.display_name = "Legal",
.menu_idx = MENU_ABOUT_LEGAL_2,
.parent_idx = MENU_ABOUT_2,
.input_cb = NULL,
.on_enter_cb = NULL,
.on_exit_cb = NULL,
.is_visible = true},
#ifdef CONFIG_WIFI_APPS_ENABLE
{.display_name = "WiFi",
.menu_idx = MENU_WIFI_APPS_2,
Expand Down Expand Up @@ -192,34 +220,42 @@ menu_t menus[] = { //////////////////////////////////
.is_visible = true},
#endif
#endif
#ifdef CONFIG_BLUETOOTH_APPS_ENABLE
{.display_name = "Bluetooth",
.menu_idx = MENU_BLUETOOTH_APPS_2,
.parent_idx = MENU_APPLICATIONS_2,
.input_cb = NULL,
.on_enter_cb = NULL,
.on_exit_cb = NULL,
.is_visible = true},
#ifdef CONFIG_BLUETOOTH_APP_TRAKERS
{.display_name = "Trakers scan",
.menu_idx = MENU_BLUETOOTH_TRAKERS_SCAN_2,
.parent_idx = MENU_BLUETOOTH_APPS_2,
.input_cb = NULL,
.on_enter_cb = NULL,
.on_exit_cb = NULL,
.is_visible = true},
#endif
#ifdef CONFIG_BLUETOOTH_APP_SPAM
{.display_name = "Spam",
.menu_idx = MENU_BLUETOOTH_SPAM_2,
.parent_idx = MENU_BLUETOOTH_APPS_2,
.input_cb = NULL,
.on_enter_cb = NULL,
.on_exit_cb = NULL,
.is_visible = true},
#endif
#endif
#ifdef CONFIG_ZIGBEE_APPS_ENABLE
{.display_name = "Zigbee",
.menu_idx = MENU_ZIGBEE_APPS_2,
.parent_idx = MENU_APPLICATIONS_2,
.input_cb = NULL,
.on_enter_cb = NULL,
.on_exit_cb = NULL,
.is_visible = true},
#ifdef CONFIG_ZIGBEE_APP_SPOOFING
{.display_name = "Spoofing",
.menu_idx = MENU_ZIGBEE_SPOOFING_2,
.parent_idx = MENU_ZIGBEE_APPS_2,
Expand All @@ -241,27 +277,35 @@ menu_t menus[] = { //////////////////////////////////
.on_enter_cb = NULL,
.on_exit_cb = NULL,
.is_visible = true},
#endif
#ifdef CONFIG_ZIGBEE_APP_SNIFFER
{.display_name = "Sniffer",
.menu_idx = MENU_ZIGBEE_SWITCH_2,
.parent_idx = MENU_ZIGBEE_APPS_2,
.input_cb = NULL,
.on_enter_cb = NULL,
.on_exit_cb = NULL,
.is_visible = true},
#endif
#endif
#ifdef CONFIG_THREAD_APPS_ENABLE
{.display_name = "Thread",
.menu_idx = MENU_THREAD_APPS_2,
.parent_idx = MENU_APPLICATIONS_2,
.input_cb = NULL,
.on_enter_cb = NULL,
.on_exit_cb = NULL,
.is_visible = true},
#ifdef CONFIG_THREAD_APP_BROADCAST
{.display_name = "Broadcast",
.menu_idx = MENU_THREAD_BROADCAST_2,
.parent_idx = MENU_THREAD_APPS_2,
.input_cb = NULL,
.on_enter_cb = NULL,
.on_exit_cb = NULL,
.is_visible = true},
#endif
#ifdef CONFIG_THREAD_APP_SNIFFER
{.display_name = "Sniffer",
.menu_idx = MENU_THREAD_SNIFFER_2,
.parent_idx = MENU_THREAD_APPS_2,
Expand All @@ -276,13 +320,17 @@ menu_t menus[] = { //////////////////////////////////
.on_enter_cb = NULL,
.on_exit_cb = NULL,
.is_visible = true},
#endif
#endif
#ifdef CONFIG_GPS_APPS_ENABLE
{.display_name = "GPS",
.menu_idx = MENU_GPS_2,
.parent_idx = MENU_APPLICATIONS_2,
.input_cb = NULL,
.on_enter_cb = NULL,
.on_exit_cb = NULL,
.is_visible = true},
#ifdef CONFIG_GPS_APP_WARDRIVING
{.display_name = "Wardriving",
.menu_idx = MENU_GPS_WARDRIVING_2,
.parent_idx = MENU_GPS_2,
Expand All @@ -304,6 +352,7 @@ menu_t menus[] = { //////////////////////////////////
.on_enter_cb = NULL,
.on_exit_cb = NULL,
.is_visible = true},
#endif
{.display_name = "Date & Time",
.menu_idx = MENU_GPS_DATE_TIME_2,
.parent_idx = MENU_GPS_2,
Expand Down Expand Up @@ -332,83 +381,37 @@ menu_t menus[] = { //////////////////////////////////
.on_enter_cb = NULL,
.on_exit_cb = NULL,
.is_visible = true},
{.display_name = "Version",
.menu_idx = MENU_ABOUT_VERSION_2,
.parent_idx = MENU_ABOUT_2,
.input_cb = NULL,
.on_enter_cb = NULL,
.on_exit_cb = NULL,
.is_visible = true},
{.display_name = "License",
.menu_idx = MENU_ABOUT_LICENSE_2,
.parent_idx = MENU_ABOUT_2,
.input_cb = NULL,
.on_enter_cb = NULL,
.on_exit_cb = NULL,
.is_visible = true},
{.display_name = "Credits",
.menu_idx = MENU_ABOUT_CREDITS_2,
.parent_idx = MENU_ABOUT_2,
.input_cb = NULL,
.on_enter_cb = NULL,
.on_exit_cb = NULL,
.is_visible = true},
{.display_name = "Legal",
.menu_idx = MENU_ABOUT_LEGAL_2,
.parent_idx = MENU_ABOUT_2,
{.display_name = "Time zone",
.menu_idx = MENU_SETTINGS_TIME_ZONE_2,
.parent_idx = MENU_SETTINGS_SYSTEM_2,
.input_cb = NULL,
.on_enter_cb = NULL,
.on_exit_cb = NULL,
.is_visible = true},
#endif
#ifdef CONFIG_OTA_ENABLE
{.display_name = "Update",
.menu_idx = MENU_ABOUT_UPDATE_2,
.parent_idx = MENU_ABOUT_2,
.input_cb = ota_module_input,
.on_enter_cb = ota_module_init,
.on_exit_cb = ota_module_deinit,
.is_visible = true},
#endif
{.display_name = "Display",
.menu_idx = MENU_SETTINGS_DISPLAY_2,
.parent_idx = MENU_SETTINGS_2,
.input_cb = NULL,
.on_enter_cb = NULL,
.on_exit_cb = NULL,
.is_visible = true},
{.display_name = "File Manager",
.menu_idx = MENU_FILE_MANAGER_2,
.parent_idx = MENU_SETTINGS_2,
.input_cb = NULL,
.on_enter_cb = NULL,
.on_exit_cb = NULL,
.is_visible = true},
{.display_name = "Local",
.menu_idx = MENU_FILE_MANAGER_LOCAL_2,
.parent_idx = MENU_FILE_MANAGER_2,
.input_cb = NULL,
.on_enter_cb = NULL,
.on_exit_cb = NULL,
.is_visible = true},
{.display_name = "Web",
.menu_idx = MENU_FILE_MANAGER_WEB_2,
.parent_idx = MENU_FILE_MANAGER_2,
.input_cb = NULL,
.on_enter_cb = NULL,
.on_exit_cb = NULL,
.is_visible = true},
{.display_name = "System",
.menu_idx = MENU_SETTINGS_SYSTEM_2,
.parent_idx = MENU_SETTINGS_2,
.input_cb = NULL,
.on_enter_cb = NULL,
.on_exit_cb = NULL,
.is_visible = true},
{.display_name = "Time zone",
.menu_idx = MENU_SETTINGS_TIME_ZONE_2,
.parent_idx = MENU_SETTINGS_SYSTEM_2,
.input_cb = NULL,
.on_enter_cb = NULL,
.on_exit_cb = NULL,
.is_visible = true},
{.display_name = "WiFi",
.menu_idx = MENU_SETTINGS_WIFI_2,
.parent_idx = MENU_SETTINGS_SYSTEM_2,
Expand Down Expand Up @@ -437,6 +440,33 @@ menu_t menus[] = { //////////////////////////////////
.on_enter_cb = NULL,
.on_exit_cb = NULL,
.is_visible = true},
#ifdef CONFIG_FILE_MANAGER_ENABLE
{.display_name = "File Manager",
.menu_idx = MENU_FILE_MANAGER_2,
.parent_idx = MENU_SETTINGS_2,
.input_cb = NULL,
.on_enter_cb = NULL,
.on_exit_cb = NULL,
.is_visible = true},
#ifdef CONFIG_FILE_MANAGER_LOCAL
{.display_name = "Local",
.menu_idx = MENU_FILE_MANAGER_LOCAL_2,
.parent_idx = MENU_FILE_MANAGER_2,
.input_cb = NULL,
.on_enter_cb = NULL,
.on_exit_cb = NULL,
.is_visible = true},
#endif
#ifdef CONFIG_FILE_MANAGER_WEB
{.display_name = "Web",
.menu_idx = MENU_FILE_MANAGER_WEB_2,
.parent_idx = MENU_FILE_MANAGER_2,
.input_cb = NULL,
.on_enter_cb = NULL,
.on_exit_cb = NULL,
.is_visible = true},
#endif
#endif
{.display_name = "Stealth Mode",
.menu_idx = MENU_STEALTH_MODE_2,
.parent_idx = MENU_SETTINGS_2,
Expand Down
Loading

0 comments on commit 297aa63

Please sign in to comment.