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 FRDM-TFC by
Revision 4:8a4a3fc59e57, committed 2013-09-04
- Comitter:
- redxeth
- Date:
- Wed Sep 04 02:48:20 2013 +0000
- Parent:
- 3:23cce037011f
- Child:
- 5:9d36b4c896e1
- Commit message:
- Made corrections to demo3 to parse linescandata in proper order.
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Aug 15 23:26:19 2013 +0000
+++ b/main.cpp Wed Sep 04 02:48:20 2013 +0000
@@ -127,10 +127,12 @@
case 3 :
+ uint32_t NumCameras = 1; // Enter here how many line scan cameras hooked up
+
//Demo Mode 3 will be in Freescale Garage Mode. It will beam data from the Camera to the
//Labview Application
- //note that there are some issues
+
if(TFC_Ticker[0]>1000 && TFC_LineScanImageReady>0)
{
TFC_Ticker[0] = 0;
@@ -145,30 +147,42 @@
TFC_SetBatteryLED_Level(t);
+ // camera 1
for(i=0;i<8;i++)
{
for(j=0;j<16;j++)
{
- TERMINAL_PRINTF("%X,",TFC_LineScanImage0[(i*8)+j]);
-
+ TERMINAL_PRINTF("%X",TFC_LineScanImage0[(i*16)+j]);
+
+ if (NumCameras == 1)
+ {
+ if((i==7)&&(j==15))
+ TERMINAL_PRINTF("\r\n",TFC_LineScanImage0[(i*16)+j]);
+ else
+ TERMINAL_PRINTF(",",TFC_LineScanImage0[(i*16)+j]);
+ }
+
}
wait_ms(10);
}
-
- for(i=0;i<8;i++)
- {
- for(j=0;j<16;j++)
+
+ // camera 2
+ if (NumCameras == 2)
+ {
+ for(i=0;i<8;i++)
+ {
+ for(j=0;j<16;j++)
{
- TERMINAL_PRINTF("%X",TFC_LineScanImage1[(i*8)+j]);
+ TERMINAL_PRINTF("%X",TFC_LineScanImage1[(i*16)+j]);
- if((i*8)+j==127)
- TERMINAL_PRINTF("\r\n",TFC_LineScanImage1[(i*8)+j]);
- else
- TERMINAL_PRINTF(",",TFC_LineScanImage1[(i*8)+j]);
- }
-
- wait_ms(10);
- }
+ if((i==7)&&(j==15))
+ TERMINAL_PRINTF("\r\n",TFC_LineScanImage1[(i*16)+j]);
+ else
+ TERMINAL_PRINTF(",",TFC_LineScanImage1[(i*16)+j]);
+ }
+ wait_ms(10);
+ }
+ }
}
