diff --git a/dsp.c b/dsp.c index bf02f1b..06f1eae 100755 --- a/dsp.c +++ b/dsp.c @@ -209,7 +209,7 @@ int getpixelv(float *pvbuff, int count) { } // 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) { static float pixels[PixelLine + SyncFilterLen]; static int npv; @@ -303,4 +303,4 @@ int getpixelrow(float *pixelv, int nrow, int *zenith, int reset) { } return 1; -} \ No newline at end of file +} diff --git a/image.c b/image.c index dda8d4e..20e22dd 100644 --- a/image.c +++ b/image.c @@ -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 if (nrow < telestart + FRAME_LEN) { diff --git a/pngio.c b/pngio.c index 1727d88..e1364e0 100644 --- a/pngio.c +++ b/pngio.c @@ -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 x = 49; x < width - 82; x++){ // 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 = { (px[0] << 8) | px[1], (px[2] << 8) | px[3],