G-code parser: move gcode_source stuff ...
... from gcode_process.c/.h to gcode_parse.c/.h.
This commit is contained in:
parent
017e17801c
commit
277de42b00
|
|
@ -19,6 +19,20 @@
|
|||
#endif
|
||||
|
||||
|
||||
/** Bitfield for available sources of G-code.
|
||||
|
||||
A typical source is the SD card or canned G-code. Serial is currently never
|
||||
turned off.
|
||||
*/
|
||||
enum gcode_source gcode_sources = GCODE_SOURCE_SERIAL;
|
||||
|
||||
/** Bitfield for the current source of G-code.
|
||||
|
||||
Only one bit should be set at a time. The bit is set at start reading a
|
||||
line and cleared when a line is done.
|
||||
*/
|
||||
enum gcode_source gcode_active = 0;
|
||||
|
||||
/// current or previous gcode word
|
||||
/// for working out what to do with data just received
|
||||
uint8_t last_field = 0;
|
||||
|
|
|
|||
|
|
@ -61,6 +61,15 @@ typedef struct {
|
|||
uint8_t checksum_calculated; ///< checksum we calculated
|
||||
} GCODE_COMMAND;
|
||||
|
||||
enum gcode_source {
|
||||
GCODE_SOURCE_SERIAL = 0b00000001,
|
||||
GCODE_SOURCE_SD = 0b00000010,
|
||||
};
|
||||
|
||||
|
||||
extern enum gcode_source gcode_sources;
|
||||
extern enum gcode_source gcode_active;
|
||||
|
||||
/// the command being processed
|
||||
extern GCODE_COMMAND next_target;
|
||||
|
||||
|
|
|
|||
|
|
@ -35,20 +35,6 @@ uint8_t tool;
|
|||
/// the tool to be changed when we get an M6
|
||||
uint8_t next_tool;
|
||||
|
||||
/** Bitfield for available sources of G-code.
|
||||
|
||||
A typical source is the SD card or canned G-code. Serial is currently never
|
||||
turned off.
|
||||
*/
|
||||
enum gcode_source gcode_sources = GCODE_SOURCE_SERIAL;
|
||||
|
||||
/** Bitfield for the current source of G-code.
|
||||
|
||||
Only one bit should be set at a time. The bit is set at start reading a
|
||||
line and cleared when a line is done.
|
||||
*/
|
||||
enum gcode_source gcode_active = 0;
|
||||
|
||||
/************************************************************************//**
|
||||
|
||||
\brief Processes command stored in global \ref next_target.
|
||||
|
|
|
|||
|
|
@ -3,14 +3,6 @@
|
|||
|
||||
#include "gcode_parse.h"
|
||||
|
||||
enum gcode_source {
|
||||
GCODE_SOURCE_SERIAL = 0b00000001,
|
||||
GCODE_SOURCE_SD = 0b00000010,
|
||||
};
|
||||
|
||||
|
||||
extern enum gcode_source gcode_sources;
|
||||
extern enum gcode_source gcode_active;
|
||||
|
||||
// the current tool
|
||||
extern uint8_t tool;
|
||||
|
|
|
|||
Loading…
Reference in New Issue