File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed
42099-off-roader/powered-up-remote
42124-off-road-buggy/powered-up-remote Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 2929 # Check which buttons are pressed.
3030 pressed = remote .buttons .pressed ()
3131
32- # Choose the steer angle based on the left controls.
32+ # Choose the steer angle based on the right controls.
3333 steer_angle = 0
34- if Button .LEFT_PLUS in pressed :
34+ if Button .RIGHT_MINUS in pressed :
3535 steer_angle -= 75
36- if Button .LEFT_MINUS in pressed :
36+ if Button .RIGHT_PLUS in pressed :
3737 steer_angle += 75
3838
3939 # Steer to the selected angle.
4040 steer .run_target (500 , steer_angle , wait = False )
4141
42- # Choose the drive speed based on the right controls.
42+ # Choose the drive speed based on the left controls.
4343 drive_speed = 0
44- if Button .RIGHT_PLUS in pressed :
44+ if Button .LEFT_PLUS in pressed :
4545 drive_speed += 1000
46- if Button .RIGHT_MINUS in pressed :
46+ if Button .LEFT_MINUS in pressed :
4747 drive_speed -= 1000
4848
4949 # Apply the selected speed.
Original file line number Diff line number Diff line change 2727 # Check which buttons are pressed.
2828 pressed = remote .buttons .pressed ()
2929
30- # Choose the steer angle based on the left controls.
30+ # Choose the steer angle based on the right controls.
3131 steer_angle = 0
32- if Button .LEFT_PLUS in pressed :
32+ if Button .RIGHT_MINUS in pressed :
3333 steer_angle -= 75
34- if Button .LEFT_MINUS in pressed :
34+ if Button .RIGHT_PLUS in pressed :
3535 steer_angle += 75
3636
3737 # Steer to the selected angle.
3838 steer .run_target (500 , steer_angle , wait = False )
3939
40- # Choose the drive speed based on the right controls.
40+ # Choose the drive speed based on the left controls.
4141 drive_speed = 0
42- if Button .RIGHT_PLUS in pressed :
42+ if Button .LEFT_PLUS in pressed :
4343 drive_speed += 1000
44- if Button .RIGHT_MINUS in pressed :
44+ if Button .LEFT_MINUS in pressed :
4545 drive_speed -= 1000
4646
4747 # Apply the selected speed.
You can’t perform that action at this time.
0 commit comments