mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-10-01 03:43:46 +08:00
Flake8 E22X (#1607)
* e221 * e225 * bump opendbc old-commit-hash: 6051061ff8e7809960cc1f2bad9a582801d5a83e
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
import pygame # pylint: disable=import-error
|
||||
|
||||
# Define some colors
|
||||
BLACK = ( 0, 0, 0)
|
||||
WHITE = ( 255, 255, 255)
|
||||
BLACK = ( 0, 0, 0)
|
||||
WHITE = ( 255, 255, 255)
|
||||
|
||||
# This is a simple class that will help us print to the screen
|
||||
# It has nothing to do with the joysticks, just outputting the
|
||||
@@ -55,7 +55,7 @@ while not done:
|
||||
# EVENT PROCESSING STEP
|
||||
for event in pygame.event.get(): # User did something
|
||||
if event.type == pygame.QUIT: # If user clicked close
|
||||
done=True # Flag that we are done so we exit this loop
|
||||
done = True # Flag that we are done so we exit this loop
|
||||
|
||||
# Possible joystick actions: JOYAXISMOTION JOYBALLMOTION JOYBUTTONDOWN JOYBUTTONUP JOYHATMOTION
|
||||
if event.type == pygame.JOYBUTTONDOWN:
|
||||
|
||||
@@ -312,19 +312,19 @@ def keyboard_controller_thread(q, route_start_time):
|
||||
kb = KBHit()
|
||||
while 1:
|
||||
c = kb.getch()
|
||||
if c=='m': # Move forward by 1m
|
||||
if c == 'm': # Move forward by 1m
|
||||
q.send_pyobj(SeekRelativeTime(60))
|
||||
elif c=='M': # Move backward by 1m
|
||||
elif c == 'M': # Move backward by 1m
|
||||
q.send_pyobj(SeekRelativeTime(-60))
|
||||
elif c=='s': # Move forward by 10s
|
||||
elif c == 's': # Move forward by 10s
|
||||
q.send_pyobj(SeekRelativeTime(10))
|
||||
elif c=='S': # Move backward by 10s
|
||||
elif c == 'S': # Move backward by 10s
|
||||
q.send_pyobj(SeekRelativeTime(-10))
|
||||
elif c=='G': # Move backward by 10s
|
||||
elif c == 'G': # Move backward by 10s
|
||||
q.send_pyobj(SeekAbsoluteTime(0.))
|
||||
elif c=="\x20": # Space bar.
|
||||
elif c == "\x20": # Space bar.
|
||||
q.send_pyobj(TogglePause())
|
||||
elif c=="\n":
|
||||
elif c == "\n":
|
||||
try:
|
||||
seek_time_input = input('time: ')
|
||||
seek_time = absolute_time_str(seek_time_input, route_start_time)
|
||||
|
||||
Reference in New Issue
Block a user