🧑‍💻 Apply F() to some LCD / TFT strings

Followup to #24228
This commit is contained in:
Scott Lahteine
2022-06-13 20:43:23 -05:00
parent c605c1ebb5
commit 78a3ea0ed4
20 changed files with 160 additions and 109 deletions

View File

@ -196,14 +196,15 @@ bool GCodeQueue::process_injected_command() {
* Never call this from a G-code handler!
*/
void GCodeQueue::enqueue_one_now(const char * const cmd) { while (!enqueue_one(cmd)) idle(); }
void GCodeQueue::enqueue_one_now(FSTR_P const fcmd) { while (!enqueue_one(fcmd)) idle(); }
/**
* Attempt to enqueue a single G-code command
* and return 'true' if successful.
*/
bool GCodeQueue::enqueue_one(FSTR_P const fgcode) {
bool GCodeQueue::enqueue_one(FSTR_P const fcmd) {
size_t i = 0;
PGM_P p = FTOP(fgcode);
PGM_P p = FTOP(fcmd);
char c;
while ((c = pgm_read_byte(&p[i])) && c != '\n') i++;
char cmd[i + 1];

View File

@ -141,12 +141,13 @@ public:
* Enqueue and return only when commands are actually enqueued
*/
static void enqueue_one_now(const char * const cmd);
static void enqueue_one_now(FSTR_P const fcmd);
/**
* Attempt to enqueue a single G-code command
* and return 'true' if successful.
*/
static bool enqueue_one(FSTR_P const fgcode);
static bool enqueue_one(FSTR_P const fcmd);
/**
* Enqueue with Serial Echo