Read GCODE from a laptop and parse it into usable structures.

Dependencies:   MODSERIAL mbed

Dependents:   DrawBot

Fork of gCodeParser by Alejandro Jimenez

Committer:
jford38
Date:
Tue Apr 29 21:51:12 2014 +0000
Revision:
1:7818b02dde4b
Parent:
0:fa0891ea897b
Child:
2:6e824fbbe94e
Before I fuck it all up. Doesn't really work. Only get zeros for args.

Who changed what in which revision?

UserRevisionLine numberNew 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
ajb88 0:fa0891ea897b 7 #define CMD_LIST_SIZE 512
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