mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-13 05:53:00 +00:00
adjustments in Display scheduling to fix blank screen after re-activated
This commit is contained in:
@@ -752,6 +752,7 @@ class DisplayController:
|
|||||||
if should_be_active and not self.is_display_active:
|
if should_be_active and not self.is_display_active:
|
||||||
logger.info("Within scheduled time. Activating display.")
|
logger.info("Within scheduled time. Activating display.")
|
||||||
self.is_display_active = True
|
self.is_display_active = True
|
||||||
|
self.force_clear = True # Force a redraw
|
||||||
elif not should_be_active and self.is_display_active:
|
elif not should_be_active and self.is_display_active:
|
||||||
logger.info("Outside of scheduled time. Deactivating display.")
|
logger.info("Outside of scheduled time. Deactivating display.")
|
||||||
self.display_manager.clear()
|
self.display_manager.clear()
|
||||||
|
|||||||
@@ -316,7 +316,6 @@ class BaseMLBManager:
|
|||||||
|
|
||||||
for event in data.get('events', []):
|
for event in data.get('events', []):
|
||||||
game_id = event['id']
|
game_id = event['id']
|
||||||
self.logger.info(f"Processing event: {json.dumps(event, indent=2)}")
|
|
||||||
status = event['status']['type']['name'].lower()
|
status = event['status']['type']['name'].lower()
|
||||||
status_state = event['status']['type']['state'].lower()
|
status_state = event['status']['type']['state'].lower()
|
||||||
|
|
||||||
@@ -379,7 +378,6 @@ class BaseMLBManager:
|
|||||||
situation = event['competitions'][0].get('situation', {})
|
situation = event['competitions'][0].get('situation', {})
|
||||||
|
|
||||||
if is_favorite_game:
|
if is_favorite_game:
|
||||||
self.logger.debug(f"[MLB] Full competition data: {event['competitions'][0]}")
|
|
||||||
self.logger.debug(f"[MLB] Full situation data: {situation}")
|
self.logger.debug(f"[MLB] Full situation data: {situation}")
|
||||||
|
|
||||||
# Get count from the correct location in the API response
|
# Get count from the correct location in the API response
|
||||||
|
|||||||
Reference in New Issue
Block a user