linting
This commit is contained in:
parent
64b3061294
commit
e2b8a9527a
2 changed files with 16 additions and 16 deletions
|
|
@ -68,19 +68,19 @@ while True:
|
|||
continue
|
||||
|
||||
if command:
|
||||
if code == REMOTE_FORWARD:
|
||||
play_audio("fan_forward.wav")
|
||||
motor_a.throttle = 1 # full speed forward
|
||||
pixels.fill((255,0,0))
|
||||
elif code == REMOTE_BACKWARD:
|
||||
play_audio("fan_backward.wav")
|
||||
motor_a.throttle = -1 # full speed backward
|
||||
pixels.fill((0,0,255))
|
||||
elif code == REMOTE_PAUSE:
|
||||
motor_a.throttle = 0 # stop motor
|
||||
play_audio("fan_stopped.wav")
|
||||
pixels.fill((0,0,0))
|
||||
time.sleep(0.5)
|
||||
if code == REMOTE_FORWARD:
|
||||
play_audio("fan_forward.wav")
|
||||
motor_a.throttle = 1 # full speed forward
|
||||
pixels.fill((255,0,0))
|
||||
elif code == REMOTE_BACKWARD:
|
||||
play_audio("fan_backward.wav")
|
||||
motor_a.throttle = -1 # full speed backward
|
||||
pixels.fill((0,0,255))
|
||||
elif code == REMOTE_PAUSE:
|
||||
motor_a.throttle = 0 # stop motor
|
||||
play_audio("fan_stopped.wav")
|
||||
pixels.fill((0,0,0))
|
||||
time.sleep(0.5)
|
||||
|
||||
# play yayayay every 3 seconds
|
||||
if (time.monotonic() - t > 3) and motor_a.throttle != 0:
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ from debouncer import Debouncer
|
|||
from directory_node import DirectoryNode
|
||||
from emulator import Emulator
|
||||
|
||||
# pylint disable=global-statement
|
||||
# pylint: disable=global-statement
|
||||
# --------------------------------------------------------------------------------
|
||||
# Initialize Rotary encoder
|
||||
|
||||
|
|
@ -121,7 +121,7 @@ def display_emulating_screen():
|
|||
oled.show()
|
||||
|
||||
|
||||
# pylint disable=global-statement
|
||||
# pylint: disable=global-statement
|
||||
def emulate():
|
||||
global current_mode
|
||||
data = load_file(current_dir.selected_filepath)
|
||||
|
|
@ -131,7 +131,7 @@ def emulate():
|
|||
display_emulating_screen()
|
||||
|
||||
|
||||
# pylint disable=global-statement
|
||||
# pylint: disable=global-statement
|
||||
def program():
|
||||
global current_mode
|
||||
emulator.enter_program_mode()
|
||||
|
|
|
|||
Loading…
Reference in a new issue