<commit_before>/********************************************************************
* Description: motion_debug.h
*   A data structure used in only a few places
*
* Author:
* License: GPL Version 2
* System: Linux
*
* Copyright (c) 2004 All rights reserved
********************************************************************/

#ifndef MOTION_DEBUG_H
#define MOTION_DEBUG_H

#include "tp.h"			/* TP_STRUCT */
#include "tc.h"			/* TC_STRUCT, TC_QUEUE_STRUCT */
/*********************************
        DEBUG STRUCTURE
*********************************/

/* This is the debug structure.  I guess it was intended to make some
   of the motion controller's internal variables visible from user
   space for debugging, but it has evolved into a monster.
   180K last time I checked - most of it (174K or so) is the traj
   planner queues... each entry is 720 bytes, and there are 210
   entries in the main queue.
   I'll figure it out eventually though.
   Low level things will be exported thru the HAL so they can be
   monitored with halscope.  High level things will remain here,
   and things that are internal will be moved to a private structure.
*/

/*! \todo FIXME - this struct is broken into two parts... at the top are
   structure members that I understand, and that are needed for emc2.
   Other structure members follow.  All the later ones need to be
   evaluated - either they move up, or they go away.
*/

/*! \todo FIXME - this has become a dumping ground for all kinds of stuff */

    typedef struct emcmot_debug_t {
	unsigned char head;	/* flag count for mutex detect */

/*! \todo FIXME - all structure members beyond this point are in limbo */

	double tMin, tMax, tAvg;	/* trajectory min, max, avg times */
	double sMin, sMax, sAvg;	/* servo min, max, avg times */
	double nMin, nMax, nAvg;	/* min, max, avg times in DISABLED
					   mode */
	double yMin, yMax, yAvg;	/* min, max, avg times cycle times
					   rather than compute */
	double fMin, fMax, fAvg;	/* min, max, avg times frequency */
	double fyMin, fyMax, fyAvg;	/* min, max, avg times frequency
					   cycle times rather than compute */

	EMC_TELEOP_DATA teleop_data;
	int split;		/* number of split command reads */
	/* flag for enabling, disabling watchdog; multiple for down-stepping */
	int wdEnabling;
	int wdEnabled;
	int wdWait;
	int wdCount;
	unsigned char wdToggle;

	/* flag that all active axes are homed */
	unsigned char allHomed;

	TP_STRUCT coord_tp;	/* coordinated mode planner */

/* space for trajectory planner queues, plus 10 more for safety */
/*! \todo FIXME-- default is used; dynamic is not honored */
	TC_STRUCT queueTcSpace[DEFAULT_TC_QUEUE_SIZE + 10];

	EmcPose oldPos;		/* last position, used for vel differencing */
	EmcPose oldVel, newVel;	/* velocities, used for acc differencing */
	EmcPose newAcc;		/* differenced acc */

	int enabling;		/* starts up disabled */
	int coordinating;	/* starts up in free mode */
	int teleoperating;	/* starts up in free mode */

	int overriding;		/* non-zero means we've initiated an joint
				   move while overriding limits */

	int stepping;
	int idForStep;

#ifdef STRUCTS_IN_SHMEM
	emcmot_joint_t joints[EMCMOT_MAX_JOINTS];	/* joint data */
	emcmot_axis_t axes[EMCMOT_MAX_AXES];	        /* axis data */
#endif

	double start_time;
	double running_time;
	double cur_time;
	double last_time;
	unsigned char tail;	/* flag count for mutex detect */
    } emcmot_debug_t;

#endif // MOTION_DEBUG_H
<commit_msg>motion_debug.h: remove un-used variables<commit_after>/********************************************************************
* Description: motion_debug.h
*   A data structure used in only a few places
*
* Author:
* License: GPL Version 2
* System: Linux
*
* Copyright (c) 2004 All rights reserved
********************************************************************/

#ifndef MOTION_DEBUG_H
#define MOTION_DEBUG_H

#include "tp.h"			/* TP_STRUCT */
#include "tc.h"			/* TC_STRUCT, TC_QUEUE_STRUCT */
/*********************************
        DEBUG STRUCTURE
*********************************/

/* This is the debug structure.  I guess it was intended to make some
   of the motion controller's internal variables visible from user
   space for debugging, but it has evolved into a monster.
   180K last time I checked - most of it (174K or so) is the traj
   planner queues... each entry is 720 bytes, and there are 210
   entries in the main queue.
   I'll figure it out eventually though.
   Low level things will be exported thru the HAL so they can be
   monitored with halscope.  High level things will remain here,
   and things that are internal will be moved to a private structure.
*/

/*! \todo FIXME - this struct is broken into two parts... at the top are
   structure members that I understand, and that are needed for emc2.
   Other structure members follow.  All the later ones need to be
   evaluated - either they move up, or they go away.
*/

/*! \todo FIXME - this has become a dumping ground for all kinds of stuff */

    typedef struct emcmot_debug_t {
	unsigned char head;	/* flag count for mutex detect */

/*! \todo FIXME - all structure members beyond this point are in limbo */

	double tMin, tMax, tAvg;	/* trajectory min, max, avg times */
	double sMin, sMax, sAvg;	/* servo min, max, avg times */
	double nMin, nMax, nAvg;	/* min, max, avg times in DISABLED
					   mode */
	double yMin, yMax, yAvg;	/* min, max, avg times cycle times
					   rather than compute */
	double fMin, fMax, fAvg;	/* min, max, avg times frequency */
	double fyMin, fyMax, fyAvg;	/* min, max, avg times frequency
					   cycle times rather than compute */

	EMC_TELEOP_DATA teleop_data;
	int split;		/* number of split command reads */
	/* flag for enabling, disabling watchdog; multiple for down-stepping */
	int wdEnabling;
	int wdEnabled;
	int wdWait;
	int wdCount;
	unsigned char wdToggle;

	/* flag that all active axes are homed */
	unsigned char allHomed;

	TP_STRUCT coord_tp;	/* coordinated mode planner */

/* space for trajectory planner queues, plus 10 more for safety */
/*! \todo FIXME-- default is used; dynamic is not honored */
	TC_STRUCT queueTcSpace[DEFAULT_TC_QUEUE_SIZE + 10];

	int enabling;		/* starts up disabled */
	int coordinating;	/* starts up in free mode */
	int teleoperating;	/* starts up in free mode */

	int overriding;		/* non-zero means we've initiated an joint
				   move while overriding limits */

	int stepping;
	int idForStep;

#ifdef STRUCTS_IN_SHMEM
	emcmot_joint_t joints[EMCMOT_MAX_JOINTS];	/* joint data */
	emcmot_axis_t axes[EMCMOT_MAX_AXES];	        /* axis data */
#endif

	double start_time;
	double running_time;
	double cur_time;
	double last_time;
	unsigned char tail;	/* flag count for mutex detect */
    } emcmot_debug_t;

#endif // MOTION_DEBUG_H

{'fraction_non_alphanumeric': 0.13706107996459133, 'fraction_numerical': 0.006491590439657716, 'mean_word_length': 3.5193333333333334, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6693339', 'n_tokens_mistral': 2187, 'n_tokens_neox': 2030, 'n_words': 851}