Files

50 lines
1.2 KiB
C++

/**
* Debug Monitor Module for ESP32-S3-LCD-1.3 (Inst. Cluster)
*
* Synchronizes LVGL performance and memory monitor visibility with Main CTRL.
* Monitors are shown/hidden based on the debug_enabled flag received via UART.
*/
#ifndef DEBUG_MONITOR_H
#define DEBUG_MONITOR_H
#include <Arduino.h>
namespace DebugMonitor {
/**
* @brief Initialize debug monitor module
*
* Must be called after LVGL and display initialization.
*/
void init();
/**
* @brief Set debug monitor visibility
*
* Controls the visibility of LVGL's built-in performance and memory monitors.
* This should be called when receiving packets from Main CTRL to sync
* with the debug_enabled flag.
*
* @param enabled True to show monitors, false to hide them
*/
void setVisible(bool enabled);
/**
* Apply a pending setVisible() under the LVGL lock. setVisible() is called
* from the link receiver (UART task / ESP-NOW callback) and only records the
* wish; call tick() from loop() to act on it.
*/
void tick();
/**
* @brief Get current debug monitor visibility state
*
* @return true if monitors are visible, false if hidden
*/
bool isVisible();
} // namespace DebugMonitor
#endif // DEBUG_MONITOR_H