mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-11 13:23:00 +00:00
fix display width error for news_manager
This commit is contained in:
@@ -93,6 +93,16 @@ class DisplayManager:
|
|||||||
# Draw a test pattern
|
# Draw a test pattern
|
||||||
self._draw_test_pattern()
|
self._draw_test_pattern()
|
||||||
|
|
||||||
|
@property
|
||||||
|
def width(self):
|
||||||
|
"""Get the display width."""
|
||||||
|
return self.matrix.width if hasattr(self, 'matrix') else 128
|
||||||
|
|
||||||
|
@property
|
||||||
|
def height(self):
|
||||||
|
"""Get the display height."""
|
||||||
|
return self.matrix.height if hasattr(self, 'matrix') else 32
|
||||||
|
|
||||||
def _draw_test_pattern(self):
|
def _draw_test_pattern(self):
|
||||||
"""Draw a test pattern to verify the display is working."""
|
"""Draw a test pattern to verify the display is working."""
|
||||||
self.clear()
|
self.clear()
|
||||||
|
|||||||
Reference in New Issue
Block a user