kopia lustrzana https://github.com/micropython/micropython-lib
drivers/led/neopixel: Fix formatting.
Signed-off-by: Tom Mount <tmountjr@gmail.com>pull/739/head
rodzic
9b5be62585
commit
6ca933b9f2
|
@ -9,24 +9,18 @@ def neopixel_test():
|
||||||
print("Verify the bytes to be written")
|
print("Verify the bytes to be written")
|
||||||
expected_bytearray = bytearray([255, 128, 64, 255, 128, 64, 255, 128, 64])
|
expected_bytearray = bytearray([255, 128, 64, 255, 128, 64, 255, 128, 64])
|
||||||
actual_bytearray = np.buf
|
actual_bytearray = np.buf
|
||||||
print(
|
print(f'Initial fill: {"passed" if expected_bytearray == actual_bytearray else "failed"}.')
|
||||||
f'Initial fill: {"passed" if expected_bytearray == actual_bytearray else "failed"}.'
|
|
||||||
)
|
|
||||||
print()
|
print()
|
||||||
|
|
||||||
print("Change brightness of all pixels.")
|
print("Change brightness of all pixels.")
|
||||||
np.brightness(0.5)
|
np.brightness(0.5)
|
||||||
expected_bytearray = bytearray([127, 64, 32, 127, 64, 32, 127, 64, 32])
|
expected_bytearray = bytearray([127, 64, 32, 127, 64, 32, 127, 64, 32])
|
||||||
actual_bytearray = np.buf
|
actual_bytearray = np.buf
|
||||||
print(
|
print(f'Brightness change: {"passed" if expected_bytearray == actual_bytearray else "failed"}.')
|
||||||
f'Brightness change: {"passed" if expected_bytearray == actual_bytearray else "failed"}.'
|
|
||||||
)
|
|
||||||
print()
|
print()
|
||||||
|
|
||||||
print("Get current brightness.")
|
print("Get current brightness.")
|
||||||
expected_brightness = 0.5
|
expected_brightness = 0.5
|
||||||
actual_brightness = np.brightness()
|
actual_brightness = np.brightness()
|
||||||
print(
|
print(f'Brightness get: {"passed" if expected_brightness == actual_brightness else "failed"}.')
|
||||||
f'Brightness get: {"passed" if expected_brightness == actual_brightness else "failed"}.'
|
|
||||||
)
|
|
||||||
print()
|
print()
|
||||||
|
|
Ładowanie…
Reference in New Issue