diff -u -r1.86 control.c
--- control.c 21 Jan 2007 05:34:47 -0000 1.86
+++ control.c 28 Jan 2007 20:05:37 -0000
@@ -268,25 +268,25 @@
for(i=0; i<CYCLE_HISTORY; i++) {
if (this_run > 1.2 * cycles[i]) {
emcmot_hal_data->overruns++;
- // print message on first overrun only
- if(emcmot_hal_data->overruns == 1) {
- reportError("Unexpected realtime delay; check dmesg for details.");
- rtapi_print_msg(RTAPI_MSG_ERR,
- "\nIn recent history there were\n");
- rtapi_print_msg(RTAPI_MSG_ERR, "%ld, %ld, %ld, %ld, and %ld\n",
- cycles[0], cycles[1], cycles[2], cycles[3], cycles[4]);
- rtapi_print_msg(RTAPI_MSG_ERR,
- "elapsed clocks between calls to the motion controller.\n");
- rtapi_print_msg(RTAPI_MSG_ERR,
- "This time, there were %ld which is so anomalously\n",
- this_run);
- rtapi_print_msg(RTAPI_MSG_ERR,
- "large that it probably signifies a problem with your\n");
- rtapi_print_msg(RTAPI_MSG_ERR,
- "realtime configuration. For the rest of this run of\n");
- rtapi_print_msg(RTAPI_MSG_ERR,
- "EMC, this message will be suppressed.\n\n");
- }
+ // print message on first overrun only
+ if(emcmot_hal_data->overruns == 1) {
+ int saved_level = rtapi_get_msg_level();
+ rtapi_set_msg_level(RTAPI_MSG_ALL);
+ reportError("Unexpected realtime delay: check dmesg for details.");
+ rtapi_print_msg(RTAPI_MSG_WARN,
+ "\nIn recent history there were\n"
+ "%ld, %ld, %ld, %ld, and %ld\n"
+ "elapsed clocks between calls to the motion controller.\n",
+ cycles[0], cycles[1], cycles[2], cycles[3], cycles[4]);
+ rtapi_print_msg(RTAPI_MSG_WARN,
+ "This time, there were %ld which is so anomalously\n"
+ "large that it probably signifies a problem with your\n"
+ "realtime configuration. For the rest of this run of\n"
+ "EMC, this message will be suppressed.\n\n",
+ this_run);
+ rtapi_set_msg_level(saved_level);
+ }
+
break;
}
}