Skip to content
Permalink
Browse files

remove _id argument from common loop

  • Loading branch information...
DavidVentura committed Jul 11, 2019
1 parent f2b03bb commit 219e560532abe88a86d1032562314cbf3adff798
Showing with 6 additions and 6 deletions.
  1. +1 −1 firmware/common.py
  2. +1 −1 firmware/curtains_433.py
  3. +1 −1 firmware/nightlamp.py
  4. +1 −1 firmware/rf433.py
  5. +1 −1 firmware/temp.py
  6. +1 −1 firmware/wall_light.py
@@ -156,7 +156,7 @@ def get_client_id():
mac = hexlify(WLAN().config('mac'),':').decode()
return mac

def loop(_id, setup_fn, loop_fn, callback, subtopic):
def loop(setup_fn, loop_fn, callback, subtopic):
global mqtt
global OTA_TOPIC
global CLIENT_ID
@@ -71,6 +71,6 @@ def setup():

def main():
setup()
common.loop(CLIENT_ID, setup_fn=None, loop_fn=[], callback=sub_cb, subtopic=SUBTOPICS)
common.loop(setup_fn=None, loop_fn=[], callback=sub_cb, subtopic=SUBTOPICS)

main()
@@ -48,6 +48,6 @@ def setup():
button.irq(handler=handle_button, trigger=Pin.IRQ_RISING),
led(1) # Turn off LED, it is inverted
def main():
common.loop(CLIENT_ID, setup_fn=setup, loop_fn=[read_dht], callback=sub_cb, subtopic=[SUBTOPIC])
common.loop(setup_fn=setup, loop_fn=[read_dht], callback=sub_cb, subtopic=[SUBTOPIC])

main()
@@ -39,6 +39,6 @@ def sub_cb(topic, msg):

def main():
#led(1) # Turn off LED, it is inverted
common.loop(CLIENT_ID, setup_fn=None, loop_fn=[], callback=sub_cb, subtopic=[LAMP_SUBTOPIC, HDMI_SUBTOPIC])
common.loop(setup_fn=None, loop_fn=[], callback=sub_cb, subtopic=[LAMP_SUBTOPIC, HDMI_SUBTOPIC])

main()
@@ -19,6 +19,6 @@ def setup():
led(1) # Turn off LED, it is inverted

def main():
common.loop(CLIENT_ID, setup_fn=setup, loop_fn=[read_dht], callback=sub_cb, subtopic=[SUBTOPIC])
common.loop(setup_fn=setup, loop_fn=[read_dht], callback=sub_cb, subtopic=[SUBTOPIC])

main()
@@ -64,7 +64,7 @@ def setup():
sw.irq(trigger=Pin.IRQ_FALLING, handler=btn_callback)

def main():
common.loop(CLIENT_ID, setup_fn=setup, loop_fn=[], callback=sub_cb, subtopic=[SUBTOPIC])
common.loop(setup_fn=setup, loop_fn=[], callback=sub_cb, subtopic=[SUBTOPIC])

e = Encoder(4, 0, min_val=1, max_val=MAX_STEPS_ENCODER, callback=rotary_cb) # d2, d3 => order matters for rotation direction
main()

0 comments on commit 219e560

Please sign in to comment.
You can’t perform that action at this time.