Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Gcode.h
- Committer:
- jarming
- Date:
- 2014-05-14
- Revision:
- 0:1d67da0805fd
File content as of revision 0:1d67da0805fd:
#ifndef GCODE_H
#define GCODE_H
#include <string>
using std::string;
#include<stdlib.h>
#include"mbed.h"
// Object to represent a Gcode command
class Gcode {
public:
Gcode(const string&, Serial*);
Gcode(const Gcode& to_copy);
Gcode& operator= (const Gcode& to_copy);
bool has_letter ( char letter );
float get_float ( char letter );
// float get_double ( char letter );
int get_int ( char letter );
int get_num_args();
void prepare_cached_values();
void mark_as_taken();
string command;
bool has_m;
bool has_g;
unsigned int m;
unsigned int g;
Serial *stream;
bool add_nl;
string txt_after_ok;
bool accepted_by_module;
float millimeters_of_travel;
};
#endif