mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-13 21:37:13 +02:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
dbb1e1de56 | |||
ac6433a59b |
@ -15,6 +15,8 @@
|
|||||||
#include <qwt_symbol.h>
|
#include <qwt_symbol.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include <array>
|
||||||
|
|
||||||
namespace sls {
|
namespace sls {
|
||||||
|
|
||||||
#define QwtLog10ScaleEngine QwtLogScaleEngine // hmm
|
#define QwtLog10ScaleEngine QwtLogScaleEngine // hmm
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
#include "SlsQt2DPlot.h"
|
#include "SlsQt2DPlot.h"
|
||||||
// #include "sls/ansi.h"
|
// #include "sls/ansi.h"
|
||||||
|
#include <array>
|
||||||
|
|
||||||
#include <qlist.h>
|
#include <qlist.h>
|
||||||
#include <qprinter.h>
|
#include <qprinter.h>
|
||||||
|
@ -2456,21 +2456,51 @@ void *start_timer(void *arg) {
|
|||||||
// Generate data
|
// Generate data
|
||||||
char imageData[imageSize];
|
char imageData[imageSize];
|
||||||
memset(imageData, 0, imageSize);
|
memset(imageData, 0, imageSize);
|
||||||
|
// {
|
||||||
|
// const int nchannels = NCHAN_1_COUNTER * NCHIP * ncounters;
|
||||||
|
|
||||||
|
// for (int i = 0; i < nchannels; ++i) {
|
||||||
|
// int j = rand();
|
||||||
|
// switch (dr) {
|
||||||
|
// //case 1: // TODO: Not implemented in firmware yet
|
||||||
|
// // break;
|
||||||
|
|
||||||
|
// case 8:
|
||||||
|
// *((uint8_t *)(imageData + i)) = (uint8_t)j;
|
||||||
|
// break;
|
||||||
|
// case 16:
|
||||||
|
// *((uint16_t *)(imageData + i * sizeof(uint16_t))) = (uint16_t)j;
|
||||||
|
// break;
|
||||||
|
// case 32:
|
||||||
|
// *((uint32_t *)(imageData + i * sizeof(uint32_t))) = ((uint32_t)j & 0xFFFFFF); // 24 bit
|
||||||
|
// break;
|
||||||
|
// default:
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Send data
|
||||||
|
// loop over number of frames
|
||||||
|
for (int frameNr = 0; frameNr != numFrames; ++frameNr) {
|
||||||
|
|
||||||
{
|
{
|
||||||
const int nchannels = NCHAN_1_COUNTER * NCHIP * ncounters;
|
const int nchannels = NCHAN_1_COUNTER * NCHIP * ncounters;
|
||||||
|
|
||||||
for (int i = 0; i < nchannels; ++i) {
|
for (int i = 0; i < nchannels; ++i) {
|
||||||
|
int j = rand();
|
||||||
switch (dr) {
|
switch (dr) {
|
||||||
//case 1: // TODO: Not implemented in firmware yet
|
//case 1: // TODO: Not implemented in firmware yet
|
||||||
// break;
|
// break;
|
||||||
|
|
||||||
case 8:
|
case 8:
|
||||||
*((uint8_t *)(imageData + i)) = (uint8_t)i;
|
*((uint8_t *)(imageData + i)) = (uint8_t)j;
|
||||||
break;
|
break;
|
||||||
case 16:
|
case 16:
|
||||||
*((uint16_t *)(imageData + i * sizeof(uint16_t))) = (uint16_t)i;
|
*((uint16_t *)(imageData + i * sizeof(uint16_t))) = (uint16_t)j;
|
||||||
break;
|
break;
|
||||||
case 32:
|
case 32:
|
||||||
*((uint32_t *)(imageData + i * sizeof(uint32_t))) = ((uint32_t)i & 0xFFFFFF); // 24 bit
|
*((uint32_t *)(imageData + i * sizeof(uint32_t))) = ((uint32_t)j & 0xFFFFFF); // 24 bit
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@ -2478,9 +2508,6 @@ void *start_timer(void *arg) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send data
|
|
||||||
// loop over number of frames
|
|
||||||
for (int frameNr = 0; frameNr != numFrames; ++frameNr) {
|
|
||||||
|
|
||||||
// check if manual stop
|
// check if manual stop
|
||||||
if (sharedMemory_getStop() == 1) {
|
if (sharedMemory_getStop() == 1) {
|
||||||
|
Reference in New Issue
Block a user