We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents df52bdf + d774cd9 commit 8d3f1abCopy full SHA for 8d3f1ab
adafruit_fruitjam/peripherals.py
@@ -80,6 +80,23 @@ def request_display_config(width, height):
80
supervisor.runtime.display = framebufferio.FramebufferDisplay(fb)
81
82
83
+def get_display_config():
84
+ """
85
+ Get the current display size configuration.
86
+
87
+ :return: width: The width of the display in pixels.
88
+ :return: height: The height of the display in pixels.
89
+ :return: pixel_depth of the display in pixels
90
91
92
+ try:
93
+ display = supervisor.runtime.display
94
+ display_config = (display.width, display.height, display.framebuffer.color_depth)
95
+ return display_config
96
+ except ValueError:
97
+ return (None, None, None)
98
99
100
class Peripherals:
101
"""Peripherals Helper Class for the FruitJam Library
102
0 commit comments