@@ -209,7 +209,7 @@ int getpixelv(float *pvbuff, int count) { | |||||
} | } | ||||
// Get an entire row of pixels, aligned with sync markers | // Get an entire row of pixels, aligned with sync markers | ||||
// FIXME: skips noisy lines with no findable sync marker | |||||
// FIXME: loses sync easily | |||||
int getpixelrow(float *pixelv, int nrow, int *zenith, int reset) { | int getpixelrow(float *pixelv, int nrow, int *zenith, int reset) { | ||||
static float pixels[PixelLine + SyncFilterLen]; | static float pixels[PixelLine + SyncFilterLen]; | ||||
static int npv; | static int npv; | ||||
@@ -303,4 +303,4 @@ int getpixelrow(float *pixelv, int nrow, int *zenith, int reset) { | |||||
} | } | ||||
return 1; | return 1; | ||||
} | |||||
} |
@@ -164,7 +164,7 @@ int calibrate(float **prow, int nrow, int offset, int width) { | |||||
} | } | ||||
} | } | ||||
telestart = (mtelestart - 64) % FRAME_LEN; | |||||
telestart = (mtelestart + 64) % FRAME_LEN; | |||||
// Make sure that theres at least one full frame in the image | // Make sure that theres at least one full frame in the image | ||||
if (nrow < telestart + FRAME_LEN) { | if (nrow < telestart + FRAME_LEN) { | ||||
@@ -86,7 +86,7 @@ int mapOverlay(char *filename, rgb_t **crow, int nrow, int zenith, int MCIR) { | |||||
for(int y = 0; y < nrow; y++) { | for(int y = 0; y < nrow; y++) { | ||||
for(int x = 49; x < width - 82; x++){ | for(int x = 49; x < width - 82; x++){ | ||||
// Maps are 16 bit / channel | // Maps are 16 bit / channel | ||||
png_bytep px = &mapRows[CLIP(y + mapOffset, 0, height)][x * 6]; | |||||
png_bytep px = &mapRows[CLIP(y + mapOffset, 0, height-1)][x * 6]; | |||||
rgb_t map = { | rgb_t map = { | ||||
(px[0] << 8) | px[1], | (px[0] << 8) | px[1], | ||||
(px[2] << 8) | px[3], | (px[2] << 8) | px[3], | ||||