formatting

This commit is contained in:
maliakal_d 2024-02-07 13:25:11 +01:00
parent 56abf82d92
commit 64d489f1e6
3 changed files with 98 additions and 90 deletions

View File

@ -1992,7 +1992,8 @@ int acquire(int blocking, int file_des) {
// chipv1.1 has to be configured before acquisition // chipv1.1 has to be configured before acquisition
if (getChipVersion() == 11 && !isChipConfigured()) { if (getChipVersion() == 11 && !isChipConfigured()) {
ret = FAIL; ret = FAIL;
strcpy(mess, "Could not start acquisition. Chip is not configured. " strcpy(mess,
"Could not start acquisition. Chip is not configured. "
"Power it on to configure it.\n"); "Power it on to configure it.\n");
LOG(logERROR, (mess)); LOG(logERROR, (mess));
} else } else
@ -2012,7 +2013,8 @@ int acquire(int blocking, int file_des) {
getReadoutMode() == DIGITAL_AND_TRANSCEIVER) && getReadoutMode() == DIGITAL_AND_TRANSCEIVER) &&
(getNumDigitalSamples() <= 0)) { (getNumDigitalSamples() <= 0)) {
ret = FAIL; ret = FAIL;
sprintf(mess, sprintf(
mess,
"Could not start acquisition. Invalid number of digital " "Could not start acquisition. Invalid number of digital "
"samples: %d.\n", "samples: %d.\n",
getNumDigitalSamples()); getNumDigitalSamples());
@ -2021,9 +2023,9 @@ int acquire(int blocking, int file_des) {
getReadoutMode() == DIGITAL_AND_TRANSCEIVER) && getReadoutMode() == DIGITAL_AND_TRANSCEIVER) &&
(getNumTransceiverSamples() <= 0)) { (getNumTransceiverSamples() <= 0)) {
ret = FAIL; ret = FAIL;
sprintf( sprintf(mess,
mess, "Could not start acquisition. Invalid number of "
"Could not start acquisition. Invalid number of transceiver " "transceiver "
"samples: %d.\n", "samples: %d.\n",
getNumTransceiverSamples()); getNumTransceiverSamples());
LOG(logERROR, (mess)); LOG(logERROR, (mess));
@ -2037,7 +2039,8 @@ int acquire(int blocking, int file_des) {
char src_mac[MAC_ADDRESS_SIZE]; char src_mac[MAC_ADDRESS_SIZE];
getMacAddressinString(src_mac, MAC_ADDRESS_SIZE, sourcemac); getMacAddressinString(src_mac, MAC_ADDRESS_SIZE, sourcemac);
sprintf(mess, sprintf(mess,
"Invalid udp source mac address for this detector. Must be " "Invalid udp source mac address for this detector. "
"Must be "
"same as hardware detector mac address %s\n", "same as hardware detector mac address %s\n",
src_mac); src_mac);
LOG(logERROR, (mess)); LOG(logERROR, (mess));
@ -2047,8 +2050,10 @@ int acquire(int blocking, int file_des) {
uint32_t sourceip = getDetectorIP(); uint32_t sourceip = getDetectorIP();
char src_ip[INET_ADDRSTRLEN]; char src_ip[INET_ADDRSTRLEN];
getIpAddressinString(src_ip, sourceip); getIpAddressinString(src_ip, sourceip);
sprintf(mess, sprintf(
"Invalid udp source ip address for this detector. Must be " mess,
"Invalid udp source ip address for this detector. Must "
"be "
"same as hardware detector ip address %s in 1G readout " "same as hardware detector ip address %s in 1G readout "
"mode \n", "mode \n",
src_ip); src_ip);
@ -2062,7 +2067,8 @@ int acquire(int blocking, int file_des) {
LOG(logERROR, (mess)); LOG(logERROR, (mess));
} else if (sharedMemory_getScanStatus() == RUNNING) { } else if (sharedMemory_getScanStatus() == RUNNING) {
ret = FAIL; ret = FAIL;
strcpy(mess, "Could not start acquisition because a scan is " strcpy(mess,
"Could not start acquisition because a scan is "
"already running!\n"); "already running!\n");
LOG(logERROR, (mess)); LOG(logERROR, (mess));
} else { } else {
@ -2077,7 +2083,8 @@ int acquire(int blocking, int file_des) {
} else { } else {
// wait for blocking always (scan or not) // wait for blocking always (scan or not)
// non blocking-no scan also wait (for error message) // non blocking-no scan also wait (for error message)
// non blcoking-scan dont wait (there is scanErrorMessage) // non blcoking-scan dont wait (there is
// scanErrorMessage)
if (blocking || !scan) { if (blocking || !scan) {
pthread_join(pthread_tid, NULL); pthread_join(pthread_tid, NULL);
} }

View File

@ -511,7 +511,8 @@ int waitTransceiverAligned(char *mess) {
// no module: transceiver will never get aligned // no module: transceiver will never get aligned
if (!checkModuleFlag) { if (!checkModuleFlag) {
LOG(logWARNING, ("No module: Transceiver will never get aligned. Ignoring alignment check.\n")); LOG(logWARNING, ("No module: Transceiver will never get aligned. "
"Ignoring alignment check.\n"));
return OK; return OK;
} }