From fe3a2456603bff38a091da1e8a1f07cd90dfbe37 Mon Sep 17 00:00:00 2001 From: dherrada Date: Fri, 20 Aug 2021 13:46:30 -0400 Subject: [PATCH] Linted --- .../cpx_acceleration_neopixels/code.py | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/CircuitPython_Made_Easy_On_CPX/cpx_acceleration_neopixels/code.py b/CircuitPython_Made_Easy_On_CPX/cpx_acceleration_neopixels/code.py index 813b38319..9b4b8c206 100644 --- a/CircuitPython_Made_Easy_On_CPX/cpx_acceleration_neopixels/code.py +++ b/CircuitPython_Made_Easy_On_CPX/cpx_acceleration_neopixels/code.py @@ -7,16 +7,15 @@ while True: print("Slide switch off!") cpx.pixels.fill((0, 0, 0)) continue - else: - R = 0 - G = 0 - B = 0 - x, y, z = cpx.acceleration - print((x, y, z)) - if x: - R = R + abs(int(x)) - if y: - G = G + abs(int(y)) - if z: - B = B + abs(int(z)) - cpx.pixels.fill((R, G, B)) + R = 0 + G = 0 + B = 0 + x, y, z = cpx.acceleration + print((x, y, z)) + if x: + R = R + abs(int(x)) + if y: + G = G + abs(int(y)) + if z: + B = B + abs(int(z)) + cpx.pixels.fill((R, G, B))