ソースを参照

Change order of operations for stability

DarkMorford 5 年 前
コミット
345e041b72
2 ファイル変更2 行追加2 行削除
  1. 1 1
      code/config.json.tmpl
  2. 1 1
      code/main.py

+ 1 - 1
code/config.json.tmpl

@@ -10,7 +10,7 @@
   "logic": {
     "sleep_time": 3,
     "active_time": 60,
-    "wake_threshold": 25
+    "wake_threshold": 50
   },
   "wifi": {
     "ssid": "DesertBus",

+ 1 - 1
code/main.py

@@ -73,9 +73,9 @@ while True:
             current_state = BTN_FWD_1
 
     led_red1.on()
+    input_handler.disable()
     wifi.active(True)
     wifi.connect(CONFIG['wifi']['ssid'], CONFIG['wifi']['password'])
-    input_handler.disable()
     start_time = utime.ticks_ms()
     activity_timeout.init(mode=machine.Timer.ONE_SHOT, callback=time_up,
                           period=CONFIG['logic']['active_time'] * 1000)