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
Diff: LineScan.cpp
- Revision:
- 34:5c35287ff49e
- Parent:
- 33:cc3810ac5365
diff -r cc3810ac5365 -r 5c35287ff49e LineScan.cpp --- a/LineScan.cpp Fri Nov 13 02:23:16 2015 +0000 +++ b/LineScan.cpp Fri Nov 13 03:56:43 2015 +0000 @@ -140,7 +140,7 @@ //if interval is black on white, advance the pointer for the peak array //width needs to be larger than 2 pixels wide to be a good read. - if(*h_walker > *l_walker && (*h_walker - *l_walker) < 10 && (*h_walker - *l_walker) > 2){ + if(*h_walker > *l_walker && (*h_walker - *l_walker) < 10 && (*h_walker - *l_walker) > 1){ out = ((float)(*h_walker + *l_walker)) / (2.0 * (float)frameLen); //0.5 is center *numLines++; h_walker++; @@ -157,7 +157,7 @@ //if interval is black on white, advance the pointer for the peak array //width needs to be larger than 2 pixels wide to be a good read. - if(*h_walker > *l_walker && (*h_walker - *l_walker) < 10 && (*h_walker - *l_walker) > 2){ + if(*h_walker > *l_walker && (*h_walker - *l_walker) < 10 && (*h_walker - *l_walker) > 1){ out = ((float)(*h_walker + *l_walker)) / (2.0 * (float)frameLen); //0.5 is center *numLines++; l_walker--;