Optionally print debug information
This commit is contained in:
parent
3f6016106b
commit
dc61ac7f85
|
@ -1 +1 @@
|
||||||
562
|
615
|
||||||
|
|
|
@ -15,4 +15,7 @@
|
||||||
#define CONFIG_MIN_FRAMES 2
|
#define CONFIG_MIN_FRAMES 2
|
||||||
|
|
||||||
// Maximum number of frames to wait. Capture even if it is not within tolerance.
|
// Maximum number of frames to wait. Capture even if it is not within tolerance.
|
||||||
#define CONFIG_MAX_FRAMES 15
|
#define CONFIG_MAX_FRAMES 15
|
||||||
|
|
||||||
|
// Print number of black pixels per captured frame
|
||||||
|
// #define CONFIG_PRINT_EXPOSURE_DEBUG_INFORMATION
|
18
src/main.c
18
src/main.c
|
@ -22,6 +22,24 @@ int main(void)
|
||||||
extern uint8_t ImageBuffer[CAMERA_IMAGE_WIDTH * CAMERA_IMAGE_HEIGHT / 8];
|
extern uint8_t ImageBuffer[CAMERA_IMAGE_WIDTH * CAMERA_IMAGE_HEIGHT / 8];
|
||||||
Print_Image(ImageBuffer, CAMERA_IMAGE_WIDTH, CAMERA_IMAGE_HEIGHT, 2);
|
Print_Image(ImageBuffer, CAMERA_IMAGE_WIDTH, CAMERA_IMAGE_HEIGHT, 2);
|
||||||
|
|
||||||
|
#ifdef CONFIG_PRINT_EXPOSURE_DEBUG_INFORMATION
|
||||||
|
char buffer[32] = "Finished after lines: ";
|
||||||
|
itoa(Camera_FinalFrameCount, buffer + strlen(buffer), 10);
|
||||||
|
|
||||||
|
Print_Text(buffer, &Arpegius_32);
|
||||||
|
Print_Text("Black pixel counts:", &Arpegius_32);
|
||||||
|
for(int i = 0; i < Camera_FinalFrameCount; i++)
|
||||||
|
{
|
||||||
|
if(i >= (int)(sizeof(Camera_BlackPixelCounts)
|
||||||
|
/ sizeof(Camera_BlackPixelCounts[0])))
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
itoa(Camera_BlackPixelCounts[i], buffer, 10);
|
||||||
|
Print_Text(buffer, &Arpegius_32);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
LTP1245_FeedPaper(100);
|
LTP1245_FeedPaper(100);
|
||||||
|
|
||||||
BMP_Save(ImageBuffer, CAMERA_IMAGE_WIDTH, CAMERA_IMAGE_HEIGHT);
|
BMP_Save(ImageBuffer, CAMERA_IMAGE_WIDTH, CAMERA_IMAGE_HEIGHT);
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
#include "font_arpegius_16.h"
|
#include "font_arpegius_16.h"
|
||||||
#include "font_arpegius_32.h"
|
#include "font_arpegius_32.h"
|
||||||
#include "bmp.h"
|
#include "bmp.h"
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
int main(void);
|
int main(void);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue