diff --git a/Code/Control/Laptop_Code/Figs/Xbox-360_controller.svg.png b/Code/Control/Laptop_Code/Figs/Xbox-360_controller.svg.png new file mode 100644 index 0000000000000000000000000000000000000000..8f5229dc4d2a61153606f06d7d3578aa50abd519 Binary files /dev/null and b/Code/Control/Laptop_Code/Figs/Xbox-360_controller.svg.png differ diff --git a/Code/Control/Laptop_Code/Figs/joystick_flowchart.jpg b/Code/Control/Laptop_Code/Figs/joystick_flowchart.jpg new file mode 100644 index 0000000000000000000000000000000000000000..fffe1db11db751f20ad85154db43a460db929ee3 Binary files /dev/null and b/Code/Control/Laptop_Code/Figs/joystick_flowchart.jpg differ diff --git a/Code/Control/Laptop_Code/README.md b/Code/Control/Laptop_Code/README.md index 845e17a57dd345dc824cfb7973920bf23e921e4b..9df75ecb1af25cecd663c2f0e842cf0c642bd681 100644 --- a/Code/Control/Laptop_Code/README.md +++ b/Code/Control/Laptop_Code/README.md @@ -81,15 +81,23 @@ pip install detecto==1.2.1 There are two files about main code: - constants.py: it stores global variables that can be changed easily - +- main_joystick.py: it has the joystick control and it contains all the functions that we need. - main_keyboard: it has keyboard interruption and it contains all the functions that we need. ### 3.1 Flowchart +#### 3.1.1 main_keyboard flowchart +  +#### 3.1.2 main_joystick flowchart + + + ### 3.2 Functions name and their inputs outputs +not yet finish + All function: ``` @@ -134,3 +142,21 @@ auto_init() """ ``` +### 3.3 Joystick control description + + + +- Button A: auto control + - Button B: manually determine ball capture status + - Button X: manually determine no ball capture + - Button Y: let the basket LIDAR to determine if ball has been captured + - Left trigger: prevent blimp from moving too high + - Right trigger: prevent blimp from moving too low +- Button Back: go back to upper level +- Button start: test the camera core function +- Left bumper: manual control + - Left stick: horizontal motion control + - Right stick: vertical motion control +- Right bumper: stop all motors +- Left bumper + Right bumper: kill the program +