Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Lazily import "ButtonManager" for trimming #11
  • Loading branch information
amotl committed Jul 12, 2019
1 parent b3917a8 commit eb0e33d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.rst
Expand Up @@ -32,6 +32,7 @@ Development
- Use most recent "dotty_dict" module
- Properly format MAC addresses
- Add maintenance mode interval to configuration settings
- Lazily import "ButtonManager" for trimming #11


2019-06-22 0.5.1
Expand Down
2 changes: 1 addition & 1 deletion terkin/datalogger.py
Expand Up @@ -12,7 +12,6 @@
from terkin.network import SystemWiFiMetrics
from terkin.sensor import SensorManager, AbstractSensor
from terkin.sensor.system import SystemMemoryFree, SystemTemperature, SystemBatteryLevel, SystemUptime
from terkin.sensor.button import ButtonManager

log = logging.getLogger(__name__)

Expand Down Expand Up @@ -92,6 +91,7 @@ def start(self):
# Initialize buttons / touch pads.
buttons_enabled = self.settings.get('sensors.system.buttons.enabled', False)
if buttons_enabled:
from terkin.sensor.button import ButtonManager
self.button_manager = ButtonManager()
self.start_buttons()

Expand Down

0 comments on commit eb0e33d

Please sign in to comment.