[v1.0] hotspot

This commit is contained in:
IrvingGao 2024-05-25 23:04:33 +08:00
parent c4d3a9ef4f
commit f6ee8b1125
1 changed files with 6 additions and 13 deletions

View File

@ -244,26 +244,19 @@ 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')
@ -271,9 +264,9 @@ if __name__ == '__main__':
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)
'''