Skip to content

Settings Reference

Relevant source files

This page provides a complete reference of all configurable settings in the PiBot CNC Pendant firmware. Each setting is identified by an ESP3DSettingIndex enumeration value, stored in NVS flash with a unique key (max 15 characters), and has associated metadata including type, size, default value, and optional INI file mapping.

For information about the settings architecture and X-macro pattern used to generate this data, see 4.1 Settings Architecture For validation methods and default value handling, see 4.2 Validation System For exporting settings via the ESP400 command, see 4.4 ESP400 Command


All settings are defined using an X-macro pattern in the following files:

Each setting definition expands to multiple code artifacts:

The following diagram bridges the natural language setting definitions to their respective code entities.

Definition Files (Natural Language Space)

X-Macro Expansion (Code Entity Space)

Generated Artifacts

Runtime Objects

ESP3DSettingDescription struct {index, nvs_key, type, size}

ESP3DSettings class esp3dXsettings instance

ESP3DSettingIndex enum esp3d_baud_rate esp3d_x_jog_steps

ESP3DSettingsData[] array of ESP3DSettingDescription

ESP3D_SET_DEF macro (enum_name, nvs_key, type, size, default, ini_info)

esp3d_settings_defs.inc 'Serial baud rate'

esp3d_target_settings_defs.inc 'X axis jog steps'

Sources:main/core/includes/esp3d_settings_defs.inc#1-26main/target/cnc/fluidnc/esp3d_target_settings_defs.inc#1-18main/target/cnc/grblhal/esp3d_target_settings_defs.inc#1-18


Settings are strongly typed using the ESP3DSettingType enumeration:

TypeC TypeStorageDescription
byte_tuint8_t1 byteBoolean flags, enumerations 0-255
integer_tuint32_t4 bytesPort numbers, timeouts, baud rates
string_tconst char*VariableHostnames, SSIDs, passwords, scripts
ip_tuint32_t4 bytesIPv4 addresses (stored as packed integer)
float_tconst char*Max 15 charsFloating point values stored as strings

Sources:main/core/includes/esp3d_settings_defs.inc#49-149


Settings are stored in NVS flash with specific prefix rules to ensure uniqueness within the 15-character key limit.

PrefixCategoryExample Key
sys_System / Versionsys_baud
net_Network / Hostnamenet_hostname
sta_WiFi Stationsta_ssid
ap_WiFi Access Pointap_ssid
ui_User Interfaceui_lang
scr_Screen / Displayscr_bright
tgt_Target Specifictgt_mpg
jog_Jogging Configjog_x_steps

Sources:main/core/includes/esp3d_settings_defs.inc#12-15main/target/cnc/fluidnc/esp3d_target_settings_defs.inc#12-15


Settings controlling core system behavior and serial communication.

SettingNVS KeyTypeSizeDefaultINI Section/KeyDescription
esp3d_versionsys_versionstring_t25"Invalid data"NO_INIInternal version tracking
esp3d_baud_ratesys_baudinteger_t4UART_BAUD_RATE_STRsystem/Baud_rateUART serial baud rate
esp3d_spi_dividersys_spi_divbyte_t11NO_INISPI divider for SD card
esp3d_radio_boot_modenet_radio_bootbyte_t11services/Radio_enabledRadio enabled at boot (0=off, 1=on)

Sources:main/core/includes/esp3d_settings_defs.inc#47-76


Configuration for connectivity and wireless services.

SettingNVS KeyTypeSizeDefaultDescription
esp3d_radio_modenet_radio_modebyte_t13 (WiFi) / 4 (BT)0=OFF, 1=STA, 2=AP, 3=Setup, 4=BT, 5=BLE
esp3d_fallback_modesta_fallbackbyte_t13Fallback if STA connection fails
esp3d_hostnamenet_hostnamestring_t32ESP3D_HOSTNAMEDevice network name
esp3d_sta_ssidsta_ssidstring_t32""WiFi Station SSID
esp3d_sta_ip_modesta_ip_modebyte_t100=DHCP, 1=Static
esp3d_ap_ssidap_ssidstring_t32"esp3dx"WiFi Access Point SSID
esp3d_http_porthttp_portinteger_t480Web Server port

Sources:main/core/includes/esp3d_settings_defs.inc#79-240


Settings for the LVGL-based touchscreen interface and power management.

SettingNVS KeyTypeSizeDefaultDescription
esp3d_ui_languageui_langstring_t16"en"Language code for UI
esp3d_ui_themeui_themebyte_t10UI Theme (0=Light, 1=Dark)
esp3d_screen_brightnessscr_brightbyte_t1255Active backlight level (0-255)
esp3d_screen_dim_brightnessscr_dim_brightbyte_t150Dimmed backlight level
esp3d_screen_timeoutscr_timeoutinteger_t460Seconds before dimming
esp3d_screen_off_timeoutscr_off_timeoutinteger_t4300Seconds before sleep

Sources:main/core/includes/esp3d_settings_defs.inc#630-675


Target-Specific Settings (FluidNC / grblHAL)

Section titled “Target-Specific Settings (FluidNC / grblHAL)”

These settings are defined in target-specific .inc files and manage the CNC pendant behavior.

Jogging values are stored as semicolon-separated strings to allow dynamic population of UI selection menus.

SettingNVS KeyTypeSizeDefaultAxis
esp3d_x_jog_stepsjog_x_stepsstring_t128"0.01;0.1;1;10;50;100"X
esp3d_z_jog_stepsjog_z_stepsstring_t128"0.01;0.1;1;10;50"Z
esp3d_x_jog_feedratesjog_x_feedstring_t128"100;500;1000;2000;5000"X
esp3d_a_jog_feedratesjog_a_feedstring_t128"60;180;360;720;1440"A

Sources:main/target/cnc/fluidnc/esp3d_target_settings_defs.inc#75-172main/target/cnc/grblhal/esp3d_target_settings_defs.inc#90-187

SettingNVS KeyTypeSizeDefaultDescription
esp3d_probe_enabledtgt_probebyte_t11Show Probe screen in UI
esp3d_macros_enabledtgt_macrosbyte_t11Show Macros screen in UI
esp3d_change_tool_enabledtgt_tool_chgbyte_t11Show Tool Change screen in UI
esp3d_mpg_enabledtgt_mpgbyte_t10grblHAL MPG token mode (grblHAL only)
esp3d_swap_rx_txtgt_swap_rxtxbyte_t10Swap UART RX/TX pins
esp3d_bypass_safety_focustgt_byp_safebyte_t10Bypass safety focus check
esp3d_jog_show_all_axestgt_all_axesbyte_t10Settings list: jog settings of the 6 axes (1) or of the detected axes only (0)
esp3d_jog_position_unittgt_jog_pos_ubyte_t10Jog and probe in the report unit with a unit word in every $J / probe line (1), or in the modal G20/G21 (0). Label Commands in position unit. INI [pendant] Jog_in_position_unit

Sources:main/target/cnc/grblhal/esp3d_target_settings_defs.inc#25-83main/target/cnc/fluidnc/esp3d_target_settings_defs.inc#25-68


The following diagram illustrates the data flow from NVS storage through the ESP3DSettings class to specific command processors like ESP132 (Socket Address) and ESP133 (Socket Port).

Storage

Management

Commands (Code Entities)

ESP3DCommands::ESP132 (Socket Client Address)

ESP3DCommands::ESP133 (Socket Client Port)

ESP3DSettings esp3dXsettings

readUint32()

readString()

NVS Flash 'ESP3D_X'

Sources:main/core/commands/esp132.cpp#29-86main/core/commands/esp133.cpp#29-83


Some settings are not meant for INI configuration but are persisted to NVS to maintain UI state across reboots. These use the NO_INI macro.

Sources:main/target/cnc/fluidnc/esp3d_target_settings_defs.inc#179-275main/target/cnc/grblhal/esp3d_target_settings_defs.inc#194-250