Move buzzer init order to fall after config init.

Buzzer can't initialise with correct gpio pin as the config hasn't been initialised yet.
This commit is contained in:
Luke Mullan
2017-07-02 22:12:43 +10:00
parent c2aa5d8141
commit e7de4d8965
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ class Buzzer(object):
start_new_thread(play, (self.sound,))
@cbpi.initalizer(order=0)
@cbpi.initalizer(order=1)
def init(cbpi):
gpio = cbpi.get_config_parameter("buzzer", 16)
cbpi.buzzer = Buzzer(gpio)