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: mbed
Fork of PS3_BlueUSB_user_ver_circlewarA by
Revision 20:18ae99ad72f7, committed 2016-03-31
- Comitter:
- baba2357
- Date:
- Thu Mar 31 00:39:51 2016 +0000
- Parent:
- 19:71f64ff1b86f
- Commit message:
- ?????; ;
Changed in this revision
| User.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/User.cpp Wed Mar 30 05:09:54 2016 +0000
+++ b/User.cpp Thu Mar 31 00:39:51 2016 +0000
@@ -66,27 +66,27 @@
M=1;
M=M<<14;
} else {
- if(LSX-127>0) {
+ if(LSX-129>0) {
M=1;
M=M<<6;
- M+=(LSX-127)/2;
+ M+=(LSX-128)/2;
M=M<<7;
} else if(LSX-127<0) {
- M+=(-1)*((LSX-128)/2);
- if(M==64) M=63;
+ if(((LSX-128)/2)==-64) M+=63;
+ else M+=(-1)*((LSX-128)/2);
M=M<<7;
}
- if(LSY-127>0) {
- M+=1<<6;
+ if(LSY-129>0) {
+ M+=0x40;
M+=(LSY-128)/2;
} else if(LSY-127<0) {
- M+=((-1)*(LSY-128)/2);
- if(M==64) M=63;
+ if(((LSY-128)/2)==-64) M+=63;
+ else M+=(-1)*((LSY-128)/2);
} else M=0;
}
- m.write(0xffff);
-// m.write(M);
- printf("0x%x\r\n",M);
+// m.write(0xffff);
+ m.write(M);
+// printf("%d,%d\n\r",M&0x40,0x40);
led1=LSX/256.0f;
led2=LSY/256.0f;
