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.
Revision 3:378f57911f5d, committed 2019-11-08
- Comitter:
- masaaki_nr
- Date:
- Fri Nov 08 10:11:32 2019 +0000
- Parent:
- 2:422d5d7602cc
- Commit message:
- add to disconect
Changed in this revision
--- a/Arduino_PRO.txt Sat Apr 06 06:37:13 2019 +0000
+++ b/Arduino_PRO.txt Fri Nov 08 10:11:32 2019 +0000
@@ -81,6 +81,10 @@
if (PS3.getButtonClick(SELECT)) bitSet(botton_val, 13);
if (PS3.getButtonClick(START)) bitSet(botton_val, 14);
break;
+
+ case 3:
+ PS3.disconnect();
+ break;
}
/***********************************************/
str[0] = botton_val & 0x00ff;
--- a/PS3_Controller.cpp Sat Apr 06 06:37:13 2019 +0000
+++ b/PS3_Controller.cpp Fri Nov 08 10:11:32 2019 +0000
@@ -44,4 +44,8 @@
bool PS3_controller::conect(void)
{
return controller_check;
+}
+
+void PS3_controller::disconect(void){
+ _uno.putc(3);
}
\ No newline at end of file
--- a/PS3_Controller.h Sat Apr 06 06:37:13 2019 +0000
+++ b/PS3_Controller.h Fri Nov 08 10:11:32 2019 +0000
@@ -39,6 +39,7 @@
int button(int);
int analog(int);
bool conect(void);
+ void disconect(void);
private:
Serial _uno;