File tree Expand file tree Collapse file tree 3 files changed +16
-9
lines changed Expand file tree Collapse file tree 3 files changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -894,7 +894,10 @@ STATIC mp_obj_t ugfx_demo(mp_obj_t hacking) {
894
894
#ifdef UNIX
895
895
mp_hal_delay_ms (EMU_EINK_SCREEN_DELAY_MS );
896
896
#endif
897
+ uint8_t target_lut_backup = target_lut ;
898
+ target_lut = 0xff ;
897
899
gdispFlush ();
900
+ target_lut = target_lut_backup ;
898
901
899
902
return mp_const_none ;
900
903
}
Original file line number Diff line number Diff line change 20
20
def draw (mode , goingToSleep = False ):
21
21
if mode :
22
22
# We flush the buffer and wait
23
- ugfx .flush (ugfx .LUT_FULL )
23
+ ugfx .flush (ugfx .GREYSCALE )
24
24
else :
25
25
# We prepare the screen refresh
26
26
ugfx .clear (ugfx .WHITE )
@@ -162,16 +162,20 @@ def onSleep(idleTime):
162
162
if not easywifi .failure ():
163
163
spoc .show (False ) # Check sponsors
164
164
165
- if not badge .safe_mode ():
166
- services .setup (draw ) # Start services
167
-
168
- draw (False )
169
- services .force_draw ()
170
- draw (True )
165
+ if badge .safe_mode ():
166
+ draw (False )
167
+ services .force_draw ()
168
+ draw (True )
169
+ else :
170
+ have_services = services .setup (draw ) # Start services
171
+ if not have_services :
172
+ draw (False )
173
+ services .force_draw ()
174
+ draw (True )
171
175
172
176
easywifi .disable ()
173
177
gc .collect ()
174
-
178
+
175
179
virtualtimers .activate (25 )
176
180
pm .callback (onSleep )
177
181
pm .feed ()
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ def setup(drawCb=None):
27
27
try :
28
28
apps = uos .listdir ('lib' )
29
29
except OSError :
30
- return [ False , False ]
30
+ return False
31
31
32
32
#For each app...
33
33
for app in apps :
You can’t perform that action at this time.
0 commit comments