Skip to content

Commit

Permalink
Merge branch 'developer' into dev/slsmultireceiver_invalid_args
Browse files Browse the repository at this point in the history
  • Loading branch information
thattil authored Nov 21, 2024
2 parents 9d3e19f + b3d9af2 commit 80f39a1
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 8 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,7 @@ void setupDetector() {
setNextFrameNumber(DEFAULT_STARTING_FRAME_NUMBER);

// temp threshold and reset event
setTemperatureControl(DEFAULT_TMP_CNTRL);
setThresholdTemperature(DEFAULT_TMP_THRSHLD);
setTemperatureEvent(0);
if (getChipVersion() == 11) {
Expand Down Expand Up @@ -2254,7 +2255,6 @@ int setThresholdTemperature(int val) {

double ftemp = (double)temp / 1000.00;
LOG(logDEBUG1, ("Threshold Temperature read %f °C\n", ftemp));

return temp;
}

Expand Down Expand Up @@ -2791,9 +2791,9 @@ void *start_timer(void *arg) {
}

if ((i % 1024) < 300) {
gainVal = 1;
gainVal = 0;
} else if ((i % 1024) < 600) {
gainVal = 2;
gainVal = 1;
} else {
gainVal = 3;
}
Expand Down Expand Up @@ -2830,17 +2830,29 @@ void *start_timer(void *arg) {
clock_gettime(CLOCK_REALTIME, &begin);
usleep(expUs);

#ifdef TEST_CHANGE_GAIN_EVERY_FRAME
// change gain and data for every frame
{
const int npixels = (NCHAN * NCHIP);

// random gain values, 2 becomes 3 as 2 is invalid
int randomGainValues[3] = {0};
srand(time(0));
for (int i = 0; i != 3; ++i) {
int r = rand() % 3;
if (r == 2)
r = 3;
randomGainValues[i] = r;
}

for (int i = 0; i < npixels; ++i) {
int gainVal = 0;
if ((i % 1024) < 300) {
gainVal = 1 + iframes;
gainVal = randomGainValues[0];
} else if ((i % 1024) < 600) {
gainVal = 2 + iframes;
gainVal = randomGainValues[1];
} else {
gainVal = 3 + iframes;
gainVal = randomGainValues[2];
}
int dataVal =
*((uint16_t *)(imageData + i * sizeof(uint16_t)));
Expand All @@ -2851,7 +2863,7 @@ void *start_timer(void *arg) {
(uint16_t)pixelVal;
}
}

#endif
int srcOffset = 0;
int srcOffset2 = DATA_BYTES / 2;
int row0 = (numInterfaces == 1 ? detPos[1] : detPos[3]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
#define DEFAULT_SETTINGS (GAIN0)
#define DEFAULT_GAINMODE (DYNAMIC)
#define DEFAULT_TX_UDP_PORT (0x7e9a)
#define DEFAULT_TMP_CNTRL (1)
#define DEFAULT_TMP_THRSHLD (65 * 1000) // milli degree Celsius
#define DEFAULT_NUM_STRG_CLLS (0)
#define DEFAULT_STRG_CLL_STRT (0xf)
Expand Down
2 changes: 1 addition & 1 deletion slsSupportLib/include/sls/versionAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#define APICTB "developer 0x241107"
#define APIGOTTHARD "developer 0x241107"
#define APIGOTTHARD2 "developer 0x241107"
#define APIJUNGFRAU "developer 0x241107"
#define APIMYTHEN3 "developer 0x241107"
#define APIMOENCH "developer 0x241107"
#define APIXILINXCTB "developer 0x241107"
#define APIEIGER "developer 0x241107"
#define APIJUNGFRAU "developer 0x241120"

0 comments on commit 80f39a1

Please sign in to comment.