v.0.4.6 screen_text param display
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from machine import Pin, RTC
|
||||
from neopixel import NeoPixel
|
||||
from .fonts.fonts_utils import char_width as charwidth
|
||||
from machine import Pin, RTC # type: ignore
|
||||
from neopixel import NeoPixel # type: ignore
|
||||
from .fonts import char_width as charwidth
|
||||
|
||||
from .fonts.font_5x7 import font_5x7
|
||||
from ..utils.colors import GRAY, RAINBOW, BLACK, WHITE, LIME
|
||||
@@ -104,7 +104,9 @@ class NeoPixel_64x64(NeoPixel):
|
||||
[
|
||||
# print(xpos, ypos)
|
||||
self.set_pixel(xpos, ypos, GRAY)
|
||||
for xpos in range(x, x + char_width) # 8 because full with of character representation
|
||||
for xpos in range(
|
||||
x, x + char_width
|
||||
) # 8 because full with of character representation
|
||||
for ypos in range(y, y + self.font_height)
|
||||
]
|
||||
|
||||
@@ -149,7 +151,9 @@ class NeoPixel_64x64(NeoPixel):
|
||||
|
||||
self.write()
|
||||
|
||||
def vertical_floating_text(self, text, x, color=RAINBOW[0], float_range=3, speed=0.2, duration=10):
|
||||
def vertical_floating_text(
|
||||
self, text, x, color=RAINBOW[0], float_range=3, speed=0.2, duration=10
|
||||
):
|
||||
"""
|
||||
Vertical floating text animation
|
||||
|
||||
@@ -180,7 +184,9 @@ class NeoPixel_64x64(NeoPixel):
|
||||
self.write()
|
||||
time.sleep(0.05)
|
||||
|
||||
def horizontal_floating_text(self, text, y, color=RAINBOW[0], float_range=3, speed=0.2, duration=10):
|
||||
def horizontal_floating_text(
|
||||
self, text, y, color=RAINBOW[0], float_range=3, speed=0.2, duration=10
|
||||
):
|
||||
"""
|
||||
Horizontal floating text animation
|
||||
|
||||
|
||||
Reference in New Issue
Block a user