File tree Expand file tree Collapse file tree 2 files changed +7
-14
lines changed
Expand file tree Collapse file tree 2 files changed +7
-14
lines changed Original file line number Diff line number Diff line change 55 import network
66except Exception as e :
77 have_network = False
8- print ("auto_connect.py could not import network, have_network=False" )
8+ print ("Could not import network, have_network=False" )
99
1010import ujson
1111import os
Original file line number Diff line number Diff line change @@ -205,21 +205,14 @@ def parse_manifest(manifest_path):
205205
206206
207207def auto_connect ():
208- # A generic "start at boot" mechanism hasn't been implemented yet, so do it like this:
209- custom_auto_connect = "apps/com.example.wificonf/assets/auto_connect.py"
210- builtin_auto_connect = "builtin/apps/com.example.wificonf/assets/auto_connect.py"
211- # Maybe start_app_by_name() and start_app_by_name() could be merged so the try-except logic is not duplicated...
208+ builtin_auto_connect = "builtin/system/WifiService.py"
212209 try :
213- stat = uos .stat (custom_auto_connect )
214- execute_script_new_thread (custom_auto_connect , True )
210+ print (f"Starting { builtin_auto_connect } ..." )
211+ stat = uos .stat (builtin_auto_connect )
212+ execute_script_new_thread (builtin_auto_connect , True )
215213 except Exception as e :
216- try :
217- print (f"Couldn't execute { custom_auto_connect } because exception { e } , trying { builtin_auto_connect } ..." )
218- stat = uos .stat (builtin_auto_connect )
219- execute_script_new_thread (builtin_auto_connect , True )
220- except Exception as e :
221- print ("Couldn't execute {builtin_auto_connect} because exception {e}, continuing..." )
222-
214+ print ("Couldn't execute {builtin_auto_connect} because exception {e}, continuing..." )
215+
223216
224217class Activity :
225218
You can’t perform that action at this time.
0 commit comments