![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
yei
Dependencies: interface mbed enc_1multi calPID motorout KondoServoLibrary
Fork of cat18_operate by
Diff: calplace/calplace.cpp
- Revision:
- 23:f45eb02433a5
- Parent:
- 20:13934809e117
diff -r 4f1f8dc1705a -r f45eb02433a5 calplace/calplace.cpp --- a/calplace/calplace.cpp Tue Aug 28 03:09:39 2018 +0000 +++ b/calplace/calplace.cpp Sun Sep 02 07:53:06 2018 +0000 @@ -12,11 +12,13 @@ for(i=0; i<=22; i++) { if(work[i].is_exist) { if(work[i].priority<work[best].priority) { - best=i; + if(shootingbox[kFirstPutPlace].is_exist == 1 || work[i].areaname == WORKAREA) { + best=i; + } } } } - DEBUG("CalPickPlace() finish worknum %d\r\n", best); + DEBUG("CalPickPlace() return worknum %d\r\n", best); return best; } //3つ同じ色が揃うよう置く場所を計算。 @@ -32,6 +34,6 @@ if(workcolor != shootingbox[num].color) break; } } - DEBUG("CalPutPlace() finish return %d\r\n", num); + DEBUG("CalPutPlace() return return %d\r\n", num); return num; } \ No newline at end of file