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: FatFileSystem mbed
Fork of PS3_BlueUSB_Shibutsu by
Revision 8:19566d41352c, committed 2016-05-10
- Comitter:
- nodoame
- Date:
- Tue May 10 09:27:56 2016 +0000
- Parent:
- 7:2d364cea0826
- Commit message:
- 20160510;
Changed in this revision
TestShell.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/TestShell.cpp Thu Nov 12 06:53:21 2015 +0000 +++ b/TestShell.cpp Tue May 10 09:27:56 2016 +0000 @@ -171,6 +171,7 @@ printHex(data,len); } } + //コントローラーの値の取得 if (t->_devClass == PS3_REMOTE) { @@ -209,6 +210,8 @@ DATA[29] = ((ps3report*)(data+1))->Connection; //Dev.putc(0xff); //wait(0.003); + + //長い間データを取得できない場合はリセット for(int i=0;i<30;i++){ if(tmpDATA[i]==DATA[i]) dcount++; @@ -221,6 +224,7 @@ if(count>600) NVIC_SystemReset(); dcount=0; + //UART通信でNucleoへ値を送る Dev.putc(114); wait(0.0003); for(int i = 0;i<7;i++) @@ -230,6 +234,7 @@ Dev.putc(DATA[i]); printf(": %3d\r\n " , count); } + //タッチセンサが反応したらコントローラーへ振動フィードバック if(((int)DATA[1]&12)==12&&leaveF){ leaveF=false; t->Ps3Hid_Rumble(10, 255, 10, 10);