adds the correct driver, as the IL driver wasn't cut out for the job

This commit is contained in:
Robert Schauklies 2025-10-11 22:40:39 +02:00
parent 5ed20aef7f
commit bb33920af9
4 changed files with 1275 additions and 72 deletions

View file

@ -204,7 +204,8 @@ class ILI9341:
if not 0 <= x < self.width or not 0 <= y < self.height:
return
self._writeblock(x, y, x, y, ustruct.pack(">H", color))
def fill(self,color):
self.fill_rectangle(0,0,self.width,self.height,color=color)
def fill_rectangle(self, x, y, w, h, color=None):
x = min(self.width - 1, max(0, x))
y = min(self.height - 1, max(0, y))
@ -305,7 +306,8 @@ class ILI9341:
if written<len(text):
curx = self.chars(text[written:], curx,cury)
self._x = curx; self._y = cury
def show(self):
return
def print(self, text): #does word wrap, leaves self._x unchanged
cury = self._y; curx = self._x
@ -325,3 +327,5 @@ class ILI9341:
curx = self.chars(word+' ', curx,cury)
curx = self._x; cury = self.next_line(cury,char_h)
self._y = cury
def text(self,text):
self.print(text)