譯文 張
/
BX-car
good
Fork of BX-car by
Diff: camera_api.cpp
- Revision:
- 8:8e49e21d80a2
- Parent:
- 7:fd976e1ced33
- Child:
- 10:d2401a243e8d
diff -r fd976e1ced33 -r 8e49e21d80a2 camera_api.cpp --- a/camera_api.cpp Sun Jun 22 13:58:01 2014 +0000 +++ b/camera_api.cpp Sun Jun 22 15:29:20 2014 +0000 @@ -125,8 +125,8 @@ b_w=b_start-b_end; b2_w=b2_start-b2_end; - de_v=b_start; - de_v2=b_end; + de_v=b2_start; + de_v2=b2_end; switch(find_type) { @@ -135,7 +135,7 @@ b2_center=(b2_end+b2_start)/2; - if(w_thr_up>b_w&&(b_center-64)<(64-b2_center)) + if(w_thr_up>b_w&&(b_center!=0)&&(b_center-64)<(64-b2_center)) center=b_center; else center=b2_center; @@ -169,7 +169,6 @@ break; } - de_v=center; return center; }