[v1.0] hotspot
This commit is contained in:
parent
c4d3a9ef4f
commit
f6ee8b1125
|
@ -244,36 +244,29 @@ def submit():
|
|||
|
||||
|
||||
if __name__ == '__main__':
|
||||
debug_mode = True # 设置为 True 以跳过 Wi-Fi 连接状态检测
|
||||
debug_mode = False # 设置为 True 以跳过 Wi-Fi 连接状态检测
|
||||
if debug_mode:
|
||||
disconnect_wifi()
|
||||
|
||||
wifi_list = scan_wifi()
|
||||
print(wifi_list)
|
||||
|
||||
start_hotspot()
|
||||
|
||||
app.run(host='0.0.0.0', port=80)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# app.run(host='0.0.0.0', port=80)
|
||||
|
||||
if connect_wifi("Innoxsz-Public", "innox2023"):
|
||||
close_app()
|
||||
|
||||
'''
|
||||
if led_enabled:
|
||||
orangepi.set_led_on('blue')
|
||||
|
||||
|
||||
if check_wifi_connection():
|
||||
print(f"{datetime.datetime.now()}: 系统已自动连接到 Wi-Fi 网络,退出程序")
|
||||
close_app()
|
||||
else:
|
||||
wifi_list = scan_wifi()
|
||||
print(f"{datetime.datetime.now()}: 未连接到 Wi-Fi 网络")
|
||||
start_hotspot()
|
||||
app.run(host='0.0.0.0', port=80)
|
||||
|
||||
# 启动 Flask 服务器
|
||||
app.run(host='0.0.0.0', port=80)
|
||||
'''
|
||||
|
Loading…
Reference in New Issue