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
   
90
   
91
 #define PIDTEMP
91
 #define PIDTEMP
92
 #ifdef PIDTEMP
92
 #ifdef PIDTEMP
93
+  #if MOTHERBOARD == 62
94
+    #error Sanguinololu does not support PID, sorry. Please disable it.
95
+  #endif
93
   //#define PID_DEBUG // Sends debug data to the serial port. 
96
   //#define PID_DEBUG // Sends debug data to the serial port. 
94
   //#define PID_OPENLOOP 1 // Puts PID in open loop. M104 sets the output power in %
97
   //#define PID_OPENLOOP 1 // Puts PID in open loop. M104 sets the output power in %
95
   
98
   
195
 
198
 
196
 //// MOVEMENT SETTINGS
199
 //// MOVEMENT SETTINGS
197
 #define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
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
 #define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0}  // set the homing speeds (mm/min)
201
 #define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0}  // set the homing speeds (mm/min)
200
 
202
 
201
 #define AXIS_RELATIVE_MODES {false, false, false, false}
203
 #define AXIS_RELATIVE_MODES {false, false, false, false}
205
 // default settings 
207
 // default settings 
206
 
208
 
207
 #define DEFAULT_AXIS_STEPS_PER_UNIT   {78.7402,78.7402,200*8/3,760*1.1}                    // default steps per unit for ultimaker 
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
 #define DEFAULT_MAX_FEEDRATE          {500, 500, 5, 200000}    // (mm/sec)    
211
 #define DEFAULT_MAX_FEEDRATE          {500, 500, 5, 200000}    // (mm/sec)    
210
 #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.
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
 #define EEPROM_CHITCHAT
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
 // this enables the watchdog interrupt.
246
 // this enables the watchdog interrupt.
244
 //#define USE_WATCHDOG
247
 //#define USE_WATCHDOG
245
 //#ifdef USE_WATCHDOG
248
 //#ifdef USE_WATCHDOG
272
 //#define ULTRA_LCD  //general lcd support, also 16x2
275
 //#define ULTRA_LCD  //general lcd support, also 16x2
273
 //#define SDSUPPORT // Enable SD Card Support in Hardware Console
276
 //#define SDSUPPORT // Enable SD Card Support in Hardware Console
274
 
277
 
275
-#define ULTIPANEL
278
+//#define ULTIPANEL
276
 #ifdef ULTIPANEL
279
 #ifdef ULTIPANEL
277
   //#define NEWPANEL  //enable this if you have a click-encoder panel
280
   //#define NEWPANEL  //enable this if you have a click-encoder panel
278
   #define SDSUPPORT
281
   #define SDSUPPORT
295
 #define N_ARC_CORRECTION 25
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
 //#define AUTOTEMP
308
 //#define AUTOTEMP
301
 #ifdef AUTOTEMP
309
 #ifdef AUTOTEMP
302
   #define AUTOTEMP_OLDWEIGHT 0.98
310
   #define AUTOTEMP_OLDWEIGHT 0.98

+ 11
- 0
Marlin/Marlin.pde View File

70
 // M114 - Display current position
70
 // M114 - Display current position
71
 
71
 
72
 //Custom M Codes
72
 //Custom M Codes
73
+// M17  - Enable/Power all stepper motors
74
+// M18  - Disable all stepper motors; same as M84
73
 // M20  - List SD card
75
 // M20  - List SD card
74
 // M21  - Init SD card
76
 // M21  - Init SD card
75
 // M22  - Release SD card
77
 // M22  - Release SD card
90
 //        or use S<seconds> to specify an inactivity timeout, after which the steppers will be disabled.  S0 to disable the timeout.
92
 //        or use S<seconds> to specify an inactivity timeout, after which the steppers will be disabled.  S0 to disable the timeout.
91
 // M85  - Set inactivity shutdown timer with parameter S<seconds>. To disable set zero (default)
93
 // M85  - Set inactivity shutdown timer with parameter S<seconds>. To disable set zero (default)
92
 // M92  - Set axis_steps_per_unit - same syntax as G92
94
 // M92  - Set axis_steps_per_unit - same syntax as G92
95
+// M114 - Output current position to serial port 
93
 // M115	- Capabilities string
96
 // M115	- Capabilities string
97
+// M119 - Output Endstop status to serial port
94
 // M140 - Set bed target temp
98
 // M140 - Set bed target temp
95
 // M190 - Wait for bed current temp to reach target temp.
99
 // M190 - Wait for bed current temp to reach target temp.
96
 // M200 - Set filament diameter
100
 // M200 - Set filament diameter
569
 
573
 
570
     switch( (int)code_value() ) 
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
     #ifdef SDSUPPORT
583
     #ifdef SDSUPPORT
573
 
584
 
574
     case 20: // M20 - list SD card
585
     case 20: // M20 - list SD card

+ 7
- 7
Marlin/cardreader.h View File

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

+ 1
- 5
Marlin/cardreader.pde View File

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

Loading…
Cancel
Save