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.
Revision 3:f2e67488f5ab, committed 2020-01-10
- Comitter:
- hudakz
- Date:
- Fri Jan 10 22:10:07 2020 +0000
- Parent:
- 2:415e979c52cf
- Commit message:
- Barcode reader with a TCD1304AP TOSHIBA CCD linear image sensor and NUCLEO-F103RB board.
Changed in this revision
--- a/main.cpp Fri Jan 10 21:03:00 2020 +0000 +++ b/main.cpp Fri Jan 10 22:10:07 2020 +0000 @@ -2,12 +2,12 @@ * Barcode reader * * Target: NUCLEO-F103RB - * Sensor: TCD1304AP(DG) - Toshiba CCD linear image sensor + * Sensor: TCD1304AP(DG) - TOSHIBA CCD linear image sensor * * Author: Zoltan Hudak * Date: 2020-01 * - * Depends on the ZBar library <http://zbar.sourceforge.net/> + * Depends on the ZBar library <http://zbar.sourceforge.net> * */ #include "main.h" @@ -169,8 +169,8 @@ scanner->flush(); scanner->new_scan(); - int black = 0; - int i; + uint16_t black = 0; + int i; for (i = MARGIN_LEFT; i < DATA_LEN - MARGIN_RIGHT; i++) { if (adcData[i] > black) @@ -178,7 +178,7 @@ } for (i = MARGIN_LEFT; i < DATA_LEN - MARGIN_RIGHT; i++) { - scanner->scan_y(adcData[i] - black); + scanner->scan_y(black - adcData[i]); } #endif printf("Scan done.\r\n");
--- a/mbed_app.json Fri Jan 10 21:03:00 2020 +0000 +++ b/mbed_app.json Fri Jan 10 22:10:07 2020 +0000 @@ -1,7 +1,6 @@ { "target_overrides": { "*": { - "target.clock_source": "USE_PLL_HSE_XTAL", "target.default_lib": "small" } }
--- a/zbar.lib Fri Jan 10 21:03:00 2020 +0000 +++ b/zbar.lib Fri Jan 10 22:10:07 2020 +0000 @@ -1,1 +1,1 @@ -https://os.mbed.com/users/hudakz/code/zbar/#e33621169e44 +https://os.mbed.com/users/hudakz/code/zbar/#4f5c042a2d34