@@ -189,7 +189,7 @@ def __init__(self, *, url=None, json_path=None, regexp_path=None,
189
189
esp32_cs = DigitalInOut (board .ESP_CS )
190
190
spi = busio .SPI (board .SCK , board .MOSI , board .MISO )
191
191
192
- if not self ._uselocal :
192
+ if url and not self ._uselocal :
193
193
self ._esp = adafruit_esp32spi .ESP_SPIcontrol (spi , esp32_cs , esp32_ready ,
194
194
esp32_reset , esp32_gpio0 )
195
195
#self._esp._debug = 1
@@ -229,7 +229,7 @@ def __init__(self, *, url=None, json_path=None, regexp_path=None,
229
229
230
230
if self ._debug :
231
231
print ("Init display" )
232
- self .splash = displayio .Group (max_size = 5 )
232
+ self .splash = displayio .Group (max_size = 15 )
233
233
board .DISPLAY .show (self .splash )
234
234
235
235
if self ._debug :
@@ -305,10 +305,8 @@ def __init__(self, *, url=None, json_path=None, regexp_path=None,
305
305
if self ._debug :
306
306
print ("Init touchscreen" )
307
307
# pylint: disable=no-member
308
- self .touchscreen = adafruit_touchscreen .Touchscreen (microcontroller .pin .PB01 ,
309
- microcontroller .pin .PB08 ,
310
- microcontroller .pin .PA06 ,
311
- microcontroller .pin .PB00 ,
308
+ self .touchscreen = adafruit_touchscreen .Touchscreen (board .TOUCH_XL , board .TOUCH_XR ,
309
+ board .TOUCH_YD , board .TOUCH_YU ,
312
310
calibration = ((5200 , 59000 ),
313
311
(5800 , 57000 )),
314
312
size = (320 , 240 ))
@@ -805,7 +803,9 @@ def wrap_nicely(string, max_chars):
805
803
the_line = ""
806
804
for w in words :
807
805
if len (the_line + ' ' + w ) <= max_chars :
808
- the_line += ' ' + w
806
+ if the_lines :
807
+ the_line += ' '
808
+ the_line += w
809
809
else :
810
810
the_lines .append (the_line )
811
811
the_line = '' + w
0 commit comments