diff --git a/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c index e2b474915..6e87c56ec 100644 --- a/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c @@ -1073,7 +1073,7 @@ int setNextFrameNumber(uint64_t value) { LOG(logINFO, ("Setting next frame number: %lu\n", value)); #ifdef VIRTUAL setU64BitReg(value, FRAME_NUMBER_LSB_REG, FRAME_NUMBER_MSB_REG); -#else +#else // decrement by 1 for firmware setU64BitReg(value - 1, FRAME_NUMBER_LSB_REG, FRAME_NUMBER_MSB_REG); #endif diff --git a/slsDetectorSoftware/tests/Caller/test-Caller.cpp b/slsDetectorSoftware/tests/Caller/test-Caller.cpp index 6e9a9b30c..b9aa56e36 100644 --- a/slsDetectorSoftware/tests/Caller/test-Caller.cpp +++ b/slsDetectorSoftware/tests/Caller/test-Caller.cpp @@ -2433,8 +2433,8 @@ TEST_CASE("nextframenumber", "[.cmdcall]") { det.getPeriod().tsquash("inconsistent period in test"); auto prev_burstmode = det.getBurstMode().tsquash("inconsistent burst mode in test"); - auto prev_bursts = det.getNumberOfBursts().tsquash( - "inconsistent #bursts in test"); + auto prev_bursts = + det.getNumberOfBursts().tsquash("inconsistent #bursts in test"); auto prev_burstperiod = det.getBurstPeriod().tsquash( "inconsistent burst period in test"); @@ -2448,8 +2448,8 @@ TEST_CASE("nextframenumber", "[.cmdcall]") { det.startDetector(); std::this_thread::sleep_for(std::chrono::seconds(2)); - auto currentfnum = - det.getNextFrameNumber().tsquash("inconsistent frame nr in test"); + auto currentfnum = det.getNextFrameNumber().tsquash( + "inconsistent frame nr in test"); REQUIRE(currentfnum == 2); det.setTimingMode(prev_timing); @@ -2474,8 +2474,8 @@ TEST_CASE("nextframenumber", "[.cmdcall]") { det.setPeriod(std::chrono::milliseconds(1)); det.startDetector(); std::this_thread::sleep_for(std::chrono::seconds(2)); - auto currentfnum = - det.getNextFrameNumber().tsquash("inconsistent frame nr in test"); + auto currentfnum = det.getNextFrameNumber().tsquash( + "inconsistent frame nr in test"); REQUIRE(currentfnum == 2); if (det_type == defs::EIGER) { auto prev_tengiga =