fix cmake (cannot find VERSION file) when using package as subfolder as cmake_source_dir is not same anymore, add troubleshooting doc for m3 regarding loose control board for waiting status in auto timing mode, fix m3 tests to test register write (previously was read only) (#1048)

This commit is contained in:
maliakal_d 2024-11-21 16:44:09 +01:00 committed by GitHub
parent c6c7632ef7
commit ffd7cd1070
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 35 additions and 3 deletions

View File

@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.14)
project(slsDetectorPackage)
# Read VERSION file into project version
set(VERSION_FILE "${CMAKE_SOURCE_DIR}/VERSION")
set(VERSION_FILE "${CMAKE_CURRENT_LIST_DIR}/VERSION")
file(READ "${VERSION_FILE}" VERSION_CONTENT)
string(STRIP "${VERSION_CONTENT}" PROJECT_VERSION_STRING)
set(PROJECT_VERSION ${PROJECT_VERSION_STRING})
@ -356,4 +356,4 @@ if(SLS_MASTER_PROJECT)
include(cmake/package_config.cmake)
endif()
install(FILES ${CMAKE_SOURCE_DIR}/VERSION DESTINATION ${CMAKE_INSTALL_PREFIX})
install(FILES ${CMAKE_CURRENT_LIST_DIR}/VERSION DESTINATION ${CMAKE_INSTALL_PREFIX})

View File

@ -394,6 +394,14 @@ Missing first frame or next frame after a delay
Connect the data link from the Module directly to receiver pc or to a private network.
Mythen3
--------
Detector status is waiting even in auto timing mode
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check if the control board or the flat band cable is connected properly. If not, connect them properly and try again.
Jungfrau
---------

View File

@ -64,7 +64,7 @@ configure_file( scripts/test_virtual.py
${CMAKE_BINARY_DIR}/test_virtual.py
)
configure_file( ${CMAKE_SOURCE_DIR}/VERSION
configure_file( ${CMAKE_CURRENT_LIST_DIR}/../VERSION
${CMAKE_BINARY_DIR}/bin/slsdet/VERSION
)

View File

@ -3319,6 +3319,12 @@ TEST_CASE("reg", "[.cmdcall]") {
auto det_type = det.getDetectorType().squash();
if (det_type != defs::EIGER) {
uint32_t addr = 0x64;
if (det_type == defs::MYTHEN3) {
addr = 0x80;
}
if (det_type == defs::GOTTHARD2) {
addr = 0x20;
}
std::string saddr = ToStringHex(addr);
auto prev_val = det.readRegister(addr);
{
@ -3369,6 +3375,12 @@ TEST_CASE("setbit", "[.cmdcall]") {
auto det_type = det.getDetectorType().squash();
if (det_type != defs::EIGER) {
uint32_t addr = 0x64;
if (det_type == defs::MYTHEN3) {
addr = 0x80;
}
if (det_type == defs::GOTTHARD2) {
addr = 0x20;
}
std::string saddr = ToStringHex(addr);
auto prev_val = det.readRegister(addr);
{
@ -3393,6 +3405,12 @@ TEST_CASE("clearbit", "[.cmdcall]") {
auto det_type = det.getDetectorType().squash();
if (det_type != defs::EIGER) {
uint32_t addr = 0x64;
if (det_type == defs::MYTHEN3) {
addr = 0x80;
}
if (det_type == defs::GOTTHARD2) {
addr = 0x20;
}
std::string saddr = ToStringHex(addr);
auto prev_val = det.readRegister(addr);
{
@ -3417,6 +3435,12 @@ TEST_CASE("getbit", "[.cmdcall]") {
auto det_type = det.getDetectorType().squash();
if (det_type != defs::EIGER) {
uint32_t addr = 0x64;
if (det_type == defs::MYTHEN3) {
addr = 0x80;
}
if (det_type == defs::GOTTHARD2) {
addr = 0x20;
}
std::string saddr = ToStringHex(addr);
auto prev_val = det.readRegister(addr);
{