yei
Dependencies: interface mbed enc_1multi calPID motorout KondoServoLibrary
Fork of cat18_operate by
Diff: main.cpp
- Revision:
- 30:af136b83b202
- Parent:
- 29:ea48140fc85e
- Child:
- 31:f7eb7c9fc8db
--- a/main.cpp Tue Sep 04 12:53:50 2018 +0000 +++ b/main.cpp Tue Sep 04 23:03:50 2018 +0000 @@ -8,18 +8,20 @@ #include "controller.h" #include "calplace.h" #include "check.h" +#include "discoveryboard.h" //debug用に追加 #include "coordinate.h" -#define DEBUG_MODE -const int kWait_ms = 500; +//#define DEBUG_MODE +const int kWait_ms = 250; int worknum = 0; int main() { + GoSetup(); GoToFirstPosition(); SetupPosition(); if(PositionSetupIsInBan() == 1) return 1;//失敗したら強制終了 - + //スタート指示受付 DEBUG("stand by\r\n"); if(WasLoad() == 0) { @@ -33,11 +35,12 @@ Close(); //ワークに向かう if(Go(work[worknum]) != 0) continue; - #ifdef DEBUGMODE + +#ifdef DEBUG_MODE DEBUG("ManualModeWithPc start\r\n"); - while(ManualModeWithPc() == 0){}; + while(ManualModeWithPc() == 1) {}; DEBUG("ManualModeWithPc return work %d %f, %f, %f\r\n", worknum, GetNowTipLocateX(), GetNowTipLocateY(), GetNowTipLocateZ()); - #endif +#endif //掴む wait_ms(kWait_ms); Close(); @@ -53,7 +56,6 @@ if(Go(shootingbox[boxspace]) != 0) continue; //放す Open(); - wait_ms(kWait_ms); //上に持ち上げる Above(BOX); wait_ms(kWait_ms);