Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of LineScan by
Revision 39:ea0660f7d724, committed 2015-11-23
- Comitter:
- ng3600
- Date:
- Mon Nov 23 23:57:58 2015 +0000
- Parent:
- 38:1ac5f0ab5ae6
- Commit message:
- Bugfix, does not start right-to-left search at last element in array anymore. Start at last entry in array.
Changed in this revision
LineScan.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/LineScan.cpp Sat Nov 21 04:19:29 2015 +0000 +++ b/LineScan.cpp Mon Nov 23 23:57:58 2015 +0000 @@ -135,8 +135,8 @@ } if(preferLeftLine){ - l_walker = l_idx_ary + IDX_ARY_LEN - 1; - h_walker = h_idx_ary + IDX_ARY_LEN - 1; + l_walker = l_idx_ary + l_idx_pos - 1; + h_walker = h_idx_ary + h_idx_pos - 1; while(*l_walker != -1 && *h_walker != -1){ //evaluate out and advance if line is white on black and returns center of smallest white band @@ -151,9 +151,6 @@ h_walker--; } l_walker--; - - //serial.printf("%d %d\r\n", *h_walker, *l_walker); - //serial.printf("%.2f\r\n", out); } } else { l_walker = l_idx_ary + 1; @@ -172,9 +169,6 @@ l_walker++; } h_walker++; - - //serial.printf("%d %d\r\n", *h_walker, *l_walker); - //serial.printf("%.2f\r\n", out); } }