添加现有代码V1.6
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
# main.py -- put your code here!
|
||||
import time, gc, pyb
|
||||
|
||||
|
||||
print('main.py start')
|
||||
|
||||
from json_config import read_config
|
||||
conf = read_config()
|
||||
|
||||
# 看门狗
|
||||
pyb.Pin(pyb.Pin.cpu.E4, pyb.Pin.OUT_PP).value(0)
|
||||
|
||||
time.sleep(1)
|
||||
|
||||
# gc.threshold(10*1024)
|
||||
|
||||
if conf['daq_test']:
|
||||
from webserver_daq_test import ws_run
|
||||
ws_run()
|
||||
else:
|
||||
from webserver import ws_run
|
||||
ws_run()
|
||||
|
||||
|
||||
# 看门狗
|
||||
pyb.Pin(pyb.Pin.cpu.E4, pyb.Pin.OUT_PP).value(1)
|
||||
|
||||
|
||||
# 主线程休眠片刻(确保子线程启动),然后退出,进入 REPL
|
||||
time.sleep(1)
|
||||
|
||||
# 看门狗
|
||||
pyb.Pin(pyb.Pin.cpu.E4, pyb.Pin.OUT_PP).value(0)
|
||||
|
||||
# from daq_iap import iap_start
|
||||
# iap_start("/flash/daq_app_V8.5.0_26-03-07_09-12.bin")
|
||||
|
||||
if conf['daq_test']:
|
||||
from daq_test import daq_test_loop
|
||||
daq_test_loop()
|
||||
else:
|
||||
from scanner import scanner_loop
|
||||
scanner_loop()
|
||||
Reference in New Issue
Block a user