Revision 7ed40bef src/server/server.cpp
src/server/server.cpp | ||
---|---|---|
106 | 106 |
|
107 | 107 |
unsigned int incoming_data_count = joint_interface->get_and_clear_incoming_position_count(); |
108 | 108 |
if (incoming_data_count == 0){ |
109 |
incoming_data_count_invalid++;
|
|
110 |
if (incoming_data_count_invalid >= MOTION_UPDATERATE){
|
|
111 |
printf("> waiting for valid incoming joint data (position+velocity)\n");
|
|
112 |
incoming_data_count_invalid = 0;
|
|
113 |
}
|
|
109 |
incoming_data_count_invalid++; |
|
110 |
if (incoming_data_count_invalid >= MOTION_UPDATERATE){ |
|
111 |
printf("> waiting for valid incoming joint data (position+velocity)\n"); |
|
112 |
incoming_data_count_invalid = 0; |
|
113 |
} |
|
114 | 114 |
}else{ |
115 | 115 |
//fine, joint data is arriving, exit waiting loop |
116 | 116 |
break; |
... | ... | |
143 | 143 |
//check if we received joint information in the last step: |
144 | 144 |
unsigned int incoming_data_count = joint_interface->get_and_clear_incoming_position_count(); |
145 | 145 |
if (incoming_data_count == 0){ |
146 |
//printf("> WARNING: no incoming joint data during the last iteration...\n");
|
|
147 |
incoming_data_count_invalid++;
|
|
148 |
if (incoming_data_count_invalid >= MOTION_UPDATERATE){
|
|
149 |
printf("> ERROR: no incoming joint data for >1 second -> will exit now\n");
|
|
150 |
exit(EXIT_FAILURE);
|
|
151 |
}
|
|
146 |
//printf("> WARNING: no incoming joint data during the last iteration...\n"); |
|
147 |
incoming_data_count_invalid++; |
|
148 |
if (incoming_data_count_invalid >= MOTION_UPDATERATE){ |
|
149 |
printf("> ERROR: no incoming joint data for >1 second -> will exit now\n"); |
|
150 |
exit(EXIT_FAILURE); |
|
151 |
} |
|
152 | 152 |
}else{ |
153 |
incoming_data_count_invalid = 0;
|
|
153 |
incoming_data_count_invalid = 0; |
|
154 | 154 |
} |
155 | 155 |
|
156 | 156 |
thread::sleep(timeout); |
Also available in: Unified diff