|
@@ -160,7 +160,7 @@ class LCD:
|
|
|
self.clear()
|
|
|
self.__set_lcd_direction()
|
|
|
self.clear()
|
|
|
- self.print(buffer)
|
|
|
+ self.print(str(buffer))
|
|
|
|
|
|
@property
|
|
|
def lcd_line_mode(self):
|
|
@@ -218,7 +218,7 @@ class LCD:
|
|
|
|
|
|
@staticmethod
|
|
|
def __reset_pin(pin: int|str):
|
|
|
- Pin(pin, Pin.IN, None)
|
|
|
+ Pin(pin, Pin.IN, pull=None)
|
|
|
|
|
|
@staticmethod
|
|
|
def __check_lcd_brightness(lcd_brightness: int):
|
|
@@ -499,7 +499,7 @@ class LCD:
|
|
|
elif len(text) == 0:
|
|
|
raise ValueError(f"Value \"{text}\" of \"text\" is out of range!")
|
|
|
|
|
|
- keys = ("row", "column", "auto_line_break")
|
|
|
+ keys = ["row", "column", "auto_line_break"]
|
|
|
keys = self.__check_keywords(keywords, keys)
|
|
|
rows = keys["rows"]
|
|
|
row = keys["row"]
|
|
@@ -548,7 +548,7 @@ class LCD:
|
|
|
buffer.append(self.__lcd_control_para["CONTROL_BYTE"])
|
|
|
buffer.append(self.__lcd_control_para["CLEAR_DISPLAY"])
|
|
|
else:
|
|
|
- keys = ("row", "column")
|
|
|
+ keys = ["row", "column"]
|
|
|
keys = self.__check_keywords(keywords, keys)
|
|
|
row = keys["row"]
|
|
|
column = keys["column"]
|
|
@@ -569,6 +569,10 @@ class LCD:
|
|
|
row (int): Row to start reading from. Defaults to 1.
|
|
|
column (int): Column to start reading from. Defaults to 1.
|
|
|
separate (int | bool): Separate each line into a list. Defaults to False.
|
|
|
+
|
|
|
+ Returns:
|
|
|
+ list: (separate=True) Returns each line into a list of separate strings.
|
|
|
+ str: (separate=False) Returns all lines as one string.
|
|
|
"""
|
|
|
|
|
|
def remove_whitespace(text: str):
|
|
@@ -581,7 +585,7 @@ class LCD:
|
|
|
break
|
|
|
return text[:endpos]
|
|
|
|
|
|
- keys = ("row", "column", "separate")
|
|
|
+ keys = ["row", "column", "separate"]
|
|
|
keys = self.__check_keywords(keywords, keys)
|
|
|
rows = keys["rows"]
|
|
|
row = keys["row"]
|