Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: FastAnalogIn FastIO FastPWM SimpleDMA USBDevice mbed
Fork of Pinscape_Controller by
Diff: main.cpp
- Revision:
- 8:c732e279ee29
- Parent:
- 7:100a25f8bf56
- Child:
- 9:fd65b0a94720
diff -r 100a25f8bf56 -r c732e279ee29 main.cpp
--- a/main.cpp Thu Aug 07 19:53:13 2014 +0000
+++ b/main.cpp Fri Aug 08 20:59:39 2014 +0000
@@ -1335,12 +1335,14 @@
x = xa;
y = ya;
- // Send the status report.
- //
- // $$$ button updates are for diagnostics, so we can see that the
- // device is sending data properly if the accelerometer gets stuck
- uint16_t btns = hb ? 0x5500 : 0xAA00;
- js.update(x, y, z, rxa, rya, btns);
+ // Send the status report. Note that the nominal x and y axes
+ // are reversed - this makes it more intuitive to set up in VP.
+ // If we mount the Freesale card flat on the floor of the cabinet
+ // with the USB connectors facing the front of the cabinet, this
+ // arrangement of our nominal axes aligns with VP's standard
+ // setting, so that we can configure VP with X Axis = X on the
+ // joystick and Y Axis = Y on the joystick.
+ js.update(y, x, z, rxa, rya, 0);
#ifdef DEBUG_PRINTF
if (x != 0 || y != 0)
