Skip to content

Glossary

Relevant source files

This page provides definitions and technical implementation details for codebase-specific terms, domain concepts, and architectural patterns used in the PiBot CNC Pendant firmware.

The central state management system for the firmware. It decouples data providers (G-code parsers, network stacks) from data consumers (UI screens).

Code Entities Relation

Data Providers

Data Consumers (Subscribers)

jogScreen::on_positions_update

statusScreen::on_firmware_status_update

ESP3DGCodeHandlerService

esp3dTftValues (Registry)

ESP3DNetwork

Sources: main/display/esp3d_ui.cpp#141-150main/display/esp3d_ui.h#28main/target/cnc/fluidnc/esp3d_gcode_handler_service.cpp#29-33

A preprocessor technique used extensively for settings and translations to ensure synchronization between enums, metadata, and storage.

Sources: main/display/esp3d_ui.cpp#32-37main/display/esp3d_ui.h#15-18


TermDefinitionCode Pointer
MPosMachine Position: Absolute coordinates relative to machine home.main/display/cnc/screens/status_screen.cpp#59-60
WPosWork Position: Coordinates relative to the active Work Coordinate System (WCS).main/display/cnc/screens/status_screen.cpp#60-61
WCOWork Coordinate Offset: The difference between MPos and WPos (WPos = MPos - WCO).main/target/cnc/fluidnc/esp3d_gcode_handler_service.cpp#160-170
JoggingManual movement of CNC axes. The pendant supports JOG_SEQUENTIAL and JOG_CONTINUOUS.main/display/cnc/screens/jog_screen.cpp#88-93
Planner BufferThe look-ahead queue in the CNC controller. Threshold used to prevent overflow.main/display/cnc/screens/jog_screen.cpp#36
ESP400A custom system command used to export configuration in JSON or Text format.main/core/commands/esp400.cpp#1-20

A singleton (ui_manager) that manages global UI state, including theme palettes, orientation, and the “Lock” state main/display/esp3d_ui.cpp#81-82

Sources: main/display/esp3d_ui.h#96-120main/display/esp3d_ui.cpp#81-112

A reusable UI container used for grid-based navigation. It abstracts physical inputs to cycle through “items” main/display/components/panel_component.h#20-40

  • Modes:

  • NAVIGATION: Encoder moves focus between buttons.

  • EDITING: Encoder changes the value of the focused item.

  • Implementation: Used in jog_screen to manage axis, step, and feedrate selection main/display/cnc/screens/jog_screen.cpp#108-123

Sources: main/display/cnc/screens/jog_screen.cpp#108-123main/display/cnc/screens/status_screen.cpp#98-100

Manages the three physical buttons at the bottom of the pendant (mapped to OK, Back, and Context-specific actions) main/display/components/virtual_buttons_component.h#159-160

Sources: main/display/components/virtual_buttons_component.h#159-180main/display/components/virtual_buttons_component.cpp#77-120

Implements a circular, navigable menu interface. It supports dynamic section configuration and encoder-based navigation via RotaryBaseComponentmain/display/components/circular_menu_component.h#52-55

Sources: main/display/components/circular_menu_component.cpp#52-65main/display/components/circular_menu_component.h#38-50


The following diagram bridges the Natural Language Space (User Actions) to the Code Entity Space (Class Methods and Files).

"ESP3DSerialClient""ESP3DGCodeHandlerService""CircularMenuComponent""BSP (board_init.c)""User (Hardware)""ESP3DSerialClient""ESP3DGCodeHandlerService""CircularMenuComponent""BSP (board_init.c)""User (Hardware)"'Update current_section'"Rotate Encoder""RotaryBaseComponent::handleEncoder()""sendGcode('G0 X10')""addTxData(ESP3DMessage)""Physical TX (UART)"

Sources: main/display/components/circular_menu_component.cpp#79-82main/target/cnc/fluidnc/esp3d_gcode_handler_service.cpp#33-38main/modules/serial/esp3d_serial_client.cpp#101-107boards/pibot_pendant_v1_0/components/bsp/board_init.c#59-61


The ESP3DClient abstraction allows the firmware to talk to different CNC controllers over various physical layers.

Client ClassProtocolKey Implementation Details
ESP3DSerialClientUARTHandles ESP3D_INACTIVITY_TIMEOUT (30s) and ping cycles main/modules/serial/esp3d_serial_client.cpp#78-81
ESP3DBTSerialClientBT ClassicUses SPP profile; manages state via esp_bt_gap_cbmain/modules/bt_serial/esp3d_bt_serial_client.cpp#221-228
ESP3DBTBleClientBLEGATT client operations for UART service 0xFFF0 main/modules/bt_ble/esp3d_bt_ble_client.cpp#33-50
ReconnectionAllreconnect() resets flags and triggers sendInitCommand()main/modules/serial/esp3d_serial_client.cpp#137-171

Sources: main/modules/bt_serial/esp3d_bt_serial_client.cpp#29-64main/modules/serial/esp3d_serial_client.cpp#137-171main/modules/bt_ble/esp3d_bt_ble_client.cpp#33-77

The layer responsible for initializing the specific hardware of the PiBot Pendant.

Sources: boards/pibot_pendant_v1_0/components/bsp/board_init.c#7-40hardware/common/drivers/touch_ft6336u/touch_ft6336u.c#1-50