2017_hongo_Bteam

Dependents:   DataPool

Revision:
0:31116bc8d4a7
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/BetaPool.cpp	Fri Aug 18 07:35:50 2017 +0000
@@ -0,0 +1,38 @@
+#include "BetaPool.h"
+
+BetaPool::BetaPool()
+{
+    BetaPool::reset();
+}
+
+void BetaPool::up_load()
+{
+    data_index[0] = ctrl.rx;
+    data_index[1] = ctrl.ry;
+    data_index[2] = ctrl.lx;
+    data_index[3] = ctrl.r_sw1;
+    data_index[4] = ctrl.r_sw2;
+    data_index[5] = ctrl.r_sw3;
+    data_index[6] = ctrl.r_sw4;
+    data_index[7] = ctrl.r_s_sw1;
+    //data_index[8] = ctrl.r_s_sw2;
+    data_index[9] = ctrl.l_sw1;
+    data_index[10] = ctrl.l_sw2;
+    data_index[11] = ctrl.l_sw3;
+    data_index[12] = ctrl.l_sw4;
+    data_index[13] = ctrl.l_s_sw1;
+    //data_index[14] = ctrl.l_s_sw2;
+    data_index[15] = ctrl.mode1;
+    data_index[16] = ctrl.mode2;
+    data_index[17] = ctrl.r_srd;
+    //data_index[18] = ctrl.l_srd;
+    /*data_index[19] = ar.r.max_limit;
+    data_index[20] = ar.r.min_limit;
+    data_index[21] = ar.l.max_limit;
+    data_index[22] = ar.l.min_limit;*/
+}
+        
+void BetaPool::reset(){
+    for(int t = 0; t < 9; t++)
+        ctrl.all_data[t] = 0;
+}
\ No newline at end of file