2017_Bteam_gamma

Revision:
0:43b500759963
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/johanshin_arm.cpp	Thu Aug 17 04:48:57 2017 +0000
@@ -0,0 +1,33 @@
+#include "johanshin_arm.h"
+
+JohanshinArm::JohanshinArm(int *arm1,int *arm2)
+{
+    Timeout second_phase;
+    first_arm = arm1;
+    second_arm = arm2;
+}/*
+JohanshinArm::JohanshinArm(int *arm1)
+{
+    //Timeout second_phase;
+    first_arm = arm1;
+    second_arm = NULL;
+}*/
+
+void JohanshinArm::second_phase_moving(){
+    *second_arm = 1;
+}
+
+void JohanshinArm::move_arm(float moving_wait,bool mode)
+{
+    if(mode == true)
+    {
+        *first_arm = 1;
+        second_phase.attach(this,&JohanshinArm::second_phase_moving,moving_wait);
+    }
+    else
+    {
+        second_phase.detach();
+        *first_arm = 0;
+        *second_arm = 0;   
+    }
+}
\ No newline at end of file