Browse Source

Merge branch 'Marlin_v1', remote-tracking branch 'origin/Marlin_v1' into Marlin_v1

Erik van der Zalm 13 years ago
parent
commit
0e7fee9a9b
4 changed files with 33 additions and 18 deletions
  1. 14
    6
      Marlin/Configuration.h
  2. 11
    0
      Marlin/Marlin.pde
  3. 7
    7
      Marlin/cardreader.h
  4. 1
    5
      Marlin/cardreader.pde

+ 14
- 6
Marlin/Configuration.h View File

@@ -90,6 +90,9 @@
90 90
   
91 91
 #define PIDTEMP
92 92
 #ifdef PIDTEMP
93
+  #if MOTHERBOARD == 62
94
+    #error Sanguinololu does not support PID, sorry. Please disable it.
95
+  #endif
93 96
   //#define PID_DEBUG // Sends debug data to the serial port. 
94 97
   //#define PID_OPENLOOP 1 // Puts PID in open loop. M104 sets the output power in %
95 98
   
@@ -195,7 +198,6 @@ const bool ENDSTOPS_INVERTING = true; // set to true to invert the logic of the
195 198
 
196 199
 //// MOVEMENT SETTINGS
197 200
 #define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
198
-//note: on bernhards ultimaker 200 200 12 are working well.
199 201
 #define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0}  // set the homing speeds (mm/min)
200 202
 
201 203
 #define AXIS_RELATIVE_MODES {false, false, false, false}
@@ -205,7 +207,7 @@ const bool ENDSTOPS_INVERTING = true; // set to true to invert the logic of the
205 207
 // default settings 
206 208
 
207 209
 #define DEFAULT_AXIS_STEPS_PER_UNIT   {78.7402,78.7402,200*8/3,760*1.1}                    // default steps per unit for ultimaker 
208
-//#define DEFAULT_AXIS_STEPS_PER_UNIT   {40, 40, 3333.92, 67} 
210
+//#define DEFAULT_AXIS_STEPS_PER_UNIT   {40, 40, 3333.92, 67} //sells mendel with v9 extruder
209 211
 #define DEFAULT_MAX_FEEDRATE          {500, 500, 5, 200000}    // (mm/sec)    
210 212
 #define DEFAULT_MAX_ACCELERATION      {9000,9000,100,10000}    // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for skeinforge 40+, for older versions raise them a lot.
211 213
 
@@ -239,7 +241,8 @@ const bool ENDSTOPS_INVERTING = true; // set to true to invert the logic of the
239 241
 #define EEPROM_CHITCHAT
240 242
 
241 243
 
242
-// The watchdog waits for the watchperiod in milliseconds whenever an M104 or M109 increases the target temperature
244
+// The hardware watchdog should halt the Microcontroller, in case the firmware gets stuck somewhere. However:
245
+// the Watchdog is not working well, so please only enable this for testing
243 246
 // this enables the watchdog interrupt.
244 247
 //#define USE_WATCHDOG
245 248
 //#ifdef USE_WATCHDOG
@@ -272,7 +275,7 @@ const bool ENDSTOPS_INVERTING = true; // set to true to invert the logic of the
272 275
 //#define ULTRA_LCD  //general lcd support, also 16x2
273 276
 //#define SDSUPPORT // Enable SD Card Support in Hardware Console
274 277
 
275
-#define ULTIPANEL
278
+//#define ULTIPANEL
276 279
 #ifdef ULTIPANEL
277 280
   //#define NEWPANEL  //enable this if you have a click-encoder panel
278 281
   #define SDSUPPORT
@@ -295,8 +298,13 @@ const bool ENDSTOPS_INVERTING = true; // set to true to invert the logic of the
295 298
 #define N_ARC_CORRECTION 25
296 299
 
297 300
 
298
-//automatic temperature: just for testing, this is very dangerous, keep disabled!
299
-// not working yet.
301
+//automatic temperature: The hot end target temperature is calculated by all the buffered lines of gcode.
302
+//The maximum buffered steps/sec of the extruder motor are called "se".
303
+//You enter the autotemp mode by a M109 S<mintemp> T<maxtemp> F<factor>
304
+// the target temperature is set to mintemp+factor*se[steps/sec] and limited by mintemp and maxtemp
305
+// you exit the value by any M109 without F*
306
+// Also, if the temperature is set to a value <mintemp, it is not changed by autotemp.
307
+// on an ultimaker, some initial testing worked with M109 S215 T260 F0.1 in the start.gcode
300 308
 //#define AUTOTEMP
301 309
 #ifdef AUTOTEMP
302 310
   #define AUTOTEMP_OLDWEIGHT 0.98

+ 11
- 0
Marlin/Marlin.pde View File

@@ -70,6 +70,8 @@
70 70
 // M114 - Display current position
71 71
 
72 72
 //Custom M Codes
73
+// M17  - Enable/Power all stepper motors
74
+// M18  - Disable all stepper motors; same as M84
73 75
 // M20  - List SD card
74 76
 // M21  - Init SD card
75 77
 // M22  - Release SD card
@@ -90,7 +92,9 @@
90 92
 //        or use S<seconds> to specify an inactivity timeout, after which the steppers will be disabled.  S0 to disable the timeout.
91 93
 // M85  - Set inactivity shutdown timer with parameter S<seconds>. To disable set zero (default)
92 94
 // M92  - Set axis_steps_per_unit - same syntax as G92
95
+// M114 - Output current position to serial port 
93 96
 // M115	- Capabilities string
97
+// M119 - Output Endstop status to serial port
94 98
 // M140 - Set bed target temp
95 99
 // M190 - Wait for bed current temp to reach target temp.
96 100
 // M200 - Set filament diameter
@@ -569,6 +573,13 @@ inline void process_commands()
569 573
 
570 574
     switch( (int)code_value() ) 
571 575
     {
576
+       case 17:
577
+        LCD_MESSAGEPGM("No move.");
578
+        enable_x(); 
579
+        enable_y(); 
580
+        enable_z(); 
581
+        enable_e(); 
582
+      break;
572 583
     #ifdef SDSUPPORT
573 584
 
574 585
     case 20: // M20 - list SD card

+ 7
- 7
Marlin/cardreader.h View File

@@ -20,17 +20,15 @@ public:
20 20
   void closefile();
21 21
   void release();
22 22
   void startFileprint();
23
-  //void startFilewrite(char *name);
24 23
   void pauseSDPrint();
25 24
   void getStatus();
26
-  void cd(char * absolutPath);
27
-  //void selectFile(char* name);
25
+
28 26
   void getfilename(const uint8_t nr);
29 27
   uint16_t getnrfilenames();
30 28
   
31 29
 
32 30
   void ls();
33
-  void lsDive(char *prepend,SdFile parent);
31
+  
34 32
 
35 33
   inline bool eof() { return sdpos>=filesize ;};
36 34
   inline int16_t get() {  sdpos = file.curPosition();return (int16_t)file.read();};
@@ -57,10 +55,13 @@ private:
57 55
   LsAction lsAction; //stored for recursion.
58 56
   int16_t nrFiles; //counter for the files in the current directory and recycled as position counter for getting the nrFiles'th name in the directory.
59 57
   char* diveDirName;
58
+  void lsDive(char *prepend,SdFile parent);
60 59
 };
61 60
   
62 61
 
63 62
 #else
63
+
64
+#define dir_t bool 
64 65
 class CardReader
65 66
 {
66 67
 public:
@@ -71,6 +72,7 @@ public:
71 72
   
72 73
   inline static void checkautostart(bool x) {}; 
73 74
   
75
+  inline static void openFile(char* name,bool read){};
74 76
   inline static void closefile() {};
75 77
   inline static void release(){};
76 78
   inline static void startFileprint(){};
@@ -87,9 +89,7 @@ public:
87 89
   inline static bool eof() {return true;};
88 90
   inline static char get() {return 0;};
89 91
   inline static void setIndex(){};
92
+  inline uint8_t percentDone(){return 0;};
90 93
 };
91 94
 #endif //SDSUPPORT
92
-  
93
-  
94
-  
95 95
 #endif

+ 1
- 5
Marlin/cardreader.pde View File

@@ -1,5 +1,5 @@
1
-#ifdef SDSUPPORT
2 1
 #include "cardreader.h"
2
+#ifdef SDSUPPORT
3 3
 
4 4
 CardReader::CardReader()
5 5
 {
@@ -378,9 +378,5 @@ uint16_t CardReader::getnrfilenames()
378 378
   return nrFiles;
379 379
 }
380 380
 
381
-void CardReader::cd(char * absolutPath)
382
-{
383
-  
384
-}
385 381
 
386 382
 #endif //SDSUPPORT

Loading…
Cancel
Save