Update explanation theory of joystick control authored by Jeffrey George Fisher's avatar Jeffrey George Fisher
......@@ -20,6 +20,12 @@ Tank control will treat each thruster independently. It gets its name from tank
In tank control, we will use two joysticks. The left joystick vertical axis will control the left thruster, and the right joystick vertical axis will control the right thruster.
You need to write code that:
1. Reads input from two joysticks.
2. Maps the input to thrust for a single thruster (left joystick -> left thruster, right joystick -> right thruster). Thrust should be represented by a double precision floating point number in the range $[-100, 100]$.
3. Sends a `request-thrust` command message from your laptop to the Pi's command parser.
### Transformation
The `SDL` library returns joystick axes with the C type `int16_t`, which is a signed 16-bit integer. The range of that type is $\nobreak{[-2^{15}, 2^{15} - 1] = [-32768, 32767]}$ ($2^{15}$ rather than $2^{16}$ because it is a signed integer).
......
......