Skip to content

Commit

Permalink
Fix #12
Browse files Browse the repository at this point in the history
Correct the description of the UI and remove the shebang from the
joystick example.
  • Loading branch information
waveform80 committed Sep 13, 2016
1 parent dd47b84 commit 1e25c3c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
29 changes: 15 additions & 14 deletions docs/sense_emu_gui.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ Usage
.. image:: gui_overview.png
:align: center

The main window is divided into four parts. At the top left is a visual
The main window is divided into four parts. At the left is a visual
representation of the Sense HAT. Scripts using the emulator library
(:mod:`sense_emu`) to set the HAT's LEDs will display the result here.
Immediately below the LEDs are the rotation buttons which rotate the view of
the HAT. These buttons also affect the action of the joystick buttons (covered
below).

At the top right, three sliders represent the temperature, pressure, and
humidity of the emulated HAT's environment.
To the right of the LEDs are three sliders representing the temperature,
pressure, and humidity of the emulated HAT's environment.

.. note::

Expand All @@ -38,22 +38,22 @@ humidity of the emulated HAT's environment.
the sensor value will gradually drift towards the new setting at a similar
rate to the sensors on the real HAT.

At the bottom right of the window, a series of buttons are provided to emulate
the joystick on the HAT. The buttons will simulate *press*, *release*, and
*hold* events generated by the real joystick. When the view of the HAT is
On the far right of the window, three sliders provide the orientation of the
emulated HAT in terms of yaw (rotation around the vertical Z axis), pitch
(rotation around the Y axis), and roll (rotation around the X axis). Adjusting
these sliders affect the accelerometer, gyroscope, and magnetometer (compass)
sensors on the emulated HAT. The emulated HAT assumes gravity runs vertically
in the direction of the Z axis (as in the real HAT), and that North is in the
direction of the X axis.

Finally, at the bottom right of the window, a series of buttons are provided to
emulate the joystick on the HAT. The buttons will simulate *press*, *release*,
and *hold* events generated by the real joystick. When the view of the HAT is
rotated, the joystick buttons will act in the new orientation of the HAT. For
example, initially the "up" button will send "up" events. After the HAT is
rotated 90° the "up" button will send "right" events. After another 90°
rotation, the "up" button will send "down" events, and so on.

Finally, at the bottom left of the window, three sliders provide the
orientation of the emulated HAT in terms of yaw (rotation around the vertical Z
axis), pitch (rotation around the Y axis), and roll (rotation around the X
axis). Adjusting these sliders affect the accelerometer, gyroscope, and
magnetometer (compass) sensors on the emulated HAT. The emulated HAT assumes
gravity runs vertically in the direction of the Z axis (as in the real HAT),
and that North is in the direction of the X axis.

.. note::

The emulator must be run prior to starting any scripts which expect to use
Expand Down Expand Up @@ -95,3 +95,4 @@ During playback, the sensor sliders will move according to the data in the
recording but will be disabled (to prevent the user affecting the replay). At
the end of the replay (or immediately after termination of playback), the
sliders will be left at their present positions and re-enabled.

1 change: 0 additions & 1 deletion sense_emu/examples/intermediate/joystick_loop.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/python3
from sense_emu import SenseHat

x = y = 4
Expand Down

0 comments on commit 1e25c3c

Please sign in to comment.