reverted some derps

This commit is contained in:
Giovanni Harting
2015-11-13 23:58:41 +01:00
parent 99a7252194
commit db379ccdf0

View File

@@ -57,7 +57,6 @@ class Controller(Base):
A controller controls a number of stripes. A controller controls a number of stripes.
""" """
@reconstructor
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
self._mode = None self._mode = None
@@ -65,6 +64,13 @@ class Controller(Base):
self._address = int(self.address, 16) self._address = int(self.address, 16)
self.pwm_freq = self._pwm_freq self.pwm_freq = self._pwm_freq
@reconstructor
def init_on_load(self):
self._mode = None
self.bus = smbus.SMBus(self.i2c_device)
self._address = int(self.address, 16)
self.pwm_freq = self._pwm_freq
def __repr__(self): def __repr__(self):
return "<Controller stripes={} cid={}>".format(len(self.stripes), self.id) return "<Controller stripes={} cid={}>".format(len(self.stripes), self.id)