Skip to content

Commit

Permalink
reformat some more
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Aug 15, 2024
1 parent ce393df commit 072c63d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ovos_gui_plugin_shell_companion/brightness.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ def __init__(self, bus, config):
self.bus.on("recognizer_loop:wakeword", self.undim_display)
self.bus.on("recognizer_loop:record_begin", self.undim_display)

@property
def auto_dim_enabled(self):
return self.config.get("auto_dim", False)

##############################################
# brightness manager - TODO generic non rpi support
# Discover the brightness control device interface (HDMI / DSI) on the Raspberry PI
Expand Down Expand Up @@ -159,6 +155,10 @@ def set_brightness_from_bus(self, message):

self.set_brightness(apply_level)

@property
def auto_dim_enabled(self):
return self.config.get("auto_dim", False)

def start_auto_dim(self):
LOG.debug("Starting Auto Dim")
if self.auto_dim_enabled:
Expand Down Expand Up @@ -199,7 +199,7 @@ def undim_display(self, message=None):
self.set_brightness(255)
self.bus.emit(
Message("phal.brightness.control.auto.dim.update", {"brightness": "100"}))
self.restart_auto_dim()
self.start_auto_dim()

##################################
# AUTO NIGHT MODE HANDLING
Expand Down

0 comments on commit 072c63d

Please sign in to comment.