Пример #1
0
static void print_pos(void) {
  char * axis = "xyze";
  int i;
  if (trace_pos) {
    for ( i = X_AXIS ; i < AXIS_MAX ; i++ ) {
      sim_info_cont("%c:%5d   ", axis[i], pos[i]);
    }
    if (verbose > 1)
      clearline();
    else
      sim_info_cont("               \r");
  }
}
Пример #2
0
static void print_pos(void) {
  char * axis = "xyze";
  int i;

  // Only print axes if different from last report
  for ( i = X_AXIS ; i < AXIS_MAX ; i++ )
    if (pos[i]/2 != prev_pos[i]/2) break;
  if (i == AXIS_MAX) return;
  for ( i = X_AXIS ; i < AXIS_MAX ; i++ )
    prev_pos[i] = pos[i];

  if (trace_pos) {
    for ( i = X_AXIS ; i < AXIS_MAX ; i++ ) {
      sim_info_cont("%c:%5d   ", axis[i], pos[i] / 2);
    }
    if (verbose > 1)
      clearline();
    else
      sim_info_cont("               \r");
  }
}