Rename command buffer var

This commit is contained in:
Scott Lahteine 2019-09-01 20:21:11 -05:00
parent d59d9b5973
commit a2e412c0ce
4 changed files with 10 additions and 10 deletions

View file

@ -212,7 +212,7 @@ void PrintJobRecovery::save(const bool force/*=false*/, const bool save_queue/*=
// Commands in the queue // Commands in the queue
info.queue_length = save_queue ? queue.length : 0; info.queue_length = save_queue ? queue.length : 0;
info.queue_index_r = queue.index_r; info.queue_index_r = queue.index_r;
COPY(info.queue_buffer, queue.buffer); COPY(info.queue_buffer, queue.command_buffer);
// Elapsed print job time // Elapsed print job time
info.print_job_elapsed = print_job_timer.duration(); info.print_job_elapsed = print_job_timer.duration();

View file

@ -812,7 +812,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
* This is called from the main loop() * This is called from the main loop()
*/ */
void GcodeSuite::process_next_command() { void GcodeSuite::process_next_command() {
char * const current_command = queue.buffer[queue.index_r]; char * const current_command = queue.command_buffer[queue.index_r];
PORT_REDIRECT(queue.port[queue.index_r]); PORT_REDIRECT(queue.port[queue.index_r]);
@ -821,7 +821,7 @@ void GcodeSuite::process_next_command() {
SERIAL_ECHOLN(current_command); SERIAL_ECHOLN(current_command);
#if ENABLED(M100_FREE_MEMORY_DUMPER) #if ENABLED(M100_FREE_MEMORY_DUMPER)
SERIAL_ECHOPAIR("slot:", queue.index_r); SERIAL_ECHOPAIR("slot:", queue.index_r);
M100_dump_routine(PSTR(" Command Queue:"), queue.buffer, queue.buffer + sizeof(queue.buffer)); M100_dump_routine(PSTR(" Command Queue:"), queue.command_buffer, queue.command_buffer + sizeof(queue.command_buffer));
#endif #endif
} }

View file

@ -64,7 +64,7 @@ uint8_t GCodeQueue::length = 0, // Count of commands in the queue
GCodeQueue::index_r = 0, // Ring buffer read position GCodeQueue::index_r = 0, // Ring buffer read position
GCodeQueue::index_w = 0; // Ring buffer write position GCodeQueue::index_w = 0; // Ring buffer write position
char GCodeQueue::buffer[BUFSIZE][MAX_CMD_SIZE]; char GCodeQueue::command_buffer[BUFSIZE][MAX_CMD_SIZE];
/* /*
* The port that the command was received on * The port that the command was received on
@ -135,7 +135,7 @@ bool GCodeQueue::_enqueue(const char* cmd, bool say_ok/*=false*/
#endif #endif
) { ) {
if (*cmd == ';' || length >= BUFSIZE) return false; if (*cmd == ';' || length >= BUFSIZE) return false;
strcpy(buffer[index_w], cmd); strcpy(command_buffer[index_w], cmd);
_commit_command(say_ok _commit_command(say_ok
#if NUM_SERIAL > 1 #if NUM_SERIAL > 1
, pn , pn
@ -242,7 +242,7 @@ void GCodeQueue::ok_to_send() {
if (!send_ok[index_r]) return; if (!send_ok[index_r]) return;
SERIAL_ECHOPGM(MSG_OK); SERIAL_ECHOPGM(MSG_OK);
#if ENABLED(ADVANCED_OK) #if ENABLED(ADVANCED_OK)
char* p = buffer[index_r]; char* p = command_buffer[index_r];
if (*p == 'N') { if (*p == 'N') {
SERIAL_ECHO(' '); SERIAL_ECHO(' ');
SERIAL_ECHO(*p++); SERIAL_ECHO(*p++);
@ -553,7 +553,7 @@ void GCodeQueue::get_serial_commands() {
// Skip empty lines and comments // Skip empty lines and comments
if (!sd_count) { thermalManager.manage_heater(); continue; } if (!sd_count) { thermalManager.manage_heater(); continue; }
buffer[index_w][sd_count] = '\0'; // terminate string command_buffer[index_w][sd_count] = '\0'; // terminate string
sd_count = 0; // clear sd line buffer sd_count = 0; // clear sd line buffer
_commit_command(false); _commit_command(false);
@ -574,7 +574,7 @@ void GCodeQueue::get_serial_commands() {
#if ENABLED(PAREN_COMMENTS) #if ENABLED(PAREN_COMMENTS)
&& ! sd_comment_paren_mode && ! sd_comment_paren_mode
#endif #endif
) buffer[index_w][sd_count++] = sd_char; ) command_buffer[index_w][sd_count++] = sd_char;
} }
} }
} }
@ -610,7 +610,7 @@ void GCodeQueue::advance() {
#if ENABLED(SDSUPPORT) #if ENABLED(SDSUPPORT)
if (card.flag.saving) { if (card.flag.saving) {
char* command = buffer[index_r]; char* command = command_buffer[index_r];
if (is_M29(command)) { if (is_M29(command)) {
// M29 closes the file // M29 closes the file
card.closefile(); card.closefile();

View file

@ -51,7 +51,7 @@ public:
static uint8_t length, // Count of commands in the queue static uint8_t length, // Count of commands in the queue
index_r; // Ring buffer read position index_r; // Ring buffer read position
static char buffer[BUFSIZE][MAX_CMD_SIZE]; static char command_buffer[BUFSIZE][MAX_CMD_SIZE];
/* /*
* The port that the command was received on * The port that the command was received on