ps3 with sbdbt

Dependents:   omuni

Revision:
3:5640aae53391
Parent:
2:fe29007fb56c
Child:
4:12efe7905809
--- a/PS3.cpp	Mon Sep 26 10:28:39 2016 +0000
+++ b/PS3.cpp	Fri Sep 30 12:28:35 2016 +0000
@@ -48,6 +48,14 @@
 {
     return (*(PS3Data+(button>>4)) >> (button & 0x0f)) & 1;
 }
+bool PS3::getSELECTState()
+{
+    return getButtonState(migi) & getButtonState(hidari);
+}
+bool PS3::getSTARTState()
+{
+    return getButtonState(ue) & getButtonState(sita);
+}
 int PS3::getRightJoystickXaxis()
 {
     return (int)PS3Data[5]-64;
@@ -72,4 +80,14 @@
 {
     return atan2(double(PS3Data[4]*-1+64), double(PS3Data[3]-64))*double(180/PI);
 }
+void PS3::printdata()
+{
+    Serial pc(USBTX, USBRX);
+    for(int i = 0; i < 8; i++)
+    {
+        pc.printf("%4d", PS3Data[i]);
+    }
+}
 
+
+