Browse Source

Rename command buffer var

Scott Lahteine 4 years ago
parent
commit
a2e412c0ce

+ 1
- 1
Marlin/src/feature/power_loss_recovery.cpp View File

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

+ 2
- 2
Marlin/src/gcode/gcode.cpp View File

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

+ 6
- 6
Marlin/src/gcode/queue.cpp View File

@@ -64,7 +64,7 @@ uint8_t GCodeQueue::length = 0,  // Count of commands in the queue
64 64
         GCodeQueue::index_r = 0, // Ring buffer read position
65 65
         GCodeQueue::index_w = 0; // Ring buffer write position
66 66
 
67
-char GCodeQueue::buffer[BUFSIZE][MAX_CMD_SIZE];
67
+char GCodeQueue::command_buffer[BUFSIZE][MAX_CMD_SIZE];
68 68
 
69 69
 /*
70 70
  * The port that the command was received on
@@ -135,7 +135,7 @@ bool GCodeQueue::_enqueue(const char* cmd, bool say_ok/*=false*/
135 135
   #endif
136 136
 ) {
137 137
   if (*cmd == ';' || length >= BUFSIZE) return false;
138
-  strcpy(buffer[index_w], cmd);
138
+  strcpy(command_buffer[index_w], cmd);
139 139
   _commit_command(say_ok
140 140
     #if NUM_SERIAL > 1
141 141
       , pn
@@ -242,7 +242,7 @@ void GCodeQueue::ok_to_send() {
242 242
   if (!send_ok[index_r]) return;
243 243
   SERIAL_ECHOPGM(MSG_OK);
244 244
   #if ENABLED(ADVANCED_OK)
245
-    char* p = buffer[index_r];
245
+    char* p = command_buffer[index_r];
246 246
     if (*p == 'N') {
247 247
       SERIAL_ECHO(' ');
248 248
       SERIAL_ECHO(*p++);
@@ -553,7 +553,7 @@ void GCodeQueue::get_serial_commands() {
553 553
         // Skip empty lines and comments
554 554
         if (!sd_count) { thermalManager.manage_heater(); continue; }
555 555
 
556
-        buffer[index_w][sd_count] = '\0'; // terminate string
556
+        command_buffer[index_w][sd_count] = '\0'; // terminate string
557 557
         sd_count = 0; // clear sd line buffer
558 558
 
559 559
         _commit_command(false);
@@ -574,7 +574,7 @@ void GCodeQueue::get_serial_commands() {
574 574
           #if ENABLED(PAREN_COMMENTS)
575 575
             && ! sd_comment_paren_mode
576 576
           #endif
577
-        ) buffer[index_w][sd_count++] = sd_char;
577
+        ) command_buffer[index_w][sd_count++] = sd_char;
578 578
       }
579 579
     }
580 580
   }
@@ -610,7 +610,7 @@ void GCodeQueue::advance() {
610 610
   #if ENABLED(SDSUPPORT)
611 611
 
612 612
     if (card.flag.saving) {
613
-      char* command = buffer[index_r];
613
+      char* command = command_buffer[index_r];
614 614
       if (is_M29(command)) {
615 615
         // M29 closes the file
616 616
         card.closefile();

+ 1
- 1
Marlin/src/gcode/queue.h View File

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

Loading…
Cancel
Save