Ejemplo n.º 1
0
// Executes one line of input according to protocol
uint8_t protocol_execute_line(char *line)
{
  if(line[0] == '$') {

    // TODO: Re-write this '$' as a way to change runtime settings without having to reset, i.e.
    // auto-starting, status query output formatting and type, jog mode (axes, direction, and
    // nominal feedrate), toggle block delete, etc. This differs from the EEPROM settings, as they
    // are considered defaults and loaded upon startup/reset.
    //   This use is envisioned where '$' itself dumps settings and help. Defined characters
    // proceeding the '$' may be used to setup modes, such as jog mode with a '$J=X100' for X-axis
    // motion with a nominal feedrate of 100mm/min. Writing EEPROM settings will likely stay the
    // same or similar. Should be worked out in upcoming releases.
    return(settings_execute_line(line)); // Delegate lines starting with '$' to the settings module

  // } else if {
  //
  // JOG MODE
  //
  // TODO: Here jogging can be placed for execution as a seperate subprogram. It does not need to be
  // susceptible to other runtime commands except for e-stop. The jogging function is intended to
  // be a basic toggle on/off with controlled acceleration and deceleration to prevent skipped
  // steps. The user would supply the desired feedrate, axis to move, and direction. Toggle on would
  // start motion and toggle off would initiate a deceleration to stop. One could 'feather' the
  // motion by repeatedly toggling to slow the motion to the desired location. Location data would
  // need to be updated real-time and supplied to the user through status queries.
  //   More controlled exact motions can be taken care of by inputting G0 or G1 commands, which are
  // handled by the planner. It would be possible for the jog subprogram to insert blocks into the
  // block buffer without having the planner plan them. It would need to manage de/ac-celerations
  // on its own carefully. This approach could be effective and possibly size/memory efficient.

  } else {
    return(gc_execute_line(line));    // Everything else is gcode
  }
}
Ejemplo n.º 2
0
// Executes one line of input according to protocol
uint8_t protocol_execute_line(char *line) 
{     
  if(line[0] == '$') {
    return(settings_execute_line(line)); // Delegate lines starting with '$' to the settings module
  } else {
    return(gc_execute_line(line));    // Everything else is gcode
  }
}