toggl-zei-py/zei/Zei.py

18 lines
467 B
Python
Raw Normal View History

2020-08-12 18:44:23 +02:00
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
from bluepy import btle
from . import ZeiOrientationChar
from . import ZeiDelegate
2020-08-16 00:00:08 +02:00
class Zei(btle.Peripheral):
2020-08-12 18:44:23 +02:00
def __init__(self, *args, **kwargs):
btle.Peripheral.__init__(self, *args, **kwargs)
self.withDelegate(ZeiDelegate.ZeiDelegate(self))
# activate notifications about turn
self.orientation = ZeiOrientationChar.ZeiOrientationChar(self)
2020-08-16 00:00:08 +02:00
self.orientation.enable()