@@ -541,7 +541,7 @@ def umount(self) -> None:
541
541
542
542
_boot_options = (
543
543
(
544
- 0 ,
544
+ 2 ,
545
545
ImageDesc (
546
546
src = "/system/core2/Setting/bootNo.png" ,
547
547
x = 4 + 60 + 3 ,
@@ -937,10 +937,7 @@ def mount(self):
937
937
self ._mac_label .setText (data [0 ])
938
938
self ._account_label .setText (str (data [1 ]))
939
939
940
- if self .avatar == "/system/common/img/avatar.jpg" :
941
- M5 .Lcd .drawJpg (self .avatar , 130 , 180 , 60 , 60 )
942
- else :
943
- M5 .Lcd .drawJpg (self .avatar , 130 , 180 , 56 , 56 , 0 , 0 , 0.28 , 0.28 )
940
+ M5 .Lcd .drawJpg (self .avatar , 130 , 180 , 56 , 56 , 0 , 0 , 0.28 , 0.28 )
944
941
945
942
def load_data (self ):
946
943
mac = binascii .hexlify (machine .unique_id ()).upper ()
@@ -958,7 +955,6 @@ def load_data(self):
958
955
if len (infos [4 ]) is 0 :
959
956
self .avatar = "/system/common/img/avatar.jpg"
960
957
else :
961
- # FIXME: avatar.jpg path is not right
962
958
self .avatar = "/system/common/" + str (infos [4 ]).split ("/" )[- 1 ]
963
959
964
960
try :
@@ -1073,7 +1069,7 @@ def _handle_run_once(self):
1073
1069
1074
1070
def _handle_run_always (self ):
1075
1071
nvs = esp32 .NVS ("uiflow" )
1076
- nvs .set_u8 ("boot_option" , 0 )
1072
+ nvs .set_u8 ("boot_option" , 2 )
1077
1073
nvs .commit ()
1078
1074
machine .reset ()
1079
1075
@@ -1383,7 +1379,7 @@ def _btn_once_event_handler(self, event):
1383
1379
def _btn_always_event_handler (self , event ):
1384
1380
DEBUG and print ("run always" )
1385
1381
nvs = esp32 .NVS ("uiflow" )
1386
- nvs .set_u8 ("boot_option" , 0 )
1382
+ nvs .set_u8 ("boot_option" , 2 )
1387
1383
nvs .commit ()
1388
1384
with open ("apps/" + self ._files [self ._file_pos ], "rb" ) as f_src , open (
1389
1385
"main.py" , "wb"
0 commit comments