🎨 Apply F() to G-code suite and queue
This commit is contained in:
committed by
Scott Lahteine
parent
2b9ae0cc33
commit
46c53f6730
@@ -126,7 +126,7 @@ bool GCodeQueue::RingBuffer::enqueue(const char *cmd, bool skip_ok/*=true*/
|
||||
* Enqueue with Serial Echo
|
||||
* Return true if the command was consumed
|
||||
*/
|
||||
bool GCodeQueue::enqueue_one(const char *cmd) {
|
||||
bool GCodeQueue::enqueue_one(const char * const cmd) {
|
||||
//SERIAL_ECHOLNPGM("enqueue_one(\"", cmd, "\")");
|
||||
|
||||
if (*cmd == 0 || ISEOL(*cmd)) return true;
|
||||
@@ -195,15 +195,15 @@ bool GCodeQueue::process_injected_command() {
|
||||
* Enqueue and return only when commands are actually enqueued.
|
||||
* Never call this from a G-code handler!
|
||||
*/
|
||||
void GCodeQueue::enqueue_one_now(const char *cmd) { while (!enqueue_one(cmd)) idle(); }
|
||||
void GCodeQueue::enqueue_one_now(const char * const cmd) { while (!enqueue_one(cmd)) idle(); }
|
||||
|
||||
/**
|
||||
* Attempt to enqueue a single G-code command
|
||||
* and return 'true' if successful.
|
||||
*/
|
||||
bool GCodeQueue::enqueue_one_P(PGM_P const pgcode) {
|
||||
bool GCodeQueue::enqueue_one(FSTR_P const fgcode) {
|
||||
size_t i = 0;
|
||||
PGM_P p = pgcode;
|
||||
PGM_P p = FTOP(fgcode);
|
||||
char c;
|
||||
while ((c = pgm_read_byte(&p[i])) && c != '\n') i++;
|
||||
char cmd[i + 1];
|
||||
|
Reference in New Issue
Block a user