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.
Diff: DualShockMod.cpp
- Revision:
- 2:9dae549ae1b4
- Parent:
- 1:8a67adccebd9
diff -r 8a67adccebd9 -r 9dae549ae1b4 DualShockMod.cpp
--- a/DualShockMod.cpp Wed Sep 18 14:14:01 2019 +0000
+++ b/DualShockMod.cpp Thu Sep 19 14:31:17 2019 +0000
@@ -52,10 +52,10 @@
posX = ((dat[1]<<7) + dat[2]);
}
if(dat[0] & 0b00000001){ //Yが負であるビット
- posY = (int)((dat[3]<<7) + dat[4])*-1;
+ posY = (int)((dat[3]<<7) + dat[4]);
}
else{
- posY = (dat[3]<<7) + dat[4];
+ posY = (dat[3]<<7) + dat[4]*-1;
}
}
dat[0] = 0;