added usleep to remove the 100%cpu, removed a insignificant printout

This commit is contained in:
Dhanya Maliakal
2017-07-26 11:36:31 +02:00
parent 0bacb903ea
commit 8a8e76e839
4 changed files with 13 additions and 11 deletions

View File

@ -1,9 +1,9 @@
Path: slsDetectorsPackage/slsReceiverSoftware
URL: origin git@git.psi.ch:sls_detectors_software/sls_receiver_software.git
Repository Root: origin git@git.psi.ch:sls_detectors_software/sls_receiver_software.git
Repsitory UUID: 52fc057d7620c0ca08583675c53c8e8f3a317277
Revision: 603
Branch: developer
Repsitory UUID: 0f98b8580c70f3866bc904033a65a269a6edd39c
Revision: 606
Branch: 3.0-rc
Last Changed Author: Dhanya_Maliakal
Last Changed Rev: 608
Last Changed Date: 2017-07-07 13:47:10.000000002 +0200 ./Makefile
Last Changed Rev: 611
Last Changed Date: 2017-07-26 11:21:45.000000002 +0200 ./src/main.cpp

View File

@ -1,11 +1,11 @@
//#define SVNPATH ""
#define SVNURL "git@git.psi.ch:sls_detectors_software/sls_receiver_software.git"
//#define SVNREPPATH ""
#define SVNREPUUID "52fc057d7620c0ca08583675c53c8e8f3a317277"
//#define SVNREV 0x608
#define SVNREPUUID "0f98b8580c70f3866bc904033a65a269a6edd39c"
//#define SVNREV 0x611
//#define SVNKIND ""
//#define SVNSCHED ""
#define SVNAUTH "Dhanya_Maliakal"
#define SVNREV 0x608
#define SVNDATE 0x20170707
#define SVNREV 0x611
#define SVNDATE 0x20170726
//

View File

@ -326,7 +326,7 @@ uint32_t Listener::ListenToAnImage(char* buf) {
//look for carry over
if (carryOverFlag) {
bprintf(RED,"%d carry flag\n",index);
//bprintf(RED,"%d carry flag\n",index);
//check if its the current image packet
// -------------------------- new header ----------------------------------------------------------------------
if (standardheader) {

View File

@ -58,6 +58,7 @@ void GetData(uint64_t frameNumber, uint32_t expLength, uint32_t packetNumber, ui
int main(int argc, char *argv[]) {
keeprunning = true;
bprintf(BLUE,"[ Pid: %ld ]\n", (long)getpid());
// Catch signal SIGINT to close files and call destructors properly
struct sigaction sa;
@ -137,7 +138,8 @@ int main(int argc, char *argv[]) {
FILE_LOG(logINFO) << "Ready ... ";
bprintf(GRAY, "\n[ Press \'Ctrl+c\' to exit ]\n");
while(keeprunning);
while(keeprunning)
usleep(5 * 1000 * 1000);
delete receiver;
FILE_LOG(logINFO) << "Goodbye!";