1
0
Fork 0

Merge pull request #672 from AdamWill/set-on-battery-before-switch-profile

controller init: set _on_battery before switching profile
This commit is contained in:
Jaroslav Škarvada 2024-08-19 16:06:47 +02:00 committed by GitHub
commit c082797fd0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -138,8 +138,8 @@ class Controller(exports.interfaces.ExportableInterface):
self._config = PPDConfig(PPD_CONFIG_FILE)
active_profile = self.active_profile()
self._base_profile = active_profile if active_profile != UNKNOWN_PROFILE else self._config.default_profile
self.switch_profile(self._base_profile)
self._on_battery = False
self.switch_profile(self._base_profile)
if self._config.battery_detection:
self.setup_battery_signaling()