Browse Source

Clean "fromsd" array is not SDSUPPORT

if not have SDSUPPORT the fromsd array is not necessary
Victor Torre 9 years ago
parent
commit
d43d47da14
1 changed files with 6 additions and 1 deletions
  1. 6
    1
      Marlin/Marlin_main.cpp

+ 6
- 1
Marlin/Marlin_main.cpp View File

@@ -395,7 +395,9 @@ static long gcode_N, gcode_LastN, Stopped_gcode_LastN = 0;
395 395
 static bool relative_mode = false;  //Determines Absolute or Relative Coordinates
396 396
 
397 397
 static char cmdbuffer[BUFSIZE][MAX_CMD_SIZE];
398
+#ifdef SDSUPPORT
398 399
 static bool fromsd[BUFSIZE];
400
+#endif //!SDSUPPORT
399 401
 static int bufindr = 0;
400 402
 static int bufindw = 0;
401 403
 static int buflen = 0;
@@ -655,10 +657,12 @@ void setup()
655 657
   SERIAL_ECHO(freeMemory());
656 658
   SERIAL_ECHOPGM(MSG_PLANNER_BUFFER_BYTES);
657 659
   SERIAL_ECHOLN((int)sizeof(block_t)*BLOCK_BUFFER_SIZE);
660
+  #ifdef SDSUPPORT
658 661
   for(int8_t i = 0; i < BUFSIZE; i++)
659 662
   {
660 663
     fromsd[i] = false;
661 664
   }
665
+  #endif //!SDSUPPORT
662 666
 
663 667
   // loads data from EEPROM if available else uses defaults (and resets step acceleration rate)
664 668
   Config_RetrieveSettings();
@@ -764,8 +768,9 @@ void get_command()
764 768
         return;
765 769
       }
766 770
       cmdbuffer[bufindw][serial_count] = 0; //terminate string
767
-
771
+      #ifdef SDSUPPORT
768 772
       fromsd[bufindw] = false;
773
+      #endif //!SDSUPPORT
769 774
       if(strchr(cmdbuffer[bufindw], 'N') != NULL)
770 775
       {
771 776
         strchr_pointer = strchr(cmdbuffer[bufindw], 'N');

Loading…
Cancel
Save