You've already forked MicroPythonOS
mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
wificonf: show more feedback to user
This commit is contained in:
@@ -89,4 +89,16 @@ If you made a 'devbuild', then you probably want to install all files and apps m
|
||||
~/sources/PiggyOS/scripts/install.sh
|
||||
```
|
||||
|
||||
|
||||
Release checklist
|
||||
=================
|
||||
- Make sure CURRENT_OS_VERSION in main.py is incremented
|
||||
- Make sure version numbers of apps that have been changed are incremented
|
||||
- commit and push all code
|
||||
- ./scripts/bundle_apps.sh
|
||||
- ./scripts/freezefs_mount_builtin.sh
|
||||
- ./scripts/build_lvgl_micropython.sh
|
||||
- copy_apps_to_server.sh
|
||||
- copy_build_to_server.sh
|
||||
- copy ~/sources/lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin to webinstaller
|
||||
- update manifest of webinstaller
|
||||
- push webinstaller
|
||||
|
||||
@@ -11,7 +11,6 @@ import _thread
|
||||
|
||||
ssids=[]
|
||||
busy_scanning=False
|
||||
|
||||
busy_connecting=False
|
||||
|
||||
access_points={}
|
||||
@@ -67,7 +66,7 @@ def save_config():
|
||||
|
||||
def scan_done_callback():
|
||||
print("scan_done_callback called")
|
||||
global busy_scanning, scan_button_label
|
||||
global busy_scanning, scan_button_label, scan_button
|
||||
refresh_list()
|
||||
scan_button_label.set_text(scan_button_scan_text)
|
||||
scan_button.add_flag(lv.obj.FLAG.CLICKABLE)
|
||||
@@ -104,14 +103,18 @@ def start_scan_networks():
|
||||
|
||||
def attempt_connecting_done(ssid, result):
|
||||
print(f"Connecting to {ssid} got result: {result}")
|
||||
global busy_connecting
|
||||
global busy_connecting, scan_button_label, scan_button
|
||||
refresh_list(ssid, result)
|
||||
busy_connecting=False
|
||||
scan_button_label.set_text(scan_button_scan_text)
|
||||
scan_button.add_flag(lv.obj.FLAG.CLICKABLE)
|
||||
|
||||
|
||||
def attempt_connecting(ssid,password):
|
||||
print(f"attempt_connecting: Attempting to connect to SSID: {ssid}")
|
||||
result="connected"
|
||||
try:
|
||||
wlan.disconnect()
|
||||
wlan.connect(ssid,password)
|
||||
for i in range(10):
|
||||
if wlan.isconnected():
|
||||
@@ -124,12 +127,14 @@ def attempt_connecting(ssid,password):
|
||||
except Exception as e:
|
||||
print(f"attempt_connecting: Connection error: {e}")
|
||||
result=f"{e}"
|
||||
show_error("Connection failed")
|
||||
show_error("Connecting to {ssid} failed!")
|
||||
attempt_connecting_done(ssid, result)
|
||||
|
||||
def start_attempt_connecting(ssid,password):
|
||||
print(f"start_attempt_connecting: Attempting to connect to SSID: {ssid}")
|
||||
global busy_connecting
|
||||
global busy_connecting, scan_button_label, scan_button
|
||||
scan_button.remove_flag(lv.obj.FLAG.CLICKABLE)
|
||||
scan_button_label.set_text(f"Connecting to {ssid}...")
|
||||
if busy_connecting:
|
||||
print("Not attempting connect because busy_connecting.")
|
||||
else:
|
||||
@@ -274,7 +279,7 @@ def create_ui():
|
||||
global aplist,appscreen,error_label,scan_button_label,scan_button
|
||||
print("create_ui: Creating list widget")
|
||||
aplist=lv.list(appscreen)
|
||||
aplist.set_size(lv.pct(100),180)
|
||||
aplist.set_size(lv.pct(100),lv.pct(80))
|
||||
aplist.align(lv.ALIGN.TOP_MID,0,0)
|
||||
print("create_ui: Creating error label")
|
||||
error_label=lv.label(appscreen)
|
||||
@@ -283,7 +288,7 @@ def create_ui():
|
||||
error_label.add_flag(lv.obj.FLAG.HIDDEN)
|
||||
print("create_ui: Creating Scan button")
|
||||
scan_button=lv.button(appscreen)
|
||||
scan_button.set_size(100,30)
|
||||
scan_button.set_size(lv.SIZE_CONTENT,lv.pct(15))
|
||||
scan_button.align(lv.ALIGN.BOTTOM_MID,0,-5)
|
||||
scan_button_label=lv.label(scan_button)
|
||||
scan_button_label.set_text(scan_button_scan_text)
|
||||
|
||||
@@ -3,7 +3,7 @@ import task_handler
|
||||
import machine
|
||||
|
||||
# Constants
|
||||
CURRENT_OS_VERSION = "0.0.1"
|
||||
CURRENT_OS_VERSION = "0.0.3"
|
||||
TFT_HOR_RES=320
|
||||
TFT_VER_RES=240
|
||||
NOTIFICATION_BAR_HEIGHT=24
|
||||
|
||||
Reference in New Issue
Block a user