瀏覽代碼

get latest Marlin_v1 changes

Scott Lahteine 10 年之前
父節點
當前提交
5714f64927

+ 14
- 0
.travis.yml 查看文件

@@ -0,0 +1,14 @@
1
+---
2
+language: c
3
+
4
+before_install:
5
+  - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
6
+  - sudo apt-get update -qq
7
+install:
8
+  - sudo apt-get install -qq gcc-avr binutils-avr avr-libc gcc-4.8 g++-4.8 arduino
9
+  - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 90
10
+  - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 90
11
+  - gcc --version
12
+  - g++ --version
13
+
14
+script: "cd Marlin && make HARDWARE_MOTHERBOARD=70 ARDUINO_INSTALL_DIR=/usr/share/arduino"

+ 53
- 0
DEADJOE 查看文件

@@ -0,0 +1,53 @@
1
+
2
+*** These modified files were found in JOE when it aborted on Wed Nov 26 20:52:44 2014
3
+*** JOE was aborted because the terminal closed
4
+
5
+*** File '/Volumes/Projects/MAKER/Firmware/Marlin-thinkyhead/.git/MERGE_MSG'
6
+Merge remote-tracking branch 'upstream/Marlin_v1' into lcd_wait_better
7
+
8
+# Please enter a commit message to explain why this merge is necessary,
9
+# especially if it merges an updated upstream into a topic branch.
10
+#
11
+# Lines starting with '#' will be ignored, and an empty message aborts
12
+# the commit.
13
+
14
+*** File '(Unnamed)'
15
+sort
16
+echo
17
+
18
+*** File '(Unnamed)'
19
+d7
20
+/drupal7
21
+3bl-justmeans-wp/editorial
22
+SLICER_HOME
23
+remindmeinbox
24
+&>
25
+8
26
+alchemist
27
+/Users/lordscott/Sites/git.loc
28
+goth
29
+
30
+*** File '(Unnamed)'
31
+mysql
32
+socket
33
+.sock
34
+error_repo
35
+zone
36
+ini_set
37
+localhost
38
+/Library/WebServer/Documents/gitprojects
39
+mydemoproject1
40
+alias
41
+
42
+*** File '(Unnamed)'
43
+/Users/lordscott/bin/clean
44
+thinkyhead.conf
45
+/etc/hosts
46
+thinkyhead.conf
47
+drupal7.conf
48
+thinkyhead.conf
49
+thinkyhead.conf
50
+thinkyhead.conf
51
+drupal7.conf
52
+thinkyhead.conf
53
+/Volumes/Projects/MAKER/Firmware/Marlin-thinkyhead/.git/MERGE_MSG

+ 34
- 2
Marlin/Configuration.h 查看文件

@@ -31,7 +31,6 @@
31 31
 #define SERIAL_PORT 0
32 32
 
33 33
 // This determines the communication speed of the printer
34
-// This determines the communication speed of the printer
35 34
 #define BAUDRATE 250000
36 35
 
37 36
 // This enables the serial port associated to the Bluetooth interface
@@ -49,6 +48,7 @@
49 48
 // 33 = RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Bed)
50 49
 // 34 = RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Bed)
51 50
 // 35 = RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Fan)
51
+// 36 = RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Fan)
52 52
 // 4  = Duemilanove w/ ATMega328P pin assignment
53 53
 // 5  = Gen6
54 54
 // 51 = Gen6 deluxe
@@ -127,6 +127,7 @@
127 127
 // 10 is 100k RS thermistor 198-961 (4.7k pullup)
128 128
 // 11 is 100k beta 3950 1% thermistor (4.7k pullup)
129 129
 // 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
130
+// 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" 
130 131
 // 20 is the PT100 circuit found in the Ultimainboard V2.x
131 132
 // 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
132 133
 //
@@ -192,7 +193,7 @@
192 193
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
193 194
   #define PID_INTEGRAL_DRIVE_MAX 255  //limit for the integral term
194 195
   #define K1 0.95 //smoothing factor within the PID
195
-  #define PID_dT ((OVERSAMPLENR * 8.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
196
+  #define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
196 197
 
197 198
 // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
198 199
 // Ultimaker
@@ -765,6 +766,37 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
765 766
 //#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1
766 767
 //#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles
767 768
 
769
+/**********************************************************************\
770
+ * Support for a filament diameter sensor
771
+ * Also allows adjustment of diameter at print time (vs  at slicing)
772
+ * Single extruder only at this point (extruder 0)
773
+ * 
774
+ * Motherboards
775
+ * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector 
776
+ * 81 - Printrboard - Uses Analog input 2 on the Aux 2 connector
777
+ * 301 - Rambo  - uses Analog input 3
778
+ * Note may require analog pins to be defined for different motherboards
779
+ **********************************************************************/
780
+// Uncomment below to enable
781
+//#define FILAMENT_SENSOR
782
+
783
+#define FILAMENT_SENSOR_EXTRUDER_NUM	0  //The number of the extruder that has the filament sensor (0,1,2)
784
+#define MEASUREMENT_DELAY_CM			14  //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
785
+
786
+#define DEFAULT_NOMINAL_FILAMENT_DIA  3.0  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
787
+#define MEASURED_UPPER_LIMIT          3.30  //upper limit factor used for sensor reading validation in mm
788
+#define MEASURED_LOWER_LIMIT          1.90  //lower limit factor for sensor reading validation in mm
789
+#define MAX_MEASUREMENT_DELAY			20  //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
790
+
791
+//defines used in the code
792
+#define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially 
793
+
794
+
795
+
796
+
797
+
798
+
799
+
768 800
 #include "Configuration_adv.h"
769 801
 #include "thermistortables.h"
770 802
 

+ 6
- 6
Marlin/ConfigurationStore.cpp 查看文件

@@ -65,7 +65,7 @@ void Config_StoreSettings()
65 65
   EEPROM_WRITE_VAR(i,max_xy_jerk);
66 66
   EEPROM_WRITE_VAR(i,max_z_jerk);
67 67
   EEPROM_WRITE_VAR(i,max_e_jerk);
68
-  EEPROM_WRITE_VAR(i,add_homeing);
68
+  EEPROM_WRITE_VAR(i,add_homing);
69 69
   #ifdef DELTA
70 70
   EEPROM_WRITE_VAR(i,endstop_adj);
71 71
   EEPROM_WRITE_VAR(i,delta_radius);
@@ -170,9 +170,9 @@ SERIAL_ECHOLNPGM("Scaling factors:");
170 170
     SERIAL_ECHO_START;
171 171
     SERIAL_ECHOLNPGM("Home offset (mm):");
172 172
     SERIAL_ECHO_START;
173
-    SERIAL_ECHOPAIR("  M206 X",add_homeing[0] );
174
-    SERIAL_ECHOPAIR(" Y" ,add_homeing[1] );
175
-    SERIAL_ECHOPAIR(" Z" ,add_homeing[2] );
173
+    SERIAL_ECHOPAIR("  M206 X",add_homing[0] );
174
+    SERIAL_ECHOPAIR(" Y" ,add_homing[1] );
175
+    SERIAL_ECHOPAIR(" Z" ,add_homing[2] );
176 176
     SERIAL_ECHOLN("");
177 177
 #ifdef DELTA
178 178
     SERIAL_ECHO_START;
@@ -229,7 +229,7 @@ void Config_RetrieveSettings()
229 229
         EEPROM_READ_VAR(i,max_xy_jerk);
230 230
         EEPROM_READ_VAR(i,max_z_jerk);
231 231
         EEPROM_READ_VAR(i,max_e_jerk);
232
-        EEPROM_READ_VAR(i,add_homeing);
232
+        EEPROM_READ_VAR(i,add_homing);
233 233
         #ifdef DELTA
234 234
 		EEPROM_READ_VAR(i,endstop_adj);
235 235
 		EEPROM_READ_VAR(i,delta_radius);
@@ -303,7 +303,7 @@ void Config_ResetDefault()
303 303
     max_xy_jerk=DEFAULT_XYJERK;
304 304
     max_z_jerk=DEFAULT_ZJERK;
305 305
     max_e_jerk=DEFAULT_EJERK;
306
-    add_homeing[0] = add_homeing[1] = add_homeing[2] = 0;
306
+    add_homing[0] = add_homing[1] = add_homing[2] = 0;
307 307
 #ifdef DELTA
308 308
 	endstop_adj[0] = endstop_adj[1] = endstop_adj[2] = 0;
309 309
 	delta_radius= DELTA_RADIUS;

+ 156
- 48
Marlin/DOGMbitmaps.h 查看文件

@@ -68,54 +68,162 @@ const unsigned char start_bmp[574] PROGMEM = { //AVR-GCC, WinAVR
68 68
 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF0
69 69
 };
70 70
 
71
-#define STATUS_SCREENWIDTH 		115	//Width in pixels
72
-#define STATUS_SCREENHEIGHT 	19	//Height in pixels
73
-#define STATUS_SCREENBYTEWIDTH 	15	//Width in bytes
74
-const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR
75
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xE0,
76
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0xE0,
77
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x63,0x0C,0x60,
78
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x47,0x0E,0x20,
79
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4F,0x0F,0x20,
80
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5F,0x0F,0xA0,
81
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5E,0x07,0xA0,
82
-0x7F,0x80,0x00,0x3F,0xC0,0x00,0x3F,0xC0,0x00,0x41,0x04,0x00,0x40,0x60,0x20,
83
-0xFB,0xC0,0x00,0x79,0xE0,0x00,0x79,0xE0,0x00,0x20,0x82,0x00,0x40,0xF0,0x20,
84
-0xF3,0xC0,0x00,0x76,0xE0,0x00,0x76,0xE0,0x00,0x20,0x82,0x00,0x40,0xF0,0x20,
85
-0xEB,0xC0,0x00,0x7E,0xE0,0x00,0x7E,0xE0,0x00,0x41,0x04,0x00,0x40,0x60,0x20,
86
-0x7B,0x80,0x00,0x3D,0xC0,0x00,0x39,0xC0,0x00,0x82,0x08,0x00,0x5E,0x07,0xA0,
87
-0x7B,0x80,0x00,0x3B,0xC0,0x00,0x3E,0xC0,0x01,0x04,0x10,0x00,0x5F,0x0F,0xA0,
88
-0xFB,0xC0,0x00,0x77,0xE0,0x00,0x76,0xE0,0x01,0x04,0x10,0x00,0x4F,0x0F,0x20,
89
-0xFB,0xC0,0x00,0x70,0xE0,0x00,0x79,0xE0,0x00,0x82,0x08,0x00,0x47,0x0E,0x20,
90
-0xFF,0xC0,0x00,0x7F,0xE0,0x00,0x7F,0xE0,0x00,0x41,0x04,0x00,0x63,0x0C,0x60,
91
-0x3F,0x00,0x00,0x1F,0x80,0x00,0x1F,0x80,0x00,0x00,0x00,0x00,0x70,0x00,0xE0,
92
-0x1E,0x00,0x00,0x0F,0x00,0x00,0x0F,0x00,0x01,0xFF,0xFF,0x80,0x7F,0xFF,0xE0,
93
-0x0C,0x00,0x00,0x06,0x00,0x00,0x06,0x00,0x01,0xFF,0xFF,0x80,0x00,0x00,0x00
94
-};
71
+// Here comes a compile-time operation to match the extruder symbols 
72
+// on the info screen to the set number of extruders in configuration.h
73
+// 
74
+// When only one extruder is selected, the "1" on the symbol will not 
75
+// be displayed.
95 76
 
96
-#define STATUS_SCREENWIDTH 		115	//Width in pixels
97
-#define STATUS_SCREENHEIGHT 	19	//Height in pixels
98
-#define STATUS_SCREENBYTEWIDTH 	15	//Width in bytes
99
-const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR
100
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xE0,
101
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0xE0,
102
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x61,0xF8,0x60,
103
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x41,0xF8,0x20,
104
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0xF0,0x20,
105
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x60,0x20,
106
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x58,0x01,0xA0,
107
-0x7F,0x80,0x00,0x3F,0xC0,0x00,0x3F,0xC0,0x00,0x41,0x04,0x00,0x5C,0x63,0xA0,
108
-0xFB,0xC0,0x00,0x79,0xE0,0x00,0x79,0xE0,0x00,0x20,0x82,0x00,0x5E,0xF7,0xA0,
109
-0xF3,0xC0,0x00,0x76,0xE0,0x00,0x76,0xE0,0x00,0x20,0x82,0x00,0x5E,0xF7,0xA0,
110
-0xEB,0xC0,0x00,0x7E,0xE0,0x00,0x7E,0xE0,0x00,0x41,0x04,0x00,0x5C,0x63,0xA0,
111
-0x7B,0x80,0x00,0x3D,0xC0,0x00,0x39,0xC0,0x00,0x82,0x08,0x00,0x58,0x01,0xA0,
112
-0x7B,0x80,0x00,0x3B,0xC0,0x00,0x3E,0xC0,0x01,0x04,0x10,0x00,0x40,0x60,0x20,
113
-0xFB,0xC0,0x00,0x77,0xE0,0x00,0x76,0xE0,0x01,0x04,0x10,0x00,0x40,0xF0,0x20,
114
-0xFB,0xC0,0x00,0x70,0xE0,0x00,0x79,0xE0,0x00,0x82,0x08,0x00,0x41,0xF8,0x20,
115
-0xFF,0xC0,0x00,0x7F,0xE0,0x00,0x7F,0xE0,0x00,0x41,0x04,0x00,0x61,0xF8,0x60,
116
-0x3F,0x00,0x00,0x1F,0x80,0x00,0x1F,0x80,0x00,0x00,0x00,0x00,0x70,0x00,0xE0,
117
-0x1E,0x00,0x00,0x0F,0x00,0x00,0x0F,0x00,0x01,0xFF,0xFF,0x80,0x7F,0xFF,0xE0,
118
-0x0C,0x00,0x00,0x06,0x00,0x00,0x06,0x00,0x01,0xFF,0xFF,0x80,0x00,0x00,0x00
119
-};
77
+#if EXTRUDERS == 1
78
+	#define STATUS_SCREENWIDTH 		115	//Width in pixels
79
+	#define STATUS_SCREENHEIGHT 	19	//Height in pixels
80
+	#define STATUS_SCREENBYTEWIDTH 	15	//Width in bytes
81
+	const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR
82
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xE0,
83
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0xE0,
84
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x63,0x0C,0x60,
85
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x47,0x0E,0x20,
86
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4F,0x0F,0x20,
87
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5F,0x0F,0xA0,
88
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5E,0x07,0xA0,
89
+	0x7F,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x41,0x04,0x00,0x40,0x60,0x20,
90
+	0xFF,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x82,0x00,0x40,0xF0,0x20,
91
+	0xFF,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x82,0x00,0x40,0xF0,0x20,
92
+	0xFF,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x41,0x04,0x00,0x40,0x60,0x20,
93
+	0x7F,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x82,0x08,0x00,0x5E,0x07,0xA0,
94
+	0x7F,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x04,0x10,0x00,0x5F,0x0F,0xA0,
95
+	0xFF,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x04,0x10,0x00,0x4F,0x0F,0x20,
96
+	0xFF,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x82,0x08,0x00,0x47,0x0E,0x20,
97
+	0xFF,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x41,0x04,0x00,0x63,0x0C,0x60,
98
+	0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0xE0,
99
+	0x1E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xFF,0xFF,0x80,0x7F,0xFF,0xE0,
100
+	0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xFF,0xFF,0x80,0x00,0x00,0x00
101
+	};
102
+
103
+	#define STATUS_SCREENWIDTH 		115	//Width in pixels
104
+	#define STATUS_SCREENHEIGHT 	19	//Height in pixels
105
+	#define STATUS_SCREENBYTEWIDTH 	15	//Width in bytes
106
+	const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR
107
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xE0,
108
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0xE0,
109
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x61,0xF8,0x60,
110
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x41,0xF8,0x20,
111
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0xF0,0x20,
112
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x60,0x20,
113
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x58,0x01,0xA0,
114
+	0x7F,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x41,0x04,0x00,0x5C,0x63,0xA0,
115
+	0xFF,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x82,0x00,0x5E,0xF7,0xA0,
116
+	0xFF,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x82,0x00,0x5E,0xF7,0xA0,
117
+	0xFF,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x41,0x04,0x00,0x5C,0x63,0xA0,
118
+	0x7F,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x82,0x08,0x00,0x58,0x01,0xA0,
119
+	0x7F,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x04,0x10,0x00,0x40,0x60,0x20,
120
+	0xFF,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x04,0x10,0x00,0x40,0xF0,0x20,
121
+	0xFF,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x82,0x08,0x00,0x41,0xF8,0x20,
122
+	0xFF,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x41,0x04,0x00,0x61,0xF8,0x60,
123
+	0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0xE0,
124
+	0x1E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xFF,0xFF,0x80,0x7F,0xFF,0xE0,
125
+	0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xFF,0xFF,0x80,0x00,0x00,0x00
126
+	};
127
+#elif EXTRUDERS == 2
128
+	#define STATUS_SCREENWIDTH 		115	//Width in pixels
129
+	#define STATUS_SCREENHEIGHT 	19	//Height in pixels
130
+	#define STATUS_SCREENBYTEWIDTH 	15	//Width in bytes
131
+	const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR
132
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xE0,
133
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0xE0,
134
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x63,0x0C,0x60,
135
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x47,0x0E,0x20,
136
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4F,0x0F,0x20,
137
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5F,0x0F,0xA0,
138
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5E,0x07,0xA0,
139
+	0x7F,0x80,0x00,0x3F,0xC0,0x00,0x00,0x00,0x00,0x41,0x04,0x00,0x40,0x60,0x20,
140
+	0xFB,0xC0,0x00,0x79,0xE0,0x00,0x00,0x00,0x00,0x20,0x82,0x00,0x40,0xF0,0x20,
141
+	0xF3,0xC0,0x00,0x76,0xE0,0x00,0x00,0x00,0x00,0x20,0x82,0x00,0x40,0xF0,0x20,
142
+	0xEB,0xC0,0x00,0x7E,0xE0,0x00,0x00,0x00,0x00,0x41,0x04,0x00,0x40,0x60,0x20,
143
+	0x7B,0x80,0x00,0x3D,0xC0,0x00,0x00,0x00,0x00,0x82,0x08,0x00,0x5E,0x07,0xA0,
144
+	0x7B,0x80,0x00,0x3B,0xC0,0x00,0x00,0x00,0x01,0x04,0x10,0x00,0x5F,0x0F,0xA0,
145
+	0xFB,0xC0,0x00,0x77,0xE0,0x00,0x00,0x00,0x01,0x04,0x10,0x00,0x4F,0x0F,0x20,
146
+	0xFB,0xC0,0x00,0x70,0xE0,0x00,0x00,0x00,0x00,0x82,0x08,0x00,0x47,0x0E,0x20,
147
+	0xFF,0xC0,0x00,0x7F,0xE0,0x00,0x00,0x00,0x00,0x41,0x04,0x00,0x63,0x0C,0x60,
148
+	0x3F,0x00,0x00,0x1F,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0xE0,
149
+	0x1E,0x00,0x00,0x0F,0x00,0x00,0x00,0x00,0x01,0xFF,0xFF,0x80,0x7F,0xFF,0xE0,
150
+	0x0C,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x01,0xFF,0xFF,0x80,0x00,0x00,0x00
151
+	};
152
+
153
+	#define STATUS_SCREENWIDTH 		115	//Width in pixels
154
+	#define STATUS_SCREENHEIGHT 	19	//Height in pixels
155
+	#define STATUS_SCREENBYTEWIDTH 	15	//Width in bytes
156
+	const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR
157
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xE0,
158
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0xE0,
159
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x61,0xF8,0x60,
160
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x41,0xF8,0x20,
161
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0xF0,0x20,
162
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x60,0x20,
163
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x58,0x01,0xA0,
164
+	0x7F,0x80,0x00,0x3F,0xC0,0x00,0x00,0x00,0x00,0x41,0x04,0x00,0x5C,0x63,0xA0,
165
+	0xFB,0xC0,0x00,0x79,0xE0,0x00,0x00,0x00,0x00,0x20,0x82,0x00,0x5E,0xF7,0xA0,
166
+	0xF3,0xC0,0x00,0x76,0xE0,0x00,0x00,0x00,0x00,0x20,0x82,0x00,0x5E,0xF7,0xA0,
167
+	0xEB,0xC0,0x00,0x7E,0xE0,0x00,0x00,0x00,0x00,0x41,0x04,0x00,0x5C,0x63,0xA0,
168
+	0x7B,0x80,0x00,0x3D,0xC0,0x00,0x00,0x00,0x00,0x82,0x08,0x00,0x58,0x01,0xA0,
169
+	0x7B,0x80,0x00,0x3B,0xC0,0x00,0x00,0x00,0x01,0x04,0x10,0x00,0x40,0x60,0x20,
170
+	0xFB,0xC0,0x00,0x77,0xE0,0x00,0x00,0x00,0x01,0x04,0x10,0x00,0x40,0xF0,0x20,
171
+	0xFB,0xC0,0x00,0x70,0xE0,0x00,0x00,0x00,0x00,0x82,0x08,0x00,0x41,0xF8,0x20,
172
+	0xFF,0xC0,0x00,0x7F,0xE0,0x00,0x00,0x00,0x00,0x41,0x04,0x00,0x61,0xF8,0x60,
173
+	0x3F,0x00,0x00,0x1F,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0xE0,
174
+	0x1E,0x00,0x00,0x0F,0x00,0x00,0x00,0x00,0x01,0xFF,0xFF,0x80,0x7F,0xFF,0xE0,
175
+	0x0C,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x01,0xFF,0xFF,0x80,0x00,0x00,0x00
176
+	};
177
+#else
178
+	#define STATUS_SCREENWIDTH 		115	//Width in pixels
179
+	#define STATUS_SCREENHEIGHT 	19	//Height in pixels
180
+	#define STATUS_SCREENBYTEWIDTH 	15	//Width in bytes
181
+	const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR
182
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xE0,
183
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0xE0,
184
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x63,0x0C,0x60,
185
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x47,0x0E,0x20,
186
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4F,0x0F,0x20,
187
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5F,0x0F,0xA0,
188
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5E,0x07,0xA0,
189
+	0x7F,0x80,0x00,0x3F,0xC0,0x00,0x3F,0xC0,0x00,0x41,0x04,0x00,0x40,0x60,0x20,
190
+	0xFB,0xC0,0x00,0x79,0xE0,0x00,0x79,0xE0,0x00,0x20,0x82,0x00,0x40,0xF0,0x20,
191
+	0xF3,0xC0,0x00,0x76,0xE0,0x00,0x76,0xE0,0x00,0x20,0x82,0x00,0x40,0xF0,0x20,
192
+	0xEB,0xC0,0x00,0x7E,0xE0,0x00,0x7E,0xE0,0x00,0x41,0x04,0x00,0x40,0x60,0x20,
193
+	0x7B,0x80,0x00,0x3D,0xC0,0x00,0x39,0xC0,0x00,0x82,0x08,0x00,0x5E,0x07,0xA0,
194
+	0x7B,0x80,0x00,0x3B,0xC0,0x00,0x3E,0xC0,0x01,0x04,0x10,0x00,0x5F,0x0F,0xA0,
195
+	0xFB,0xC0,0x00,0x77,0xE0,0x00,0x76,0xE0,0x01,0x04,0x10,0x00,0x4F,0x0F,0x20,
196
+	0xFB,0xC0,0x00,0x70,0xE0,0x00,0x79,0xE0,0x00,0x82,0x08,0x00,0x47,0x0E,0x20,
197
+	0xFF,0xC0,0x00,0x7F,0xE0,0x00,0x7F,0xE0,0x00,0x41,0x04,0x00,0x63,0x0C,0x60,
198
+	0x3F,0x00,0x00,0x1F,0x80,0x00,0x1F,0x80,0x00,0x00,0x00,0x00,0x70,0x00,0xE0,
199
+	0x1E,0x00,0x00,0x0F,0x00,0x00,0x0F,0x00,0x01,0xFF,0xFF,0x80,0x7F,0xFF,0xE0,
200
+	0x0C,0x00,0x00,0x06,0x00,0x00,0x06,0x00,0x01,0xFF,0xFF,0x80,0x00,0x00,0x00
201
+	};
202
+
203
+	#define STATUS_SCREENWIDTH 		115	//Width in pixels
204
+	#define STATUS_SCREENHEIGHT 	19	//Height in pixels
205
+	#define STATUS_SCREENBYTEWIDTH 	15	//Width in bytes
206
+	const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR
207
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xE0,
208
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0xE0,
209
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x61,0xF8,0x60,
210
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x41,0xF8,0x20,
211
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0xF0,0x20,
212
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x60,0x20,
213
+	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x58,0x01,0xA0,
214
+	0x7F,0x80,0x00,0x3F,0xC0,0x00,0x3F,0xC0,0x00,0x41,0x04,0x00,0x5C,0x63,0xA0,
215
+	0xFB,0xC0,0x00,0x79,0xE0,0x00,0x79,0xE0,0x00,0x20,0x82,0x00,0x5E,0xF7,0xA0,
216
+	0xF3,0xC0,0x00,0x76,0xE0,0x00,0x76,0xE0,0x00,0x20,0x82,0x00,0x5E,0xF7,0xA0,
217
+	0xEB,0xC0,0x00,0x7E,0xE0,0x00,0x7E,0xE0,0x00,0x41,0x04,0x00,0x5C,0x63,0xA0,
218
+	0x7B,0x80,0x00,0x3D,0xC0,0x00,0x39,0xC0,0x00,0x82,0x08,0x00,0x58,0x01,0xA0,
219
+	0x7B,0x80,0x00,0x3B,0xC0,0x00,0x3E,0xC0,0x01,0x04,0x10,0x00,0x40,0x60,0x20,
220
+	0xFB,0xC0,0x00,0x77,0xE0,0x00,0x76,0xE0,0x01,0x04,0x10,0x00,0x40,0xF0,0x20,
221
+	0xFB,0xC0,0x00,0x70,0xE0,0x00,0x79,0xE0,0x00,0x82,0x08,0x00,0x41,0xF8,0x20,
222
+	0xFF,0xC0,0x00,0x7F,0xE0,0x00,0x7F,0xE0,0x00,0x41,0x04,0x00,0x61,0xF8,0x60,
223
+	0x3F,0x00,0x00,0x1F,0x80,0x00,0x1F,0x80,0x00,0x00,0x00,0x00,0x70,0x00,0xE0,
224
+	0x1E,0x00,0x00,0x0F,0x00,0x00,0x0F,0x00,0x01,0xFF,0xFF,0x80,0x7F,0xFF,0xE0,
225
+	0x0C,0x00,0x00,0x06,0x00,0x00,0x06,0x00,0x01,0xFF,0xFF,0x80,0x00,0x00,0x00
226
+	};
227
+#endif // Extruders 
120 228
 
121 229
 

+ 11
- 1
Marlin/Marlin.h 查看文件

@@ -211,7 +211,7 @@ extern int extrudemultiply; // Sets extrude multiply factor (in percent) for all
211 211
 extern int extruder_multiply[EXTRUDERS]; // sets extrude multiply factor (in percent) for each extruder individually
212 212
 extern float volumetric_multiplier[EXTRUDERS]; // reciprocal of cross-sectional area of filament (in square millimeters), stored this way to reduce computational burden in planner
213 213
 extern float current_position[NUM_AXIS] ;
214
-extern float add_homeing[3];
214
+extern float add_homing[3];
215 215
 #ifdef DELTA
216 216
 extern float endstop_adj[3];
217 217
 extern float delta_radius;
@@ -236,6 +236,16 @@ extern int EtoPPressure;
236 236
 extern unsigned char fanSpeedSoftPwm;
237 237
 #endif
238 238
 
239
+#ifdef FILAMENT_SENSOR
240
+  extern float filament_width_nominal;  //holds the theoretical filament diameter ie., 3.00 or 1.75 
241
+  extern bool filament_sensor;  //indicates that filament sensor readings should control extrusion  
242
+  extern float filament_width_meas; //holds the filament diameter as accurately measured 
243
+  extern signed char measurement_delay[];  //ring buffer to delay measurement
244
+  extern int delay_index1, delay_index2;  //index into ring buffer
245
+  extern float delay_dist; //delay distance counter
246
+  extern int meas_delay_cm; //delay distance
247
+#endif
248
+
239 249
 #ifdef FWRETRACT
240 250
 extern bool autoretract_enabled;
241 251
 extern bool retracted[EXTRUDERS];

+ 1
- 1
Marlin/MarlinSerial.cpp 查看文件

@@ -73,7 +73,7 @@ void MarlinSerial::begin(long baud)
73 73
   bool useU2X = true;
74 74
 
75 75
 #if F_CPU == 16000000UL && SERIAL_PORT == 0
76
-  // hard coded exception for compatibility with the bootloader shipped
76
+  // hard-coded exception for compatibility with the bootloader shipped
77 77
   // with the Duemilanove and previous boards and the firmware on the 8U2
78 78
   // on the Uno and Mega 2560.
79 79
   if (baud == 57600) {

+ 115
- 27
Marlin/Marlin_main.cpp 查看文件

@@ -159,6 +159,10 @@
159 159
 // M400 - Finish all moves
160 160
 // M401 - Lower z-probe if present
161 161
 // M402 - Raise z-probe if present
162
+// M404 - N<dia in mm> Enter the nominal filament width (3mm, 1.75mm ) or will display nominal filament width without parameters
163
+// M405 - Turn on Filament Sensor extrusion control.  Optional D<delay in cm> to set delay in centimeters between sensor and extruder 
164
+// M406 - Turn off Filament Sensor extrusion control 
165
+// M407 - Displays measured filament diameter 
162 166
 // M500 - stores parameters in EEPROM
163 167
 // M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
164 168
 // M502 - reverts to the default "factory settings".  You still need to store them in EEPROM afterwards if you want to.
@@ -220,7 +224,7 @@ float volumetric_multiplier[EXTRUDERS] = {1.0
220 224
   #endif
221 225
 };
222 226
 float current_position[NUM_AXIS] = { 0.0, 0.0, 0.0, 0.0 };
223
-float add_homeing[3]={0,0,0};
227
+float add_homing[3]={0,0,0};
224 228
 #ifdef DELTA
225 229
 float endstop_adj[3]={0,0,0};
226 230
 #endif
@@ -313,12 +317,28 @@ float axis_scaling[3]={1,1,1};  // Build size scaling, default to 1
313 317
 
314 318
 bool cancel_heatup = false ;
315 319
 
320
+#ifdef FILAMENT_SENSOR
321
+  //Variables for Filament Sensor input 
322
+  float filament_width_nominal=DEFAULT_NOMINAL_FILAMENT_DIA;  //Set nominal filament width, can be changed with M404 
323
+  bool filament_sensor=false;  //M405 turns on filament_sensor control, M406 turns it off 
324
+  float filament_width_meas=DEFAULT_MEASURED_FILAMENT_DIA; //Stores the measured filament diameter 
325
+  signed char measurement_delay[MAX_MEASUREMENT_DELAY+1];  //ring buffer to delay measurement  store extruder factor after subtracting 100 
326
+  int delay_index1=0;  //index into ring buffer
327
+  int delay_index2=-1;  //index into ring buffer - set to -1 on startup to indicate ring buffer needs to be initialized
328
+  float delay_dist=0; //delay distance counter  
329
+  int meas_delay_cm = MEASUREMENT_DELAY_CM;  //distance delay setting
330
+#endif
331
+
316 332
 //===========================================================================
317 333
 //=============================Private Variables=============================
318 334
 //===========================================================================
319 335
 const char axis_codes[NUM_AXIS] = {'X', 'Y', 'Z', 'E'};
320 336
 static float destination[NUM_AXIS] = {  0.0, 0.0, 0.0, 0.0};
337
+
338
+#ifndef DELTA
321 339
 static float delta[3] = {0.0, 0.0, 0.0};
340
+#endif
341
+
322 342
 static float offset[3] = {0.0, 0.0, 0.0};
323 343
 static bool home_all_axis = true;
324 344
 static float feedrate = 1500.0, next_feedrate, saved_feedrate;
@@ -506,6 +526,7 @@ void servo_init()
506 526
   #endif
507 527
 }
508 528
 
529
+
509 530
 void setup()
510 531
 {
511 532
   setup_killpin();
@@ -555,6 +576,7 @@ void setup()
555 576
   st_init();    // Initialize stepper, this enables interrupts!
556 577
   setup_photpin();
557 578
   servo_init();
579
+  
558 580
 
559 581
   lcd_init();
560 582
   _delay_ms(1000);	// wait 1sec to display the splash screen
@@ -852,7 +874,7 @@ static int dual_x_carriage_mode = DEFAULT_DUAL_X_CARRIAGE_MODE;
852 874
 
853 875
 static float x_home_pos(int extruder) {
854 876
   if (extruder == 0)
855
-    return base_home_pos(X_AXIS) + add_homeing[X_AXIS];
877
+    return base_home_pos(X_AXIS) + add_homing[X_AXIS];
856 878
   else
857 879
     // In dual carriage mode the extruder offset provides an override of the
858 880
     // second X-carriage offset when homed - otherwise X2_HOME_POS is used.
@@ -884,9 +906,9 @@ static void axis_is_at_home(int axis) {
884 906
       return;
885 907
     }
886 908
     else if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && active_extruder == 0) {
887
-      current_position[X_AXIS] = base_home_pos(X_AXIS) + add_homeing[X_AXIS];
888
-      min_pos[X_AXIS] =          base_min_pos(X_AXIS) + add_homeing[X_AXIS];
889
-      max_pos[X_AXIS] =          min(base_max_pos(X_AXIS) + add_homeing[X_AXIS],
909
+      current_position[X_AXIS] = base_home_pos(X_AXIS) + add_homing[X_AXIS];
910
+      min_pos[X_AXIS] =          base_min_pos(X_AXIS) + add_homing[X_AXIS];
911
+      max_pos[X_AXIS] =          min(base_max_pos(X_AXIS) + add_homing[X_AXIS],
890 912
                                   max(extruder_offset[X_AXIS][1], X2_MAX_POS) - duplicate_extruder_x_offset);
891 913
       return;
892 914
     }
@@ -914,11 +936,11 @@ static void axis_is_at_home(int axis) {
914 936
      
915 937
      for (i=0; i<2; i++)
916 938
      {
917
-        delta[i] -= add_homeing[i];
939
+        delta[i] -= add_homing[i];
918 940
      } 
919 941
      
920
-    // SERIAL_ECHOPGM("addhome X="); SERIAL_ECHO(add_homeing[X_AXIS]);
921
-	// SERIAL_ECHOPGM(" addhome Y="); SERIAL_ECHO(add_homeing[Y_AXIS]);
942
+    // SERIAL_ECHOPGM("addhome X="); SERIAL_ECHO(add_homing[X_AXIS]);
943
+	// SERIAL_ECHOPGM(" addhome Y="); SERIAL_ECHO(add_homing[Y_AXIS]);
922 944
     // SERIAL_ECHOPGM(" addhome Theta="); SERIAL_ECHO(delta[X_AXIS]);
923 945
     // SERIAL_ECHOPGM(" addhome Psi+Theta="); SERIAL_ECHOLN(delta[Y_AXIS]);
924 946
       
@@ -936,14 +958,14 @@ static void axis_is_at_home(int axis) {
936 958
    } 
937 959
    else
938 960
    {
939
-      current_position[axis] = base_home_pos(axis) + add_homeing[axis];
940
-      min_pos[axis] =          base_min_pos(axis) + add_homeing[axis];
941
-      max_pos[axis] =          base_max_pos(axis) + add_homeing[axis];
961
+      current_position[axis] = base_home_pos(axis) + add_homing[axis];
962
+      min_pos[axis] =          base_min_pos(axis) + add_homing[axis];
963
+      max_pos[axis] =          base_max_pos(axis) + add_homing[axis];
942 964
    }
943 965
 #else
944
-  current_position[axis] = base_home_pos(axis) + add_homeing[axis];
945
-  min_pos[axis] =          base_min_pos(axis) + add_homeing[axis];
946
-  max_pos[axis] =          base_max_pos(axis) + add_homeing[axis];
966
+  current_position[axis] = base_home_pos(axis) + add_homing[axis];
967
+  min_pos[axis] =          base_min_pos(axis) + add_homing[axis];
968
+  max_pos[axis] =          base_max_pos(axis) + add_homing[axis];
947 969
 #endif
948 970
 }
949 971
 
@@ -1431,8 +1453,8 @@ void process_commands()
1431 1453
           HOMEAXIS(Z);
1432 1454
 
1433 1455
           calculate_delta(current_position);
1434
-          plan_set_position(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS]);		  
1435
-		  
1456
+          plan_set_position(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS]);
1457
+
1436 1458
 #else // NOT DELTA
1437 1459
 
1438 1460
       home_all_axis = !((code_seen(axis_codes[X_AXIS])) || (code_seen(axis_codes[Y_AXIS])) || (code_seen(axis_codes[Z_AXIS])));
@@ -1515,7 +1537,7 @@ void process_commands()
1515 1537
 		#ifdef SCARA
1516 1538
 		   current_position[X_AXIS]=code_value();
1517 1539
 		#else
1518
-		   current_position[X_AXIS]=code_value()+add_homeing[0];
1540
+		   current_position[X_AXIS]=code_value()+add_homing[0];
1519 1541
 		#endif
1520 1542
         }
1521 1543
       }
@@ -1525,7 +1547,7 @@ void process_commands()
1525 1547
          #ifdef SCARA
1526 1548
 		   current_position[Y_AXIS]=code_value();
1527 1549
 		#else
1528
-		   current_position[Y_AXIS]=code_value()+add_homeing[1];
1550
+		   current_position[Y_AXIS]=code_value()+add_homing[1];
1529 1551
 		#endif
1530 1552
         }
1531 1553
       }
@@ -1590,7 +1612,7 @@ void process_commands()
1590 1612
 
1591 1613
       if(code_seen(axis_codes[Z_AXIS])) {
1592 1614
         if(code_value_long() != 0) {
1593
-          current_position[Z_AXIS]=code_value()+add_homeing[2];
1615
+          current_position[Z_AXIS]=code_value()+add_homing[2];
1594 1616
         }
1595 1617
       }
1596 1618
       #ifdef ENABLE_AUTO_BED_LEVELING
@@ -1819,10 +1841,10 @@ void process_commands()
1819 1841
                 	current_position[i] = code_value();  
1820 1842
 		}
1821 1843
 		else {
1822
-                current_position[i] = code_value()+add_homeing[i];  
1844
+                current_position[i] = code_value()+add_homing[i];  
1823 1845
             	}  
1824 1846
 #else
1825
-		current_position[i] = code_value()+add_homeing[i];
1847
+		current_position[i] = code_value()+add_homing[i];
1826 1848
 #endif
1827 1849
             plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
1828 1850
            }
@@ -2721,9 +2743,9 @@ Sigma_Exit:
2721 2743
       SERIAL_PROTOCOLLN("");
2722 2744
       
2723 2745
       SERIAL_PROTOCOLPGM("SCARA Cal - Theta:");
2724
-      SERIAL_PROTOCOL(delta[X_AXIS]+add_homeing[0]);
2746
+      SERIAL_PROTOCOL(delta[X_AXIS]+add_homing[0]);
2725 2747
       SERIAL_PROTOCOLPGM("   Psi+Theta (90):");
2726
-      SERIAL_PROTOCOL(delta[Y_AXIS]-delta[X_AXIS]-90+add_homeing[1]);
2748
+      SERIAL_PROTOCOL(delta[Y_AXIS]-delta[X_AXIS]-90+add_homing[1]);
2727 2749
       SERIAL_PROTOCOLLN("");
2728 2750
       
2729 2751
       SERIAL_PROTOCOLPGM("SCARA step Cal - Theta:");
@@ -2797,6 +2819,8 @@ Sigma_Exit:
2797 2819
         } else {
2798 2820
           //reserved for setting filament diameter via UFID or filament measuring device
2799 2821
           break;
2822
+        
2823
+          
2800 2824
         }
2801 2825
         tmp_extruder = active_extruder;
2802 2826
         if(code_seen('T')) {
@@ -2849,19 +2873,19 @@ Sigma_Exit:
2849 2873
       if(code_seen('E')) max_e_jerk = code_value() ;
2850 2874
     }
2851 2875
     break;
2852
-    case 206: // M206 additional homeing offset
2876
+    case 206: // M206 additional homing offset
2853 2877
       for(int8_t i=0; i < 3; i++)
2854 2878
       {
2855
-        if(code_seen(axis_codes[i])) add_homeing[i] = code_value();
2879
+        if(code_seen(axis_codes[i])) add_homing[i] = code_value();
2856 2880
       }
2857 2881
 	  #ifdef SCARA
2858 2882
 	   if(code_seen('T'))       // Theta
2859 2883
       {
2860
-        add_homeing[0] = code_value() ;
2884
+        add_homing[0] = code_value() ;
2861 2885
       }
2862 2886
       if(code_seen('P'))       // Psi
2863 2887
       {
2864
-        add_homeing[1] = code_value() ;
2888
+        add_homing[1] = code_value() ;
2865 2889
       }
2866 2890
 	  #endif
2867 2891
       break;
@@ -3359,6 +3383,70 @@ Sigma_Exit:
3359 3383
     }
3360 3384
     break;
3361 3385
 #endif
3386
+
3387
+#ifdef FILAMENT_SENSOR
3388
+case 404:  //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or display nominal filament width 
3389
+    {
3390
+    #if (FILWIDTH_PIN > -1) 
3391
+    if(code_seen('N')) filament_width_nominal=code_value();
3392
+    else{
3393
+    SERIAL_PROTOCOLPGM("Filament dia (nominal mm):"); 
3394
+    SERIAL_PROTOCOLLN(filament_width_nominal); 
3395
+    }
3396
+    #endif
3397
+    }
3398
+    break; 
3399
+    
3400
+    case 405:  //M405 Turn on filament sensor for control 
3401
+    {
3402
+    
3403
+    
3404
+    if(code_seen('D')) meas_delay_cm=code_value();
3405
+       
3406
+       if(meas_delay_cm> MAX_MEASUREMENT_DELAY)
3407
+       	meas_delay_cm = MAX_MEASUREMENT_DELAY;
3408
+    
3409
+       if(delay_index2 == -1)  //initialize the ring buffer if it has not been done since startup
3410
+    	   {
3411
+    	   int temp_ratio = widthFil_to_size_ratio(); 
3412
+       	    
3413
+       	    for (delay_index1=0; delay_index1<(MAX_MEASUREMENT_DELAY+1); ++delay_index1 ){
3414
+       	              measurement_delay[delay_index1]=temp_ratio-100;  //subtract 100 to scale within a signed byte
3415
+       	        }
3416
+       	    delay_index1=0;
3417
+       	    delay_index2=0;	
3418
+    	   }
3419
+    
3420
+    filament_sensor = true ; 
3421
+    
3422
+    //SERIAL_PROTOCOLPGM("Filament dia (measured mm):"); 
3423
+    //SERIAL_PROTOCOL(filament_width_meas); 
3424
+    //SERIAL_PROTOCOLPGM("Extrusion ratio(%):"); 
3425
+    //SERIAL_PROTOCOL(extrudemultiply); 
3426
+    } 
3427
+    break; 
3428
+    
3429
+    case 406:  //M406 Turn off filament sensor for control 
3430
+    {      
3431
+    filament_sensor = false ; 
3432
+    } 
3433
+    break; 
3434
+  
3435
+    case 407:   //M407 Display measured filament diameter 
3436
+    { 
3437
+     
3438
+    
3439
+    
3440
+    SERIAL_PROTOCOLPGM("Filament dia (measured mm):"); 
3441
+    SERIAL_PROTOCOLLN(filament_width_meas);   
3442
+    } 
3443
+    break; 
3444
+    #endif
3445
+    
3446
+
3447
+
3448
+
3449
+
3362 3450
     case 500: // M500 Store settings in EEPROM
3363 3451
     {
3364 3452
         Config_StoreSettings();

+ 0
- 6
Marlin/dogm_lcd_implementation.h 查看文件

@@ -245,9 +245,6 @@ static void lcd_implementation_status_screen()
245 245
 		 u8g.drawBox(38,17,2,2);
246 246
 		 u8g.setColorIndex(1);	// black on white
247 247
 		}
248
- #else
249
- u8g.setPrintPos(31,27);
250
- u8g.print("---");
251 248
  #endif
252 249
  
253 250
  // Extruder 3
@@ -266,9 +263,6 @@ static void lcd_implementation_status_screen()
266 263
 		 u8g.drawBox(62,17,2,2);
267 264
 		 u8g.setColorIndex(1);	// black on white
268 265
 		}
269
- #else
270
- u8g.setPrintPos(55,27);
271
- u8g.print("---");
272 266
  #endif
273 267
  
274 268
  // Heatbed

+ 183
- 29
Marlin/example_configurations/delta/Configuration.h 查看文件

@@ -8,7 +8,7 @@
8 8
 //===========================================================================
9 9
 //============================= DELTA Printer ===============================
10 10
 //===========================================================================
11
-// For a Delta printer rplace the configuration files wilth the files in the
11
+// For a Delta printer replace the configuration files with the files in the
12 12
 // example_configurations/delta directory.
13 13
 //
14 14
 
@@ -41,6 +41,7 @@
41 41
 // 33 = RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Bed)
42 42
 // 34 = RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Bed)
43 43
 // 35 = RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Fan)
44
+// 36 = RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Fan)
44 45
 // 4  = Duemilanove w/ ATMega328P pin assignment
45 46
 // 5  = Gen6
46 47
 // 51 = Gen6 deluxe
@@ -54,20 +55,24 @@
54 55
 // 68 = Azteeg X3 Pro
55 56
 // 7  = Ultimaker
56 57
 // 71 = Ultimaker (Older electronics. Pre 1.5.4. This is rare)
58
+// 72 = Ultimainboard 2.x (Uses TEMP_SENSOR 20)
57 59
 // 77 = 3Drag Controller
58 60
 // 8  = Teensylu
59 61
 // 80 = Rumba
60 62
 // 81 = Printrboard (AT90USB1286)
61 63
 // 82 = Brainwave (AT90USB646)
62 64
 // 83 = SAV Mk-I (AT90USB1286)
65
+// 84 = Teensy++2.0 (AT90USB1286) // CLI compile: DEFINES=AT90USBxx_TEENSYPP_ASSIGNMENTS HARDWARE_MOTHERBOARD=84  make
63 66
 // 9  = Gen3+
64 67
 // 70 = Megatronics
65 68
 // 701= Megatronics v2.0
66 69
 // 702= Minitronics v1.0
67 70
 // 90 = Alpha OMCA board
68 71
 // 91 = Final OMCA board
69
-// 301 = Rambo
72
+// 301= Rambo
70 73
 // 21 = Elefu Ra Board (v3)
74
+// 88 = 5DPrint D8 Driver Board
75
+// 999 = Leapfrog
71 76
 
72 77
 #ifndef MOTHERBOARD
73 78
 #define MOTHERBOARD 33
@@ -89,7 +94,7 @@
89 94
 
90 95
 #define POWER_SUPPLY 1
91 96
 
92
-// Define this to have the electronics keep the powersupply off on startup. If you don't know what this is leave it.
97
+// Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it.
93 98
 // #define PS_DEFAULT_OFF
94 99
 
95 100
 //===========================================================================
@@ -103,7 +108,7 @@
103 108
 // and processor overload (too many expensive sqrt calls).
104 109
 #define DELTA_SEGMENTS_PER_SECOND 200
105 110
 
106
-// NOTE NB all values for DELTA_* values MOUST be floating point, so always have a decimal point in them
111
+// NOTE NB all values for DELTA_* values MUST be floating point, so always have a decimal point in them
107 112
 
108 113
 // Center-to-center distance of the holes in the diagonal push rods.
109 114
 #define DELTA_DIAGONAL_ROD 250.0 // mm
@@ -132,7 +137,7 @@
132 137
 // 0 is not used
133 138
 // 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
134 139
 // 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
135
-// 3 is mendel-parts thermistor (4.7k pullup)
140
+// 3 is Mendel-parts thermistor (4.7k pullup)
136 141
 // 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
137 142
 // 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup)
138 143
 // 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
@@ -141,13 +146,22 @@
141 146
 // 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup)
142 147
 // 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup)
143 148
 // 10 is 100k RS thermistor 198-961 (4.7k pullup)
144
-// 60 is 100k Maker's Tool Works Kapton Bed Thermister
149
+// 11 is 100k beta 3950 1% thermistor (4.7k pullup)
150
+// 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
151
+// 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" 
152
+// 20 is the PT100 circuit found in the Ultimainboard V2.x
153
+// 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
145 154
 //
146 155
 //    1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k
147 156
 //                          (but gives greater accuracy and more stable PID)
148 157
 // 51 is 100k thermistor - EPCOS (1k pullup)
149 158
 // 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
150 159
 // 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup)
160
+//
161
+// 1047 is Pt1000 with 4k7 pullup
162
+// 1010 is Pt1000 with 1k pullup (non standard)
163
+// 147 is Pt100 with 4k7 pullup
164
+// 110 is Pt100 with 1k pullup (non standard)
151 165
 
152 166
 #define TEMP_SENSOR_0 -1
153 167
 #define TEMP_SENSOR_1 -1
@@ -184,6 +198,10 @@
184 198
 // HEATER_BED_DUTY_CYCLE_DIVIDER intervals.
185 199
 //#define HEATER_BED_DUTY_CYCLE_DIVIDER 4
186 200
 
201
+// If you want the M105 heater power reported in watts, define the BED_WATTS, and (shared for all extruders) EXTRUDER_WATTS
202
+//#define EXTRUDER_WATTS (12.0*12.0/6.7) //  P=I^2/R
203
+//#define BED_WATTS (12.0*12.0/1.1)      // P=I^2/R
204
+
187 205
 // PID settings:
188 206
 // Comment the following line to disable PID and enable bang-bang.
189 207
 #define PIDTEMP
@@ -196,15 +214,15 @@
196 214
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
197 215
   #define PID_INTEGRAL_DRIVE_MAX 255  //limit for the integral term
198 216
   #define K1 0.95 //smoothing factor within the PID
199
-  #define PID_dT ((16.0 * 8.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
217
+  #define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
200 218
 
201
-// If you are using a preconfigured hotend then you can use one of the value sets by uncommenting it
219
+// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
202 220
 // Ultimaker
203 221
     #define  DEFAULT_Kp 22.2
204 222
     #define  DEFAULT_Ki 1.08
205 223
     #define  DEFAULT_Kd 114
206 224
 
207
-// Makergear
225
+// MakerGear
208 226
 //    #define  DEFAULT_Kp 7.0
209 227
 //    #define  DEFAULT_Ki 0.1
210 228
 //    #define  DEFAULT_Kd 12
@@ -262,6 +280,44 @@
262 280
 #define EXTRUDE_MINTEMP 170
263 281
 #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
264 282
 
283
+/*================== Thermal Runaway Protection ==============================
284
+This is a feature to protect your printer from burn up in flames if it has
285
+a thermistor coming off place (this happened to a friend of mine recently and
286
+motivated me writing this feature).
287
+
288
+The issue: If a thermistor come off, it will read a lower temperature than actual.
289
+The system will turn the heater on forever, burning up the filament and anything
290
+else around.
291
+
292
+After the temperature reaches the target for the first time, this feature will 
293
+start measuring for how long the current temperature stays below the target 
294
+minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
295
+
296
+If it stays longer than _PERIOD, it means the thermistor temperature
297
+cannot catch up with the target, so something *may be* wrong. Then, to be on the
298
+safe side, the system will he halt.
299
+
300
+Bear in mind the count down will just start AFTER the first time the 
301
+thermistor temperature is over the target, so you will have no problem if
302
+your extruder heater takes 2 minutes to hit the target on heating.
303
+
304
+*/
305
+// If you want to enable this feature for all your extruder heaters,
306
+// uncomment the 2 defines below:
307
+
308
+// Parameters for all extruder heaters
309
+//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //in seconds
310
+//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 // in degree Celsius
311
+
312
+// If you want to enable this feature for your bed heater,
313
+// uncomment the 2 defines below:
314
+
315
+// Parameters for the bed heater
316
+//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds
317
+//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
318
+//===========================================================================
319
+
320
+
265 321
 //===========================================================================
266 322
 //=============================Mechanical Settings===========================
267 323
 //===========================================================================
@@ -273,7 +329,7 @@
273 329
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
274 330
 
275 331
 #ifndef ENDSTOPPULLUPS
276
-  // fine Enstop settings: Individual Pullups. will be ignored if ENDSTOPPULLUPS is defined
332
+  // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
277 333
   // #define ENDSTOPPULLUP_XMAX
278 334
   // #define ENDSTOPPULLUP_YMAX
279 335
   // #define ENDSTOPPULLUP_ZMAX
@@ -317,6 +373,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
317 373
 #define DISABLE_Y false
318 374
 #define DISABLE_Z false
319 375
 #define DISABLE_E false // For all extruders
376
+#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
320 377
 
321 378
 #define INVERT_X_DIR false // DELTA does not invert
322 379
 #define INVERT_Y_DIR false
@@ -350,16 +407,55 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
350 407
 //============================= Bed Auto Leveling ===========================
351 408
 
352 409
 //#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
410
+#define Z_PROBE_REPEATABILITY_TEST  // If not commented out, Z-Probe Repeatability test will be included if Auto Bed Leveling is Enabled.
353 411
 
354 412
 #ifdef ENABLE_AUTO_BED_LEVELING
355 413
 
356
-  // these are the positions on the bed to do the probing
357
-  #define LEFT_PROBE_BED_POSITION 15
358
-  #define RIGHT_PROBE_BED_POSITION 170
359
-  #define BACK_PROBE_BED_POSITION 180
360
-  #define FRONT_PROBE_BED_POSITION 20
414
+// There are 2 different ways to pick the X and Y locations to probe:
415
+
416
+//  - "grid" mode
417
+//    Probe every point in a rectangular grid
418
+//    You must specify the rectangle, and the density of sample points
419
+//    This mode is preferred because there are more measurements.
420
+//    It used to be called ACCURATE_BED_LEVELING but "grid" is more descriptive
421
+
422
+//  - "3-point" mode
423
+//    Probe 3 arbitrary points on the bed (that aren't colinear)
424
+//    You must specify the X & Y coordinates of all 3 points
425
+
426
+  #define AUTO_BED_LEVELING_GRID
427
+  // with AUTO_BED_LEVELING_GRID, the bed is sampled in a
428
+  // AUTO_BED_LEVELING_GRID_POINTSxAUTO_BED_LEVELING_GRID_POINTS grid
429
+  // and least squares solution is calculated
430
+  // Note: this feature occupies 10'206 byte
431
+  #ifdef AUTO_BED_LEVELING_GRID
432
+
433
+    // set the rectangle in which to probe
434
+    #define LEFT_PROBE_BED_POSITION 15
435
+    #define RIGHT_PROBE_BED_POSITION 170
436
+    #define BACK_PROBE_BED_POSITION 180
437
+    #define FRONT_PROBE_BED_POSITION 20
438
+
439
+     // set the number of grid points per dimension
440
+     // I wouldn't see a reason to go above 3 (=9 probing points on the bed)
441
+    #define AUTO_BED_LEVELING_GRID_POINTS 2
442
+
443
+
444
+  #else  // not AUTO_BED_LEVELING_GRID
445
+    // with no grid, just probe 3 arbitrary points.  A simple cross-product
446
+    // is used to esimate the plane of the print bed
447
+
448
+      #define ABL_PROBE_PT_1_X 15
449
+      #define ABL_PROBE_PT_1_Y 180
450
+      #define ABL_PROBE_PT_2_X 15
451
+      #define ABL_PROBE_PT_2_Y 20
452
+      #define ABL_PROBE_PT_3_X 170
453
+      #define ABL_PROBE_PT_3_Y 20
454
+
455
+  #endif // AUTO_BED_LEVELING_GRID
361 456
 
362
-  // these are the offsets to the prob relative to the extruder tip (Hotend - Probe)
457
+
458
+  // these are the offsets to the probe relative to the extruder tip (Hotend - Probe)
363 459
   #define X_PROBE_OFFSET_FROM_EXTRUDER -25
364 460
   #define Y_PROBE_OFFSET_FROM_EXTRUDER -29
365 461
   #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35
@@ -372,6 +468,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
372 468
   #define Z_RAISE_BEFORE_PROBING 15    //How much the extruder will be raised before traveling to the first probing point.
373 469
   #define Z_RAISE_BETWEEN_PROBINGS 5  //How much the extruder will be raised when traveling from between next probing points
374 470
 
471
+  //#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell
472
+  //#define SLED_DOCKING_OFFSET 5 // the extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
375 473
 
376 474
   //If defined, the Probe servo will be turned on only during movement and then turned off to avoid jerk
377 475
   //The value is the delay to turn the servo off after powered on - depends on the servo speed; 300ms is good value, but you can try lower it.
@@ -380,7 +478,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
380 478
 //  #define PROBE_SERVO_DEACTIVATION_DELAY 300
381 479
 
382 480
 
383
-//If you have enabled the Bed Auto Levelling and are using the same Z Probe for Z Homing,
481
+//If you have enabled the Bed Auto Leveling and are using the same Z Probe for Z Homing,
384 482
 //it is highly recommended you let this Z_SAFE_HOMING enabled!!!
385 483
 
386 484
   #define Z_SAFE_HOMING   // This feature is meant to avoid Z homing with probe outside the bed area.
@@ -397,7 +495,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
397 495
 
398 496
   #endif
399 497
 
400
-#endif
498
+#endif // ENABLE_AUTO_BED_LEVELING
401 499
 
402 500
 
403 501
 // The position of the homing switches
@@ -407,7 +505,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
407 505
 //Manual homing switch locations:
408 506
 
409 507
 #define MANUAL_HOME_POSITIONS  // MANUAL_*_HOME_POS below will be used
410
-// For deltabots this means top and center of the cartesian print volume.
508
+// For deltabots this means top and center of the Cartesian print volume.
411 509
 #define MANUAL_X_HOME_POS 0
412 510
 #define MANUAL_Y_HOME_POS 0
413 511
 #define MANUAL_Z_HOME_POS 250 // For delta: Distance between nozzle and print surface after homing.
@@ -442,12 +540,21 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
442 540
 //=============================Additional Features===========================
443 541
 //===========================================================================
444 542
 
543
+// Custom M code points
544
+#define CUSTOM_M_CODES
545
+#ifdef CUSTOM_M_CODES
546
+  #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
547
+  #define Z_PROBE_OFFSET_RANGE_MIN -15
548
+  #define Z_PROBE_OFFSET_RANGE_MAX -5
549
+#endif
550
+
551
+
445 552
 // EEPROM
446
-// the microcontroller can store settings in the EEPROM, e.g. max velocity...
447
-// M500 - stores paramters in EEPROM
553
+// The microcontroller can store settings in the EEPROM, e.g. max velocity...
554
+// M500 - stores parameters in EEPROM
448 555
 // M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
449 556
 // M502 - reverts to the default "factory settings".  You still need to store them in EEPROM afterwards if you want to.
450
-//define this to enable eeprom support
557
+//define this to enable EEPROM support
451 558
 //#define EEPROM_SETTINGS
452 559
 //to disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
453 560
 // please keep turned on if you can.
@@ -463,14 +570,17 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
463 570
 #define ABS_PREHEAT_FAN_SPEED 255   // Insert Value between 0 and 255
464 571
 
465 572
 //LCD and SD support
466
-//#define ULTRA_LCD  //general lcd support, also 16x2
573
+//#define ULTRA_LCD  //general LCD support, also 16x2
467 574
 //#define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
468 575
 //#define SDSUPPORT // Enable SD Card Support in Hardware Console
469 576
 //#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
577
+//#define SD_CHECK_AND_RETRY // Use CRC checks and retries on the SD communication
470 578
 //#define ENCODER_PULSES_PER_STEP 1 // Increase if you have a high resolution encoder
471 579
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
472
-//#define ULTIMAKERCONTROLLER //as available from the ultimaker online store.
473
-//#define ULTIPANEL  //the ultipanel as on thingiverse
580
+//#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
581
+//#define ULTIPANEL  //the UltiPanel as on Thingiverse
582
+//#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
583
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
474 584
 
475 585
 // The MaKr3d Makr-Panel with graphic controller and SD support
476 586
 // http://reprap.org/wiki/MaKr3d_MaKrPanel
@@ -556,6 +666,21 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
556 666
   #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD
557 667
   #define NEWPANEL
558 668
   #define ULTIPANEL
669
+
670
+  #ifndef ENCODER_PULSES_PER_STEP
671
+	#define ENCODER_PULSES_PER_STEP 4
672
+  #endif
673
+
674
+  #ifndef ENCODER_STEPS_PER_MENU_ITEM
675
+	#define ENCODER_STEPS_PER_MENU_ITEM 1
676
+  #endif
677
+
678
+
679
+  #ifdef LCD_USE_I2C_BUZZER
680
+	#define LCD_FEEDBACK_FREQUENCY_HZ 1000
681
+	#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
682
+  #endif
683
+
559 684
 #endif
560 685
 
561 686
 // Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
@@ -578,7 +703,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
578 703
 // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
579 704
 //#define SR_LCD
580 705
 #ifdef SR_LCD
581
-   #define SR_LCD_2W_NL    // Non latching 2 wire shiftregister
706
+   #define SR_LCD_2W_NL    // Non latching 2 wire shift register
582 707
    //#define NEWPANEL
583 708
 #endif
584 709
 
@@ -594,7 +719,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
594 719
     #define LCD_WIDTH 20
595 720
     #define LCD_HEIGHT 4
596 721
   #endif
597
-#else //no panel but just lcd
722
+#else //no panel but just LCD
598 723
   #ifdef ULTRA_LCD
599 724
   #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display
600 725
     #define LCD_WIDTH 20
@@ -616,8 +741,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
616 741
 // Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
617 742
 //#define FAST_PWM_FAN
618 743
 
619
-// Temperature status leds that display the hotend and bet temperature.
620
-// If alle hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
744
+// Temperature status LEDs that display the hotend and bet temperature.
745
+// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
621 746
 // Otherwise the RED led is on. There is 1C hysteresis.
622 747
 //#define TEMP_STAT_LEDS
623 748
 
@@ -667,6 +792,35 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
667 792
 //#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1
668 793
 //#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles
669 794
 
795
+/**********************************************************************\
796
+ * Support for a filament diameter sensor
797
+ * Also allows adjustment of diameter at print time (vs  at slicing)
798
+ * Single extruder only at this point (extruder 0)
799
+ * 
800
+ * Motherboards
801
+ * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector 
802
+ * 81 - Printrboard - Uses Analog input 2 on the Aux 2 connector
803
+ * 301 - Rambo  - uses Analog input 3
804
+ * Note may require analog pins to be defined for different motherboards
805
+ **********************************************************************/
806
+#define FILAMENT_SENSOR
807
+#define FILAMENT_SENSOR_EXTRUDER_NUM	0  //The number of the extruder that has the filament sensor (0,1,2)
808
+#define MEASUREMENT_DELAY_CM			14  //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
809
+
810
+#define DEFAULT_NOMINAL_FILAMENT_DIA  3.0  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
811
+#define MEASURED_UPPER_LIMIT          3.30  //upper limit factor used for sensor reading validation in mm
812
+#define MEASURED_LOWER_LIMIT          1.90  //lower limit factor for sensor reading validation in mm
813
+#define MAX_MEASUREMENT_DELAY			20  //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
814
+
815
+//defines used in the code
816
+#define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially 
817
+
818
+
819
+
820
+
821
+
822
+
823
+
670 824
 #include "Configuration_adv.h"
671 825
 #include "thermistortables.h"
672 826
 

+ 13
- 2
Marlin/example_configurations/delta/Configuration_adv.h 查看文件

@@ -281,6 +281,9 @@
281 281
 //=============================Additional Features===========================
282 282
 //===========================================================================
283 283
 
284
+//#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
285
+#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
286
+
284 287
 #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
285 288
 #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
286 289
 
@@ -401,8 +404,16 @@ const unsigned int dropsegments=5; //everything with less than this number of st
401 404
 // the moves are than replaced by the firmware controlled ones.
402 405
 
403 406
 // #define FWRETRACT  //ONLY PARTIALLY TESTED
404
-#define MIN_RETRACT 0.1 //minimum extruded mm to accept a automatic gcode retraction attempt
405
-
407
+#ifdef FWRETRACT
408
+  #define MIN_RETRACT 0.1                //minimum extruded mm to accept a automatic gcode retraction attempt
409
+  #define RETRACT_LENGTH 3               //default retract length (positive mm)
410
+  #define RETRACT_LENGTH_SWAP 13         //default swap retract length (positive mm), for extruder change
411
+  #define RETRACT_FEEDRATE 45            //default feedrate for retracting (mm/s)
412
+  #define RETRACT_ZLIFT 0                //default retract Z-lift
413
+  #define RETRACT_RECOVER_LENGTH 0       //default additional recover length (mm, added to retract length when recovering)
414
+  #define RETRACT_RECOVER_LENGTH_SWAP 0  //default additional swap recover length (mm, added to retract length when recovering from extruder change)
415
+  #define RETRACT_RECOVER_FEEDRATE 8     //default feedrate for recovering from retraction (mm/s)
416
+#endif
406 417
 
407 418
 //adds support for experimental filament exchange support M600; requires display
408 419
 #ifdef ULTIPANEL

+ 14
- 3
Marlin/language.h 查看文件

@@ -155,6 +155,7 @@
155 155
 	#define MSG_AUTOSTART "Autostart"
156 156
 	#define MSG_DISABLE_STEPPERS "Disable steppers"
157 157
 	#define MSG_AUTO_HOME "Auto home"
158
+	#define MSG_SET_HOME_OFFSETS "Set home offsets"
158 159
 	#define MSG_SET_ORIGIN "Set origin"
159 160
 	#define MSG_PREHEAT_PLA "Preheat PLA"
160 161
 	#define MSG_PREHEAT_PLA0 "Preheat PLA 1"
@@ -279,6 +280,7 @@
279 280
 	#define MSG_AUTOSTART "Autostart"
280 281
 	#define MSG_DISABLE_STEPPERS "Wylacz silniki"
281 282
 	#define MSG_AUTO_HOME "Auto. poz. zerowa"
283
+	#define MSG_SET_HOME_OFFSETS "Set home offsets"
282 284
 	#define MSG_SET_ORIGIN "Ustaw punkt zero"
283 285
 	#define MSG_PREHEAT_PLA "Rozgrzej PLA"
284 286
 	#define MSG_PREHEAT_PLA0 "Rozgrzej PLA 1"
@@ -406,10 +408,11 @@
406 408
 	#define MSG_AUTOSTART "Demarrage auto"
407 409
 	#define MSG_DISABLE_STEPPERS "Arreter moteurs"
408 410
 	#define MSG_AUTO_HOME "Home auto."
411
+	#define MSG_SET_HOME_OFFSETS "Set home offsets"
409 412
 	#define MSG_SET_ORIGIN "Regler origine"
410 413
 	#define MSG_PREHEAT_PLA " Prechauffage PLA"
411 414
 	#define MSG_PREHEAT_PLA0 "Prechauff. PLA 1"
412
-        #define MSG_PREHEAT_PLA1 "Prechauff. PLA 2"
415
+    #define MSG_PREHEAT_PLA1 "Prechauff. PLA 2"
413 416
 	#define MSG_PREHEAT_PLA2 "Prechauff. PLA 3"
414 417
 	#define MSG_PREHEAT_PLA012 "Prech. PLA Tout"
415 418
 	#define MSG_PREHEAT_PLA_BEDONLY "Prech. PLA Plateau"
@@ -534,6 +537,7 @@
534 537
 	#define MSG_AUTOSTART        "Autostart"
535 538
 	#define MSG_DISABLE_STEPPERS "Stepper abschalt."
536 539
 	#define MSG_AUTO_HOME        "Auto Nullpunkt"
540
+	#define MSG_SET_HOME_OFFSETS "Set home offsets"
537 541
 	#define MSG_SET_ORIGIN       "Setze Nullpunkt"
538 542
 	#define MSG_PREHEAT_PLA      "Vorwärmen PLA"
539 543
 	#define MSG_PREHEAT_PLA0     "Vorwärmen PLA 1"
@@ -661,6 +665,7 @@
661 665
 	#define MSG_AUTOSTART " Autostart"
662 666
 	#define MSG_DISABLE_STEPPERS "Apagar motores"
663 667
 	#define MSG_AUTO_HOME "Llevar al origen"
668
+	#define MSG_SET_HOME_OFFSETS "Set home offsets"
664 669
 	#define MSG_SET_ORIGIN "Establecer cero"
665 670
 	#define MSG_PREHEAT_PLA "Precalentar PLA"
666 671
 	#define MSG_PREHEAT_PLA0 "Precalentar PLA 1"
@@ -794,6 +799,7 @@
794 799
 	#define MSG_AUTOSTART						"Автостарт"
795 800
 	#define MSG_DISABLE_STEPPERS 				"Выкл. двигатели"
796 801
 	#define MSG_AUTO_HOME						"Парковка"
802
+	#define MSG_SET_HOME_OFFSETS				"Set home offsets"
797 803
 	#define MSG_SET_ORIGIN						"Запомнить ноль"
798 804
 	#define MSG_PREHEAT_PLA 					"Преднагрев PLA"
799 805
 	#define MSG_PREHEAT_PLA0					"Преднагрев PLA0"
@@ -885,11 +891,11 @@
885 891
 	#define MSG_KILLED							"УБИТО."
886 892
 	#define MSG_STOPPED							"ОСТАНОВЛЕНО."
887 893
 	#define MSG_CONTROL_RETRACT					"Откат mm:"
888
-	#define MSG_CONTROL_RETRACT_SWAP				"своп Откат mm:"
894
+	#define MSG_CONTROL_RETRACT_SWAP			"своп Откат mm:"
889 895
 	#define MSG_CONTROL_RETRACTF				"Откат  V:"
890 896
 	#define MSG_CONTROL_RETRACT_ZLIFT			"Прыжок mm:"
891 897
 	#define MSG_CONTROL_RETRACT_RECOVER			"Возврат +mm:"
892
-	#define MSG_CONTROL_RETRACT_RECOVER_SWAP		"своп Возврат +mm:"
898
+	#define MSG_CONTROL_RETRACT_RECOVER_SWAP	"своп Возврат +mm:"
893 899
 	#define MSG_CONTROL_RETRACT_RECOVERF		"Возврат  V:"
894 900
 	#define MSG_AUTORETRACT						"АвтоОткат:"
895 901
 	#define MSG_FILAMENTCHANGE 					"Change filament"
@@ -919,6 +925,7 @@
919 925
 	#define MSG_AUTOSTART            "Autostart"
920 926
 	#define MSG_DISABLE_STEPPERS     "Disabilita Motori"
921 927
 	#define MSG_AUTO_HOME            "Auto Home"
928
+	#define MSG_SET_HOME_OFFSETS     "Set home offsets"
922 929
 	#define MSG_SET_ORIGIN           "Imposta Origine"
923 930
 	#define MSG_PREHEAT_PLA          "Preriscalda PLA"
924 931
 	#define MSG_PREHEAT_PLA0         "Preriscalda PLA 1"
@@ -1044,6 +1051,7 @@
1044 1051
 	#define MSG_AUTOSTART "Autostart"
1045 1052
 	#define MSG_DISABLE_STEPPERS " Apagar motores"
1046 1053
 	#define MSG_AUTO_HOME "Ir para origen"
1054
+	#define MSG_SET_HOME_OFFSETS "Set home offsets"
1047 1055
 	#define MSG_SET_ORIGIN "Estabelecer orig."
1048 1056
 	#define MSG_PREHEAT_PLA "Pre-aquecer PLA"
1049 1057
 	#define MSG_PREHEAT_PLA0 " pre-aquecer PLA 1"
@@ -1176,6 +1184,7 @@
1176 1184
 	#define MSG_AUTOSTART "Automaatti"
1177 1185
 	#define MSG_DISABLE_STEPPERS "Vapauta moottorit"
1178 1186
 	#define MSG_AUTO_HOME "Aja referenssiin"
1187
+	#define MSG_SET_HOME_OFFSETS "Set home offsets"
1179 1188
 	#define MSG_SET_ORIGIN "Aseta origo"
1180 1189
 	#define MSG_PREHEAT_PLA "Esilammita PLA"
1181 1190
 	#define MSG_PREHEAT_PLA0 "Esilammita PLA 1"
@@ -1299,6 +1308,7 @@
1299 1308
 	#define MSG_AUTOSTART " Autostart"
1300 1309
 	#define MSG_DISABLE_STEPPERS "Amortar motors"
1301 1310
 	#define MSG_AUTO_HOME "Levar a l'orichen"
1311
+	#define MSG_SET_HOME_OFFSETS "Set home offsets"
1302 1312
 	#define MSG_SET_ORIGIN "Establir zero"
1303 1313
 	#define MSG_PREHEAT_PLA "Precalentar PLA"
1304 1314
 	#define MSG_PREHEAT_PLA0 "Precalentar PLA0"
@@ -1431,6 +1441,7 @@
1431 1441
 	#define MSG_AUTOSTART "Autostart"
1432 1442
 	#define MSG_DISABLE_STEPPERS "Motoren uit"
1433 1443
 	#define MSG_AUTO_HOME "Auto home"
1444
+	#define MSG_SET_HOME_OFFSETS "Set home offsets"
1434 1445
 	#define MSG_SET_ORIGIN "Nulpunt instellen"
1435 1446
 	#define MSG_PREHEAT_PLA "PLA voorverwarmen"
1436 1447
 	#define MSG_PREHEAT_PLA0 "PLA voorverw. 0"

+ 8
- 0
Marlin/motion_control.cpp 查看文件

@@ -44,6 +44,14 @@ void mc_arc(float *position, float *target, float *offset, uint8_t axis_0, uint8
44 44
   if (angular_travel < 0) { angular_travel += 2*M_PI; }
45 45
   if (isclockwise) { angular_travel -= 2*M_PI; }
46 46
   
47
+  //20141002:full circle for G03 did not work, e.g. G03 X80 Y80 I20 J0 F2000 is giving an Angle of zero so head is not moving
48
+  //to compensate when start pos = target pos && angle is zero -> angle = 2Pi
49
+  if (position[axis_0] == target[axis_0] && position[axis_1] == target[axis_1] && angular_travel == 0)
50
+  {
51
+	  angular_travel += 2*M_PI;
52
+  }
53
+  //end fix G03
54
+  
47 55
   float millimeters_of_travel = hypot(angular_travel*radius, fabs(linear_travel));
48 56
   if (millimeters_of_travel < 0.001) { return; }
49 57
   uint16_t segments = floor(millimeters_of_travel/MM_PER_ARC_SEGMENT);

+ 22
- 6
Marlin/pins.h 查看文件

@@ -531,7 +531,7 @@
531 531
 * Arduino Mega pin assignment
532 532
 *
533 533
 ****************************************************************************************/
534
-#if MOTHERBOARD == 3 || MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 35 || MOTHERBOARD == 77 || MOTHERBOARD == 67 || MOTHERBOARD == 68
534
+#if MOTHERBOARD == 3 || MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 35 || MOTHERBOARD == 36 || MOTHERBOARD == 77 || MOTHERBOARD == 67 || MOTHERBOARD == 68
535 535
 #define KNOWN_BOARD 1
536 536
 
537 537
 //////////////////FIX THIS//////////////
@@ -547,7 +547,7 @@
547 547
 // #define RAMPS_V_1_0
548 548
 
549 549
 
550
-#if MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 35 || MOTHERBOARD == 77 || MOTHERBOARD == 67 || MOTHERBOARD == 68
550
+#if MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 35 || MOTHERBOARD == 36 ||  MOTHERBOARD == 77 || MOTHERBOARD == 67 || MOTHERBOARD == 68
551 551
 
552 552
   #define LARGE_FLASH true
553 553
 
@@ -628,6 +628,15 @@
628 628
     #define E1_DIR_PIN         34
629 629
     #define E1_ENABLE_PIN      30
630 630
 
631
+#if MOTHERBOARD == 34  //FMM added for Filament Extruder
632
+#ifdef FILAMENT_SENSOR
633
+	  //define analog pin for the filament width sensor input
634
+	  //Use the RAMPS 1.4 Analog input 5 on the AUX2 connector
635
+      #define FILWIDTH_PIN        5
636
+#endif
637
+#endif
638
+
639
+
631 640
     #if MOTHERBOARD == 68
632 641
       #define E2_STEP_PIN        23
633 642
       #define E2_DIR_PIN         25
@@ -653,7 +662,7 @@
653 662
     #define FAN_PIN            4 // IO pin. Buffer needed
654 663
   #endif
655 664
 
656
-  #if MOTHERBOARD == 77
665
+  #if MOTHERBOARD == 77 || MOTHERBOARD == 36
657 666
     #define FAN_PIN            8
658 667
   #endif
659 668
 
@@ -709,7 +718,7 @@
709 718
     #define TEMP_2_PIN         -1   // ANALOG NUMBERING
710 719
   #endif
711 720
 
712
-  #if MOTHERBOARD == 35
721
+  #if MOTHERBOARD == 35 || MOTHERBOARD == 36
713 722
     #define HEATER_BED_PIN     -1    // NO BED
714 723
   #else
715 724
     #if MOTHERBOARD == 77
@@ -1762,6 +1771,9 @@
1762 1771
   #define Z_STOP_PIN         36
1763 1772
   #define TEMP_0_PIN          1  // Extruder / Analog pin numbering
1764 1773
   #define TEMP_BED_PIN        0  // Bed / Analog pin numbering
1774
+  #ifdef FILAMENT_SENSOR
1775
+   #define FILWIDTH_PIN        2
1776
+  #endif //FILAMENT_SENSOR
1765 1777
 #endif
1766 1778
 
1767 1779
 #define TEMP_1_PIN         -1
@@ -2078,8 +2090,8 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
2078 2090
 #define Z_DIR_PIN          28
2079 2091
 #define Z_STOP_PIN         30
2080 2092
 
2081
-#define E0_STEP_PIN         17
2082
-#define E0_DIR_PIN          21
2093
+#define E0_STEP_PIN        17
2094
+#define E0_DIR_PIN         21
2083 2095
 
2084 2096
 #define LED_PIN            -1
2085 2097
 
@@ -2396,6 +2408,10 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
2396 2408
   #endif
2397 2409
 #endif //ULTRA_LCD
2398 2410
 
2411
+#ifdef FILAMENT_SENSOR
2412
+  //Filip added pin for Filament sensor analog input 
2413
+  #define FILWIDTH_PIN        3
2414
+#endif //FILAMENT_SENSOR
2399 2415
 
2400 2416
 #endif
2401 2417
 

+ 47
- 0
Marlin/planner.cpp 查看文件

@@ -119,6 +119,10 @@ static long x_segment_time[3]={MAX_FREQ_TIME + 1,0,0};     // Segment times (in
119 119
 static long y_segment_time[3]={MAX_FREQ_TIME + 1,0,0};
120 120
 #endif
121 121
 
122
+#ifdef FILAMENT_SENSOR
123
+ static char meas_sample; //temporary variable to hold filament measurement sample
124
+#endif
125
+
122 126
 // Returns the index of the next block in the ring buffer
123 127
 // NOTE: Removed modulo (%) operator, which uses an expensive divide and multiplication.
124 128
 static int8_t next_block_index(int8_t block_index) {
@@ -762,6 +766,49 @@ block->steps_y = labs((target[X_AXIS]-position[X_AXIS]) - (target[Y_AXIS]-positi
762 766
   block->nominal_speed = block->millimeters * inverse_second; // (mm/sec) Always > 0
763 767
   block->nominal_rate = ceil(block->step_event_count * inverse_second); // (step/sec) Always > 0
764 768
 
769
+#ifdef FILAMENT_SENSOR
770
+  //FMM update ring buffer used for delay with filament measurements
771
+  
772
+  
773
+    if((extruder==FILAMENT_SENSOR_EXTRUDER_NUM) && (delay_index2 > -1))  //only for extruder with filament sensor and if ring buffer is initialized
774
+  	  {
775
+    delay_dist = delay_dist + delta_mm[E_AXIS];  //increment counter with next move in e axis
776
+  
777
+    while (delay_dist >= (10*(MAX_MEASUREMENT_DELAY+1)))  //check if counter is over max buffer size in mm
778
+      	  delay_dist = delay_dist - 10*(MAX_MEASUREMENT_DELAY+1);  //loop around the buffer
779
+    while (delay_dist<0)
780
+    	  delay_dist = delay_dist + 10*(MAX_MEASUREMENT_DELAY+1); //loop around the buffer
781
+      
782
+    delay_index1=delay_dist/10.0;  //calculate index
783
+    
784
+    //ensure the number is within range of the array after converting from floating point
785
+    if(delay_index1<0)
786
+    	delay_index1=0;
787
+    else if (delay_index1>MAX_MEASUREMENT_DELAY)
788
+    	delay_index1=MAX_MEASUREMENT_DELAY;
789
+    	
790
+    if(delay_index1 != delay_index2)  //moved index
791
+  	  {
792
+    	meas_sample=widthFil_to_size_ratio()-100;  //subtract off 100 to reduce magnitude - to store in a signed char
793
+  	  }
794
+    while( delay_index1 != delay_index2)
795
+  	  {
796
+  	  delay_index2 = delay_index2 + 1;
797
+  	if(delay_index2>MAX_MEASUREMENT_DELAY)
798
+  			  delay_index2=delay_index2-(MAX_MEASUREMENT_DELAY+1);  //loop around buffer when incrementing
799
+  	  if(delay_index2<0)
800
+  		delay_index2=0;
801
+  	  else if (delay_index2>MAX_MEASUREMENT_DELAY)
802
+  		delay_index2=MAX_MEASUREMENT_DELAY;  
803
+  	  
804
+  	  measurement_delay[delay_index2]=meas_sample;
805
+  	  }
806
+    	
807
+    
808
+  	  }
809
+#endif
810
+
811
+
765 812
   // Calculate and limit speed in mm/sec for each axis
766 813
   float current_speed[4];
767 814
   float speed_factor = 1.0; //factor <=1 do decrease speed

+ 1
- 1
Marlin/stepper.cpp 查看文件

@@ -1241,7 +1241,7 @@ void microstep_init()
1241 1241
   pinMode(Y_MS1_PIN,OUTPUT);
1242 1242
   pinMode(Y_MS2_PIN,OUTPUT);
1243 1243
   pinMode(Z_MS1_PIN,OUTPUT);
1244
-  pinMode(Z_MS2_PIN,OUTPUT);  
1244
+  pinMode(Z_MS2_PIN,OUTPUT);
1245 1245
   pinMode(E0_MS1_PIN,OUTPUT);
1246 1246
   pinMode(E0_MS2_PIN,OUTPUT);
1247 1247
   for(int i=0;i<=4;i++) microstep_mode(i,microstep_modes[i]);

+ 117
- 6
Marlin/temperature.cpp 查看文件

@@ -74,7 +74,10 @@ unsigned char soft_pwm_bed;
74 74
 #ifdef BABYSTEPPING
75 75
   volatile int babystepsTodo[3]={0,0,0};
76 76
 #endif
77
-  
77
+
78
+#ifdef FILAMENT_SENSOR
79
+  int current_raw_filwidth = 0;  //Holds measured filament diameter - one extruder only
80
+#endif  
78 81
 //===========================================================================
79 82
 //=============================private variables============================
80 83
 //===========================================================================
@@ -161,6 +164,9 @@ unsigned long watchmillis[EXTRUDERS] = ARRAY_BY_EXTRUDERS(0,0,0);
161 164
 #define SOFT_PWM_SCALE 0
162 165
 #endif
163 166
 
167
+#ifdef FILAMENT_SENSOR
168
+  static int meas_shift_index;  //used to point to a delayed sample in buffer for filament width sensor
169
+#endif
164 170
 //===========================================================================
165 171
 //=============================   functions      ============================
166 172
 //===========================================================================
@@ -604,6 +610,28 @@ void manage_heater()
604 610
       }
605 611
     #endif
606 612
   #endif
613
+  
614
+//code for controlling the extruder rate based on the width sensor 
615
+#ifdef FILAMENT_SENSOR
616
+  if(filament_sensor) 
617
+	{
618
+	meas_shift_index=delay_index1-meas_delay_cm;
619
+		  if(meas_shift_index<0)
620
+			  meas_shift_index = meas_shift_index + (MAX_MEASUREMENT_DELAY+1);  //loop around buffer if needed
621
+		  
622
+		  //get the delayed info and add 100 to reconstitute to a percent of the nominal filament diameter
623
+		  //then square it to get an area
624
+		  
625
+		  if(meas_shift_index<0)
626
+			  meas_shift_index=0;
627
+		  else if (meas_shift_index>MAX_MEASUREMENT_DELAY)
628
+			  meas_shift_index=MAX_MEASUREMENT_DELAY;
629
+		  
630
+		     volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM] = pow((float)(100+measurement_delay[meas_shift_index])/100.0,2);
631
+		     if (volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM] <0.01)
632
+		    	 volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM]=0.01;
633
+	}
634
+#endif
607 635
 }
608 636
 
609 637
 #define PGM_RD_W(x)   (short)pgm_read_word(&x)
@@ -697,6 +725,9 @@ static void updateTemperaturesFromRawValues()
697 725
     #ifdef TEMP_SENSOR_1_AS_REDUNDANT
698 726
       redundant_temperature = analog2temp(redundant_temperature_raw, 1);
699 727
     #endif
728
+    #ifdef FILAMENT_SENSOR  && (FILWIDTH_PIN > -1)    //check if a sensor is supported 
729
+      filament_width_meas = analog2widthFil();
730
+    #endif  
700 731
     //Reset the watchdog after we know we have a temperature measurement.
701 732
     watchdog_reset();
702 733
 
@@ -705,6 +736,36 @@ static void updateTemperaturesFromRawValues()
705 736
     CRITICAL_SECTION_END;
706 737
 }
707 738
 
739
+
740
+// For converting raw Filament Width to milimeters 
741
+#ifdef FILAMENT_SENSOR
742
+float analog2widthFil() { 
743
+return current_raw_filwidth/16383.0*5.0; 
744
+//return current_raw_filwidth; 
745
+} 
746
+ 
747
+// For converting raw Filament Width to a ratio 
748
+int widthFil_to_size_ratio() { 
749
+ 
750
+float temp; 
751
+      
752
+temp=filament_width_meas;
753
+if(filament_width_meas<MEASURED_LOWER_LIMIT)
754
+	temp=filament_width_nominal;  //assume sensor cut out
755
+else if (filament_width_meas>MEASURED_UPPER_LIMIT)
756
+	temp= MEASURED_UPPER_LIMIT;
757
+
758
+
759
+return(filament_width_nominal/temp*100); 
760
+
761
+
762
+} 
763
+#endif
764
+
765
+
766
+
767
+
768
+
708 769
 void tp_init()
709 770
 {
710 771
 #if (MOTHERBOARD == 80) && ((TEMP_SENSOR_0==-1)||(TEMP_SENSOR_1==-1)||(TEMP_SENSOR_2==-1)||(TEMP_SENSOR_BED==-1))
@@ -804,6 +865,17 @@ void tp_init()
804 865
     #endif
805 866
   #endif
806 867
   
868
+  //Added for Filament Sensor 
869
+  #ifdef FILAMENT_SENSOR
870
+   #if defined(FILWIDTH_PIN) && (FILWIDTH_PIN > -1) 
871
+	#if FILWIDTH_PIN < 8 
872
+       	   DIDR0 |= 1<<FILWIDTH_PIN;  
873
+	#else 
874
+       	   DIDR2 |= 1<<(FILWIDTH_PIN - 8);  
875
+	#endif 
876
+   #endif
877
+  #endif
878
+  
807 879
   // Use timer0 for temperature measurement
808 880
   // Interleave temperature interrupt with millies interrupt
809 881
   OCR0B = 128;
@@ -1116,7 +1188,7 @@ ISR(TIMER0_COMPB_vect)
1116 1188
   static unsigned long raw_temp_1_value = 0;
1117 1189
   static unsigned long raw_temp_2_value = 0;
1118 1190
   static unsigned long raw_temp_bed_value = 0;
1119
-  static unsigned char temp_state = 8;
1191
+  static unsigned char temp_state = 10;
1120 1192
   static unsigned char pwm_count = (1 << SOFT_PWM_SCALE);
1121 1193
   static unsigned char soft_pwm_0;
1122 1194
   #if (EXTRUDERS > 1) || defined(HEATERS_PARALLEL)
@@ -1129,6 +1201,10 @@ ISR(TIMER0_COMPB_vect)
1129 1201
   static unsigned char soft_pwm_b;
1130 1202
   #endif
1131 1203
   
1204
+  #if defined(FILWIDTH_PIN) &&(FILWIDTH_PIN > -1)
1205
+   static unsigned long raw_filwidth_value = 0;  //added for filament width sensor
1206
+  #endif
1207
+  
1132 1208
   if(pwm_count == 0){
1133 1209
     soft_pwm_0 = soft_pwm[0];
1134 1210
     if(soft_pwm_0 > 0) { 
@@ -1255,10 +1331,39 @@ ISR(TIMER0_COMPB_vect)
1255 1331
       #if defined(TEMP_2_PIN) && (TEMP_2_PIN > -1)
1256 1332
         raw_temp_2_value += ADC;
1257 1333
       #endif
1258
-      temp_state = 0;
1259
-      temp_count++;
1334
+      temp_state = 8;//change so that Filament Width is also measured
1335
+      
1260 1336
       break;
1261
-    case 8: //Startup, delay initial temp reading a tiny bit so the hardware can settle.
1337
+    case 8: //Prepare FILWIDTH 
1338
+     #if defined(FILWIDTH_PIN) && (FILWIDTH_PIN> -1) 
1339
+      #if FILWIDTH_PIN>7 
1340
+         ADCSRB = 1<<MUX5;
1341
+      #else
1342
+         ADCSRB = 0; 
1343
+      #endif 
1344
+      ADMUX = ((1 << REFS0) | (FILWIDTH_PIN & 0x07)); 
1345
+      ADCSRA |= 1<<ADSC; // Start conversion 
1346
+     #endif 
1347
+     lcd_buttons_update();       
1348
+     temp_state = 9; 
1349
+     break; 
1350
+    case 9:   //Measure FILWIDTH 
1351
+     #if defined(FILWIDTH_PIN) &&(FILWIDTH_PIN > -1) 
1352
+     //raw_filwidth_value += ADC;  //remove to use an IIR filter approach 
1353
+      if(ADC>102)  //check that ADC is reading a voltage > 0.5 volts, otherwise don't take in the data.
1354
+        {
1355
+    	raw_filwidth_value= raw_filwidth_value-(raw_filwidth_value>>7);  //multipliy raw_filwidth_value by 127/128
1356
+        
1357
+        raw_filwidth_value= raw_filwidth_value + ((unsigned long)ADC<<7);  //add new ADC reading 
1358
+        }
1359
+     #endif 
1360
+     temp_state = 0;   
1361
+      
1362
+     temp_count++;
1363
+     break;      
1364
+      
1365
+      
1366
+    case 10: //Startup, delay initial temp reading a tiny bit so the hardware can settle.
1262 1367
       temp_state = 0;
1263 1368
       break;
1264 1369
 //    default:
@@ -1267,7 +1372,7 @@ ISR(TIMER0_COMPB_vect)
1267 1372
 //      break;
1268 1373
   }
1269 1374
     
1270
-  if(temp_count >= OVERSAMPLENR) // 8 * 16 * 1/(16000000/64/256)  = 131ms.
1375
+  if(temp_count >= OVERSAMPLENR) // 10 * 16 * 1/(16000000/64/256)  = 164ms.
1271 1376
   {
1272 1377
     if (!temp_meas_ready) //Only update the raw values if they have been read. Else we could be updating them during reading.
1273 1378
     {
@@ -1283,6 +1388,12 @@ ISR(TIMER0_COMPB_vect)
1283 1388
 #endif
1284 1389
       current_temperature_bed_raw = raw_temp_bed_value;
1285 1390
     }
1391
+
1392
+//Add similar code for Filament Sensor - can be read any time since IIR filtering is used 
1393
+#if defined(FILWIDTH_PIN) &&(FILWIDTH_PIN > -1)
1394
+  current_raw_filwidth = raw_filwidth_value>>10;  //need to divide to get to 0-16384 range since we used 1/128 IIR filter approach 
1395
+#endif
1396
+    
1286 1397
     
1287 1398
     temp_meas_ready = true;
1288 1399
     temp_count = 0;

+ 8
- 0
Marlin/temperature.h 查看文件

@@ -31,6 +31,14 @@
31 31
 void tp_init();  //initialize the heating
32 32
 void manage_heater(); //it is critical that this is called periodically.
33 33
 
34
+#ifdef FILAMENT_SENSOR
35
+// For converting raw Filament Width to milimeters 
36
+ float analog2widthFil(); 
37
+ 
38
+// For converting raw Filament Width to an extrusion ratio 
39
+ int widthFil_to_size_ratio();
40
+#endif
41
+
34 42
 // low level conversion routines
35 43
 // do not use these routines and variables outside of temperature.cpp
36 44
 extern int target_temperature[EXTRUDERS];  

+ 69
- 0
Marlin/thermistortables.h 查看文件

@@ -621,6 +621,75 @@ const short temptable_11[][2] PROGMEM = {
621 621
 };
622 622
 #endif
623 623
 
624
+#if (THERMISTORHEATER_0 == 13) || (THERMISTORHEATER_1 == 13) || (THERMISTORHEATER_2 == 13) || (THERMISTORBED == 13)
625
+// Hisens thermistor B25/50 =3950 +/-1%
626
+
627
+const short temptable_13[][2] PROGMEM = {
628
+ {	22.5*OVERSAMPLENR,	300	},
629
+{	24.125*OVERSAMPLENR,	295	},
630
+{	25.875*OVERSAMPLENR,	290	},
631
+{	27.8125*OVERSAMPLENR,	285	},
632
+{	29.9375*OVERSAMPLENR,	280	},
633
+{	32.25*OVERSAMPLENR,	275	},
634
+{	34.8125*OVERSAMPLENR,	270	},
635
+{	37.625*OVERSAMPLENR,	265	},
636
+{	40.6875*OVERSAMPLENR,	260	},
637
+{	44.0625*OVERSAMPLENR,	255	},
638
+{	47.75*OVERSAMPLENR,	250	},
639
+{	51.8125*OVERSAMPLENR,	245	},
640
+{	56.3125*OVERSAMPLENR,	240	},
641
+{	61.25*OVERSAMPLENR,	235	},
642
+{	66.75*OVERSAMPLENR,	230	},
643
+{	72.8125*OVERSAMPLENR,	225	},
644
+{	79.5*OVERSAMPLENR,	220	},
645
+{	87*OVERSAMPLENR,	215	},
646
+{	95.3125*OVERSAMPLENR,	210	},
647
+{	104.1875*OVERSAMPLENR,	205	},
648
+{	112.75*OVERSAMPLENR,	200	},
649
+{	123.125*OVERSAMPLENR,	195	},
650
+{	135.75*OVERSAMPLENR,	190	},
651
+{	148.3125*OVERSAMPLENR,	185	},
652
+{	163.8125*OVERSAMPLENR,	180	},
653
+{	179*OVERSAMPLENR,	175	},
654
+{	211.125*OVERSAMPLENR,	170	},
655
+{	216.125*OVERSAMPLENR,	165	},
656
+{	236.5625*OVERSAMPLENR,	160	},
657
+{	258.5*OVERSAMPLENR,	155	},
658
+{	279.875*OVERSAMPLENR,	150	},
659
+{	305.375*OVERSAMPLENR,	145	},
660
+{	333.25*OVERSAMPLENR,	140	},
661
+{	362.5625*OVERSAMPLENR,	135	},
662
+{	393.6875*OVERSAMPLENR,	130	},
663
+{	425*OVERSAMPLENR,	125	},
664
+{	460.625*OVERSAMPLENR,	120	},
665
+{	495.1875*OVERSAMPLENR,	115	},
666
+{	530.875*OVERSAMPLENR,	110	},
667
+{	567.25*OVERSAMPLENR,	105	},
668
+{	601.625*OVERSAMPLENR,	100	},
669
+{	637.875*OVERSAMPLENR,	95	},
670
+{	674.5625*OVERSAMPLENR,	90	},
671
+{	710*OVERSAMPLENR,	85	},
672
+{	744.125*OVERSAMPLENR,	80	},
673
+{	775.9375*OVERSAMPLENR,	75	},
674
+{	806.875*OVERSAMPLENR,	70	},
675
+{	835.1875*OVERSAMPLENR,	65	},
676
+{	861.125*OVERSAMPLENR,	60	},
677
+{	884.375*OVERSAMPLENR,	55	},
678
+{	904.5625*OVERSAMPLENR,	50	},
679
+{	923.8125*OVERSAMPLENR,	45	},
680
+{	940.375*OVERSAMPLENR,	40	},
681
+{	954.625*OVERSAMPLENR,	35	},
682
+{	966.875*OVERSAMPLENR,	30	},
683
+{	977.0625*OVERSAMPLENR,	25	},
684
+{	986*OVERSAMPLENR,	20	},
685
+{	993.375*OVERSAMPLENR,	15	},
686
+{	999.5*OVERSAMPLENR,	10	},
687
+{	1004.5*OVERSAMPLENR,	5	},
688
+{	1008.5*OVERSAMPLENR,	0	}
689
+
690
+ };
691
+#endif
692
+
624 693
 #if (THERMISTORHEATER_0 == 20) || (THERMISTORHEATER_1 == 20) || (THERMISTORHEATER_2 == 20) || (THERMISTORBED == 20) // PT100 with INA826 amp on Ultimaker v2.0 electronics
625 694
 /* The PT100 in the Ultimaker v2.0 electronics has a high sample value for a high temperature.
626 695
 This does not match the normal thermistor behaviour so we need to set the following defines */

+ 27
- 1
Marlin/ultralcd.cpp 查看文件

@@ -328,6 +328,23 @@ static void lcd_autostart_sd()
328 328
 }
329 329
 #endif
330 330
 
331
+void lcd_set_home_offsets()
332
+{
333
+    for(int8_t i=0; i < NUM_AXIS; i++) {
334
+      if (i != E_AXIS) {
335
+        add_homing[i] -= current_position[i];
336
+        current_position[i] = 0.0;
337
+      }
338
+    }
339
+    plan_set_position(0.0, 0.0, 0.0, current_position[E_AXIS]);
340
+
341
+    // Audio feedback
342
+    enquecommand_P(PSTR("M300 S659 P200"));
343
+    enquecommand_P(PSTR("M300 S698 P200"));
344
+    lcd_return_to_status();
345
+}
346
+
347
+
331 348
 #ifdef BABYSTEPPING
332 349
 static void lcd_babystep_x()
333 350
 {
@@ -395,7 +412,9 @@ static void lcd_tune_menu()
395 412
     START_MENU();
396 413
     MENU_ITEM(back, MSG_MAIN, lcd_main_menu);
397 414
     MENU_ITEM_EDIT(int3, MSG_SPEED, &feedmultiply, 10, 999);
415
+#if TEMP_SENSOR_0 != 0
398 416
     MENU_ITEM_EDIT(int3, MSG_NOZZLE, &target_temperature[0], 0, HEATER_0_MAXTEMP - 15);
417
+#endif
399 418
 #if TEMP_SENSOR_1 != 0
400 419
     MENU_ITEM_EDIT(int3, MSG_NOZZLE1, &target_temperature[1], 0, HEATER_1_MAXTEMP - 15);
401 420
 #endif
@@ -587,6 +606,7 @@ static void lcd_prepare_menu()
587 606
 #endif
588 607
     MENU_ITEM(gcode, MSG_DISABLE_STEPPERS, PSTR("M84"));
589 608
     MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28"));
609
+    MENU_ITEM(function, MSG_SET_HOME_OFFSETS, lcd_set_home_offsets);
590 610
     //MENU_ITEM(gcode, MSG_SET_ORIGIN, PSTR("G92 X0 Y0 Z0"));
591 611
 #if TEMP_SENSOR_0 != 0
592 612
   #if TEMP_SENSOR_1 != 0 || TEMP_SENSOR_2 != 0 || TEMP_SENSOR_BED != 0
@@ -801,7 +821,9 @@ static void lcd_control_temperature_menu()
801 821
 
802 822
     START_MENU();
803 823
     MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
824
+#if TEMP_SENSOR_0 != 0
804 825
     MENU_ITEM_EDIT(int3, MSG_NOZZLE, &target_temperature[0], 0, HEATER_0_MAXTEMP - 15);
826
+#endif
805 827
 #if TEMP_SENSOR_1 != 0
806 828
     MENU_ITEM_EDIT(int3, MSG_NOZZLE1, &target_temperature[1], 0, HEATER_1_MAXTEMP - 15);
807 829
 #endif
@@ -812,7 +834,7 @@ static void lcd_control_temperature_menu()
812 834
     MENU_ITEM_EDIT(int3, MSG_BED, &target_temperature_bed, 0, BED_MAXTEMP - 15);
813 835
 #endif
814 836
     MENU_ITEM_EDIT(int3, MSG_FAN_SPEED, &fanSpeed, 0, 255);
815
-#ifdef AUTOTEMP
837
+#if defined AUTOTEMP && (TEMP_SENSOR_0 != 0)
816 838
     MENU_ITEM_EDIT(bool, MSG_AUTOTEMP, &autotemp_enabled);
817 839
     MENU_ITEM_EDIT(float3, MSG_MIN, &autotemp_min, 0, HEATER_0_MAXTEMP - 15);
818 840
     MENU_ITEM_EDIT(float3, MSG_MAX, &autotemp_max, 0, HEATER_0_MAXTEMP - 15);
@@ -837,7 +859,9 @@ static void lcd_control_temperature_preheat_pla_settings_menu()
837 859
     START_MENU();
838 860
     MENU_ITEM(back, MSG_TEMPERATURE, lcd_control_temperature_menu);
839 861
     MENU_ITEM_EDIT(int3, MSG_FAN_SPEED, &plaPreheatFanSpeed, 0, 255);
862
+#if TEMP_SENSOR_0 != 0
840 863
     MENU_ITEM_EDIT(int3, MSG_NOZZLE, &plaPreheatHotendTemp, 0, HEATER_0_MAXTEMP - 15);
864
+#endif
841 865
 #if TEMP_SENSOR_BED != 0
842 866
     MENU_ITEM_EDIT(int3, MSG_BED, &plaPreheatHPBTemp, 0, BED_MAXTEMP - 15);
843 867
 #endif
@@ -852,7 +876,9 @@ static void lcd_control_temperature_preheat_abs_settings_menu()
852 876
     START_MENU();
853 877
     MENU_ITEM(back, MSG_TEMPERATURE, lcd_control_temperature_menu);
854 878
     MENU_ITEM_EDIT(int3, MSG_FAN_SPEED, &absPreheatFanSpeed, 0, 255);
879
+#if TEMP_SENSOR_0 != 0
855 880
     MENU_ITEM_EDIT(int3, MSG_NOZZLE, &absPreheatHotendTemp, 0, HEATER_0_MAXTEMP - 15);
881
+#endif
856 882
 #if TEMP_SENSOR_BED != 0
857 883
     MENU_ITEM_EDIT(int3, MSG_BED, &absPreheatHPBTemp, 0, BED_MAXTEMP - 15);
858 884
 #endif

+ 1
- 1
Marlin/ultralcd_implementation_hitachi_HD44780.h 查看文件

@@ -467,7 +467,7 @@ static void lcd_implementation_status_screen()
467 467
 # endif//LCD_WIDTH > 19
468 468
     lcd.setCursor(LCD_WIDTH - 8, 1);
469 469
     lcd.print('Z');
470
-    lcd.print(ftostr32(current_position[Z_AXIS]));
470
+    lcd.print(ftostr32(current_position[Z_AXIS] + 0.00001));
471 471
 #endif//LCD_HEIGHT > 2
472 472
 
473 473
 #if LCD_HEIGHT > 3

+ 5
- 0
README.md 查看文件

@@ -2,6 +2,7 @@
2 2
 Marlin 3D Printer Firmware
3 3
 ==========================
4 4
 [![Coverity Scan Build Status](https://scan.coverity.com/projects/2224/badge.svg)](https://scan.coverity.com/projects/2224)
5
+[![Travis Build Status](https://travis-ci.org/ErikZalm/Marlin.svg)](https://travis-ci.org/ErikZalm/Marlin)
5 6
 
6 7
 Marlin has a GPL license because I believe in open development.
7 8
 Please do not use this code in products (3D printers, CNC etc) that are closed source or are crippled by a patent.
@@ -233,6 +234,10 @@ M Codes
233 234
 *  M400 - Finish all moves
234 235
 *  M401 - Lower z-probe if present
235 236
 *  M402 - Raise z-probe if present
237
+*  M404 - N<dia in mm> Enter the nominal filament width (3mm, 1.75mm ) or will display nominal filament width without parameters
238
+*  M405 - Turn on Filament Sensor extrusion control.  Optional D<delay in cm> to set delay in centimeters between sensor and extruder
239
+*  M406 - Turn off Filament Sensor extrusion control
240
+*  M407 - Displays measured filament diameter
236 241
 *  M500 - stores paramters in EEPROM
237 242
 *  M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
238 243
 *  M502 - reverts to the default "factory settings".  You still need to store them in EEPROM afterwards if you want to.

Loading…
取消
儲存