PlatformCapabilities¶
Namespace: pixelroot32::platforms
A structure that holds detected hardware capabilities, used to optimize task pinning and threading.
Members¶
-
bool hasDualCoreTrue if the hardware has more than one CPU core. -
int coreCountTotal number of CPU cores detected. -
int audioCoreIdRecommended CPU core for audio tasks. -
int mainCoreIdRecommended CPU core for the main game loop. -
int audioPriorityRecommended priority for audio tasks.
Static Methods¶
static PlatformCapabilities detect()Automatically detects hardware capabilities based on the platform and configuration. It respects the defaults defined inplatforms/PlatformDefaults.hand any compile-time overrides.
Debug Statistics Overlay¶
When the engine is built with the preprocessor define PIXELROOT32_ENABLE_DEBUG_OVERLAY, the engine draws a technical overlay with real-time metrics.
- Metrics Included:
- FPS: Frames per second (green).
- RAM: Memory used in KB (cyan). ESP32 specific.
-
CPU: Estimated processor load percentage based on frame processing time (yellow).
-
Behavior: The metrics are drawn in the top-right area of the screen, fixed and independent of the camera.
-
Performance: Values are recalculated and formatted only every 16 frames (
DEBUG_UPDATE_INTERVAL); the cached strings are drawn every frame. This ensures minimal overhead while providing useful development data. -
Usage: Add to your build flags, e.g. in
platformio.ini:
build_flags = -D PIXELROOT32_ENABLE_DEBUG_OVERLAY
This flag is also available inEngineConfig.h.