removed support for echoing of steps via serial
This commit is contained in:
parent
ddcdce2640
commit
2b0e19993d
7
gcode.c
7
gcode.c
@ -96,9 +96,9 @@ struct ParserState gc;
|
|||||||
|
|
||||||
#define FAIL(status) gc.status_code = status;
|
#define FAIL(status) gc.status_code = status;
|
||||||
|
|
||||||
int read_double(char *line, //!< string: line of RS274/NGC code being processed
|
int read_double(char *line, // <- string: line of RS274/NGC code being processed
|
||||||
int *counter, //!< pointer to a counter for position on the line
|
int *counter, // <- pointer to a counter for position on the line
|
||||||
double *double_ptr); //!< pointer to double to be read
|
double *double_ptr); // <- pointer to double to be read
|
||||||
|
|
||||||
int next_statement(char *letter, double *double_ptr, char *line, int *counter);
|
int next_statement(char *letter, double *double_ptr, char *line, int *counter);
|
||||||
|
|
||||||
@ -237,7 +237,6 @@ uint8_t gc_execute_line(char *line) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Perform any physical actions
|
// Perform any physical actions
|
||||||
sp_send_execution_marker();
|
|
||||||
switch (next_action) {
|
switch (next_action) {
|
||||||
case NEXT_ACTION_GO_HOME: mc_go_home(); break;
|
case NEXT_ACTION_GO_HOME: mc_go_home(); break;
|
||||||
case NEXT_ACTION_DWELL: mc_dwell(trunc(p*1000)); break;
|
case NEXT_ACTION_DWELL: mc_dwell(trunc(p*1000)); break;
|
||||||
|
@ -36,12 +36,6 @@ void prompt() {
|
|||||||
line_counter = 0;
|
line_counter = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sp_send_execution_marker()
|
|
||||||
{
|
|
||||||
printByte(EXECUTION_MARKER);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void print_result() {
|
void print_result() {
|
||||||
double position[3];
|
double position[3];
|
||||||
int inches_mode;
|
int inches_mode;
|
||||||
@ -85,12 +79,8 @@ void sp_process()
|
|||||||
{
|
{
|
||||||
if((c < 32)) { // Line is complete. Then execute!
|
if((c < 32)) { // Line is complete. Then execute!
|
||||||
line[line_counter] = 0;
|
line[line_counter] = 0;
|
||||||
// printByte('"');
|
|
||||||
// printString(line);
|
|
||||||
// printByte('"');
|
|
||||||
gc_execute_line(line);
|
gc_execute_line(line);
|
||||||
line_counter = 0;
|
line_counter = 0;
|
||||||
//print_result();
|
|
||||||
prompt();
|
prompt();
|
||||||
} else if (c == ' ' || c == '\t') { // Throw away whitepace
|
} else if (c == ' ' || c == '\t') { // Throw away whitepace
|
||||||
} else if (c >= 'a' && c <= 'z') { // Upcase lowercase
|
} else if (c >= 'a' && c <= 'z') { // Upcase lowercase
|
||||||
|
10
stepper.c
10
stepper.c
@ -43,7 +43,6 @@ volatile uint32_t current_pace;
|
|||||||
volatile uint32_t next_pace = 0;
|
volatile uint32_t next_pace = 0;
|
||||||
|
|
||||||
uint8_t stepper_mode = STEPPER_MODE_STOPPED;
|
uint8_t stepper_mode = STEPPER_MODE_STOPPED;
|
||||||
uint8_t echo_steps = true;
|
|
||||||
|
|
||||||
void config_pace_timer(uint32_t microseconds);
|
void config_pace_timer(uint32_t microseconds);
|
||||||
|
|
||||||
@ -115,10 +114,6 @@ void st_buffer_step(uint8_t motor_port_bits)
|
|||||||
{
|
{
|
||||||
// Buffer nothing unless stepping subsystem is running
|
// Buffer nothing unless stepping subsystem is running
|
||||||
if (stepper_mode != STEPPER_MODE_RUNNING) { return; }
|
if (stepper_mode != STEPPER_MODE_RUNNING) { return; }
|
||||||
// Echo steps. If bit 7 is set, the message is internal to Grbl and should not be echoed
|
|
||||||
if (echo_steps && !(motor_port_bits&0x80)) {
|
|
||||||
printByte('!'+motor_port_bits);
|
|
||||||
}
|
|
||||||
// Calculate the buffer head after we push this byte
|
// Calculate the buffer head after we push this byte
|
||||||
int next_buffer_head = (step_buffer_head + 1) % STEP_BUFFER_SIZE;
|
int next_buffer_head = (step_buffer_head + 1) % STEP_BUFFER_SIZE;
|
||||||
// If the buffer is full: good! That means we are well ahead of the robot.
|
// If the buffer is full: good! That means we are well ahead of the robot.
|
||||||
@ -283,11 +278,6 @@ void st_go_home()
|
|||||||
// Todo: Perform the homing cycle
|
// Todo: Perform the homing cycle
|
||||||
}
|
}
|
||||||
|
|
||||||
void st_set_echo(int value)
|
|
||||||
{
|
|
||||||
echo_steps = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Convert from millimeters to step-counts along the designated axis
|
// Convert from millimeters to step-counts along the designated axis
|
||||||
int32_t st_millimeters_to_steps(double millimeters, int axis) {
|
int32_t st_millimeters_to_steps(double millimeters, int axis) {
|
||||||
switch(axis) {
|
switch(axis) {
|
||||||
|
Loading…
Reference in New Issue
Block a user