![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Read GCODE from a laptop and parse it into usable structures.
Fork of gCodeParser by
gparser.h@2:6e824fbbe94e, 2014-04-30 (annotated)
- Committer:
- jford38
- Date:
- Wed Apr 30 01:46:44 2014 +0000
- Revision:
- 2:6e824fbbe94e
- Parent:
- 1:7818b02dde4b
Final Commit before 4180 deadline.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ajb88 | 0:fa0891ea897b | 1 | #ifndef PARSER_H |
ajb88 | 0:fa0891ea897b | 2 | #define PARSER_H |
ajb88 | 0:fa0891ea897b | 3 | |
ajb88 | 0:fa0891ea897b | 4 | #include "MODSERIAL.h" |
ajb88 | 0:fa0891ea897b | 5 | |
ajb88 | 0:fa0891ea897b | 6 | #define CMD_BUFFER_SIZE 200 |
jford38 | 2:6e824fbbe94e | 7 | #define CMD_LIST_SIZE 1024 |
ajb88 | 0:fa0891ea897b | 8 | |
ajb88 | 0:fa0891ea897b | 9 | // struct to hold a Gcode command |
ajb88 | 0:fa0891ea897b | 10 | typedef struct { |
ajb88 | 0:fa0891ea897b | 11 | int G; |
ajb88 | 0:fa0891ea897b | 12 | float X; |
ajb88 | 0:fa0891ea897b | 13 | float Y; |
ajb88 | 0:fa0891ea897b | 14 | float Z; |
ajb88 | 0:fa0891ea897b | 15 | float F; |
ajb88 | 0:fa0891ea897b | 16 | float I; |
ajb88 | 0:fa0891ea897b | 17 | float J; |
ajb88 | 0:fa0891ea897b | 18 | }G_cmd; |
ajb88 | 0:fa0891ea897b | 19 | |
ajb88 | 0:fa0891ea897b | 20 | |
ajb88 | 0:fa0891ea897b | 21 | void parseGcode(); |
ajb88 | 0:fa0891ea897b | 22 | void parserInit(); |
jford38 | 1:7818b02dde4b | 23 | int fillInCmdList(); |
ajb88 | 0:fa0891ea897b | 24 | void cmd_Received(MODSERIAL_IRQ_INFO *q); |
ajb88 | 0:fa0891ea897b | 25 | |
ajb88 | 0:fa0891ea897b | 26 | #endif |