* gain plot: dont allow zoom, only zoom on main plot

* fixed gain plot zooming

* fixing panning for gainplots
This commit is contained in:
Dhanya Thattil
2022-10-18 15:27:44 +02:00
committed by GitHub
parent d2c4827b31
commit 4a7cd051c1
11 changed files with 157 additions and 13 deletions

View File

@ -3217,8 +3217,22 @@ void *start_timer(void *arg) {
// Generate data
char imageData[imagesize];
memset(imageData, 0, imagesize);
for (int i = 0; i < imagesize; i += sizeof(uint16_t)) {
*((uint16_t *)(imageData + i)) = i;
const int nchannels = NCHIP * NCHAN;
int gainVal = 0;
int channelVal = 0;
for (int i = 0; i < nchannels; ++i) {
if ((i % nchannels) < 400) {
gainVal = 1;
} else if ((i % nchannels) < 800) {
gainVal = 2;
} else {
gainVal = 3;
}
channelVal = (i & ~GAIN_VAL_MSK) | (gainVal << GAIN_VAL_OFST);
*((uint16_t *)(imageData + i * sizeof(uint16_t))) =
(uint16_t)channelVal;
// LOG(logINFORED, ("[%d]:0x%08x\n", i, channelVal));
}
char vetoData[vetodatasize];
memset(vetoData, 0, sizeof(vetodatasize));

View File

@ -94,6 +94,9 @@
#define DEFAULT_ASIC_DOUT_RDY_SRC (0x5)
#define DEFAULT_ASIC_DOUT_RDY_DLY (0x3)
#define GAIN_VAL_OFST (12)
#define GAIN_VAL_MSK (0x3 << GAIN_VAL_OFST)
#define VETO_DATA_SIZE (160)
typedef struct {
uint64_t frameNumber;