mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 01:58:00 +02:00
Rx roi (#428)
* roi structure expanded to have ymin and ymax * compile with 'detector roi' * wip * wip, rx_roi, rx_clearroi * wip rxroi * rxroi wip * wip rxroi * merge fix * wip * rx_roi works, impl wip, test * tests in, impl left * wip, rxroi impl * wip, rxroi impl * wip * setrx_Roi works, getrx_roi, wip * rx_roi impl done * wip, rxroi * wip, getrx_roi rxr ports * fix ports * wip * wip * fix positions on server side * wip * numports wip * wip * jungfrau top inner interface row increment * x, y detpos, wip * removed eiger row indices flipping in gui (bottom flipping maintained) * wip * wip, jungfrau numinterfaces2 * jungfrau virtual works * eiger, jungfrau, g2 virtual server works * eiger positions fix, wip * binaries in * minor printout * binaries in * merge fix * merge fix * removing getposition * setrxroi wip * set upto port * get messed, wip * roi multi to module works, wip * wip * roi dont return -1 * added rxroi metadata in master file * added rxroifromshm, not yet in detector * rx roi in gui with box, also for gap pixels (gappixels for jungfrau mess) * fix for segfault in gui with detaching roi box in gui * wip * m3 gui: slave timing modes should be discarded when squashing * fixed m3 virtual data, and fixed counters in gui asthetics * m3 roi works * wip, g2 * wip * handling g225um boards, and showing roi for gainplot as well * udpate python functions * fix for 1d and a2d roi written * fixed actual roi written to file * no virtual hdf5 when handling rx roi * test * minor * binarie in
This commit is contained in:
Binary file not shown.
@ -2317,6 +2317,7 @@ void *start_timer(void *arg) {
|
||||
if (dr == 32 && ncounters > 1) {
|
||||
packetsPerFrame = 2;
|
||||
}
|
||||
dataSize = imageSize / packetsPerFrame;
|
||||
}
|
||||
// 1g
|
||||
else {
|
||||
@ -2338,27 +2339,22 @@ void *start_timer(void *arg) {
|
||||
{
|
||||
const int nchannels = NCHAN_1_COUNTER * NCHIP * ncounters;
|
||||
|
||||
switch (dr) {
|
||||
/*case 1: // TODO: Not implemented in firmware yet
|
||||
break;*/
|
||||
case 8:
|
||||
for (int i = 0; i < nchannels; ++i) {
|
||||
for (int i = 0; i < nchannels; ++i) {
|
||||
switch (dr) {
|
||||
//case 1: // TODO: Not implemented in firmware yet
|
||||
// break;
|
||||
case 8:
|
||||
*((uint8_t *)(imageData + i)) = (uint8_t)i;
|
||||
}
|
||||
break;
|
||||
case 16:
|
||||
for (int i = 0; i < nchannels; ++i) {
|
||||
break;
|
||||
case 16:
|
||||
*((uint16_t *)(imageData + i * sizeof(uint16_t))) = (uint16_t)i;
|
||||
break;
|
||||
case 32:
|
||||
*((uint32_t *)(imageData + i * sizeof(uint32_t))) = ((uint32_t)i & 0xFFFFFF); // 24 bit
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 32:
|
||||
for (int i = 0; i < nchannels; ++i) {
|
||||
*((uint32_t *)(imageData + i * sizeof(uint32_t))) =
|
||||
((uint32_t)i & 0xFFFFFF); // 24 bit
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2375,7 +2371,8 @@ void *start_timer(void *arg) {
|
||||
struct timespec begin, end;
|
||||
clock_gettime(CLOCK_REALTIME, &begin);
|
||||
usleep(expUs);
|
||||
|
||||
|
||||
|
||||
int srcOffset = 0;
|
||||
// loop packet
|
||||
for (int i = 0; i != packetsPerFrame; ++i) {
|
||||
@ -2396,7 +2393,6 @@ void *start_timer(void *arg) {
|
||||
memcpy(packetData + sizeof(sls_detector_header),
|
||||
imageData + srcOffset, dataSize);
|
||||
srcOffset += dataSize;
|
||||
|
||||
sendUDPPacket(0, 0, packetData, packetSize);
|
||||
}
|
||||
LOG(logINFO, ("Sent frame: %d [%lld]\n", frameNr,
|
||||
|
Reference in New Issue
Block a user