From 0858b0d2cb5d31448c3f6a610ba92f51aba10b94 Mon Sep 17 00:00:00 2001 From: t-moe Date: Sat, 25 Apr 2015 14:05:44 +0200 Subject: [PATCH] Fixed some bugs when receiving large data. --- common/app/app.c | 55 +++++++++++++++++++----------- common/lowlevel/ll_system.h | 1 + common/system/system.c | 4 +++ common/system/system.h | 1 + discovery/libs/Pixy/src/chirp.cpp | 4 +++ discovery/src/ll_system.c | 5 +++ emulator/libs/Pixy/src/usblink.cpp | 1 + emulator/qt/ll_system.cpp | 3 ++ 8 files changed, 55 insertions(+), 19 deletions(-) diff --git a/common/app/app.c b/common/app/app.c index f2eba65..243938f 100644 --- a/common/app/app.c +++ b/common/app/app.c @@ -3,7 +3,7 @@ #include "system.h" #include "pixy.h" #include - +#include bool pixy_connected = false; @@ -113,10 +113,10 @@ int pixy_frame_test() { &videodata, // pointer to mem address for returned frame END_IN_ARGS); - if(return_value==0) { return_value = renderBA81(renderflags,xwidth,ywidth,size,videodata); } + return return_value; } @@ -171,24 +171,41 @@ int renderBA81(uint8_t renderFlags, uint16_t width, uint16_t height, uint32_t fr // don't render top and bottom rows, and left and rightmost columns because of color // interpolation //uint32_t decodedimage[(width-2)*(height-2)]; - uint16_t decodedimage[(width-2)*(height-2)]; - - uint16_t* line = decodedimage; - for (y=1; y