From: EMC C. s. <cv...@cv...> - 2006-08-31 04:05:50
|
Modified file emc2/src/emc/motion/control.c Full file: <http://cvs.linuxcnc.org/cvs/emc2/src/emc/motion/control.c?rev=1.66> Difference: <http://cvs.linuxcnc.org/cvs/emc2/src/emc/motion/control.c.diff?r1=1.65;r2=1.66> Branch: HEAD Log: revision 1.66 date: 2006/08/31 04:05:45; author: jmkasunich; state: Exp; lines: +22 -22 fix a bug that would flood the system log --- control.c 2006/08/31 04:01:34 1.65 +++ control.c 2006/08/31 04:05:45 1.66 @@ -13,9 +13,9 @@ * Copyright (c) 2004 All rights reserved. * * Last change: -* $Revision: 1.65 $ +* $Revision: 1.66 $ * $Author: jmkasunich $ -* $Date: 2006/08/31 04:01:34 $ +* $Date: 2006/08/31 04:05:45 $ * ********************************************************************/ @@ -255,27 +255,27 @@ 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 anomolously\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"); + } break; } - } - // 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 anomolously\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"); } } if(last) { |