update check wifi connetction

This commit is contained in:
IrvingGao 2024-05-25 00:29:26 +08:00
parent dc8ba69b8d
commit 20f4f4316b
1 changed files with 1 additions and 2 deletions

View File

@ -25,6 +25,7 @@ except ImportError:
def close_app():
orangepi.set_led_off('red')
# 获取当前Flask应用程序的进程ID
flask_pid = os.getpid()
@ -173,11 +174,9 @@ def submit():
time.sleep(5)
# 检查是否成功连接Wi-Fi
if check_wifi_connection() and connected:
orangepi.set_led_off('red')
# connected successfully, close flask
close_app()
else:
print(f"{datetime.datetime.now()}: Wi-Fi连接失败。")
restart_hotspot()