mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-10 13:02:59 +00:00
Debug/fps logging (#183)
* fix: Use plugin.modes instead of manifest.json for available modes - Display controller now checks plugin_instance.modes first before falling back to manifest - This allows plugins to dynamically provide modes based on enabled leagues - Fixes issue where disabled leagues (WNBA, NCAAW) appeared in available modes - Plugins can now control their available modes at runtime based on config * fix: Handle permission errors when removing plugin directories - Added _safe_remove_directory() method to handle permission errors gracefully - Fixes permissions on __pycache__ directories before removal - Updates uninstall_plugin() and install methods to use safe removal - Resolves [Errno 13] Permission denied errors during plugin install/uninstall * debug(display): Change FPS check logging from debug to info level - Change FPS check log from DEBUG to INFO to help diagnose scrolling FPS issues - Add active_mode to log message for clarity - Helps identify if plugins are being detected for high-FPS mode * debug(display): Add logging for display_interval in both FPS loops - Log display_interval when entering high-FPS and normal loops - Shows expected FPS for high-FPS mode - Helps diagnose why news ticker shows 50 FPS despite high-FPS detection --------- Co-authored-by: Chuck <chuck@example.com>
This commit is contained in:
@@ -1466,8 +1466,9 @@ class DisplayController:
|
||||
has_enable_scrolling = hasattr(manager_to_display, 'enable_scrolling')
|
||||
enable_scrolling_value = getattr(manager_to_display, 'enable_scrolling', False)
|
||||
needs_high_fps = has_enable_scrolling and enable_scrolling_value
|
||||
logger.debug(
|
||||
"FPS check - has_enable_scrolling: %s, enable_scrolling_value: %s, needs_high_fps: %s",
|
||||
logger.info(
|
||||
"FPS check for %s - has_enable_scrolling: %s, enable_scrolling_value: %s, needs_high_fps: %s",
|
||||
active_mode,
|
||||
has_enable_scrolling,
|
||||
enable_scrolling_value,
|
||||
needs_high_fps,
|
||||
@@ -1513,6 +1514,12 @@ class DisplayController:
|
||||
if needs_high_fps:
|
||||
# Ultra-smooth FPS for scrolling plugins (8ms = 125 FPS)
|
||||
display_interval = 0.008
|
||||
logger.info(
|
||||
"Entering high-FPS loop for %s with display_interval=%.3fs (%.1f FPS)",
|
||||
active_mode,
|
||||
display_interval,
|
||||
1.0 / display_interval
|
||||
)
|
||||
|
||||
while True:
|
||||
try:
|
||||
@@ -1556,6 +1563,11 @@ class DisplayController:
|
||||
else:
|
||||
# Normal FPS for other plugins (1 second)
|
||||
display_interval = 1.0
|
||||
logger.info(
|
||||
"Entering normal FPS loop for %s with display_interval=%.3fs",
|
||||
active_mode,
|
||||
display_interval
|
||||
)
|
||||
|
||||
while True:
|
||||
time.sleep(display_interval)
|
||||
|
||||
Reference in New Issue
Block a user