Skip to content

Commit d75e875

Browse files
committed
backlight: dont try setting the backlight when running emulated
Signed-off-by: Mimoja <[email protected]>
1 parent 25cebdb commit d75e875

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: backlight_controller.py

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import time
22
import threading
33

4+
from machine import Machine
45
from log import MeticulousLogger
56

67
logger = MeticulousLogger.getLogger(__name__)
@@ -95,6 +96,9 @@ def adjust_brightness(target_percent, interpolation="linear", steps=50):
9596

9697
logger.info(f"Adjusting Brightness to {target_percent}")
9798

99+
if Machine.emulated:
100+
return
101+
98102
BacklightController.stop_adjust_thread()
99103
BacklightController._adjust_thread = threading.Thread(
100104
target=BacklightController.adjust_brightness_thread,

0 commit comments

Comments
 (0)