mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 21:07:13 +02:00
imagedata is now allocated on the heap
This commit is contained in:
@ -15,6 +15,7 @@
|
||||
#include "loadPattern.h"
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h> // usleep
|
||||
#ifdef VIRTUAL
|
||||
@ -2258,8 +2259,9 @@ void *start_timer(void *arg) {
|
||||
int packetsPerFrame = ceil((double)imageSize / (double)dataSize);
|
||||
|
||||
// Generate Data
|
||||
char imageData[imageSize]; //
|
||||
char *imageData = (char *)malloc(imageSize);
|
||||
memset(imageData, 0, imageSize);
|
||||
|
||||
/*
|
||||
for (int i = 0; i < imageSize; i += sizeof(uint16_t)) {
|
||||
*((uint16_t *)(imageData + i)) = i;
|
||||
@ -2325,6 +2327,8 @@ void *start_timer(void *arg) {
|
||||
setNextFrameNumber(frameNr + numFrames);
|
||||
}
|
||||
|
||||
free(imageData);
|
||||
|
||||
closeUDPSocket(0);
|
||||
|
||||
sharedMemory_setStatus(IDLE);
|
||||
|
Reference in New Issue
Block a user