Browse Source

Merge branch 'Development' into manual-bed-leveling+mesh-bed-level

Edward Patel 9 years ago
parent
commit
a7e89d4cfa

+ 2
- 0
Marlin/Configuration.h View File

@@ -225,6 +225,8 @@ Here are some standard links for getting your machine calibrated:
225 225
 // so you shouldn't use it unless you are OK with PWM on your bed.  (see the comment on enabling PIDTEMPBED)
226 226
 #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
227 227
 
228
+//#define PID_BED_DEBUG // Sends debug data to the serial port.
229
+
228 230
 #ifdef PIDTEMPBED
229 231
 //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
230 232
 //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)

+ 2
- 0
Marlin/configurator/config/Configuration.h View File

@@ -234,6 +234,8 @@ Here are some standard links for getting your machine calibrated:
234 234
 // so you shouldn't use it unless you are OK with PWM on your bed.  (see the comment on enabling PIDTEMPBED)
235 235
 #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
236 236
 
237
+//#define PID_BED_DEBUG // Sends debug data to the serial port.
238
+
237 239
 #ifdef PIDTEMPBED
238 240
 //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
239 241
 //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)

+ 2
- 0
Marlin/example_configurations/Felix/Configuration.h View File

@@ -215,6 +215,8 @@ Here are some standard links for getting your machine calibrated:
215 215
 // so you shouldn't use it unless you are OK with PWM on your bed.  (see the comment on enabling PIDTEMPBED)
216 216
 #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
217 217
 
218
+//#define PID_BED_DEBUG // Sends debug data to the serial port.
219
+
218 220
 #ifdef PIDTEMPBED
219 221
 // Felix Foil Heater
220 222
    #define DEFAULT_bedKp 103.37

+ 2
- 0
Marlin/example_configurations/Felix/Configuration_DUAL.h View File

@@ -215,6 +215,8 @@ Here are some standard links for getting your machine calibrated:
215 215
 // so you shouldn't use it unless you are OK with PWM on your bed.  (see the comment on enabling PIDTEMPBED)
216 216
 #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
217 217
 
218
+//#define PID_BED_DEBUG // Sends debug data to the serial port.
219
+
218 220
 #ifdef PIDTEMPBED
219 221
 // Felix Foil Heater
220 222
    #define DEFAULT_bedKp 103.37

+ 2
- 0
Marlin/example_configurations/Hephestos/Configuration.h View File

@@ -231,6 +231,8 @@ Here are some standard links for getting your machine calibrated:
231 231
 // so you shouldn't use it unless you are OK with PWM on your bed.  (see the comment on enabling PIDTEMPBED)
232 232
 #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
233 233
 
234
+//#define PID_BED_DEBUG // Sends debug data to the serial port.
235
+
234 236
 #ifdef PIDTEMPBED
235 237
 //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
236 238
 //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)

+ 2
- 0
Marlin/example_configurations/K8200/Configuration.h View File

@@ -230,6 +230,8 @@ Here are some standard links for getting your machine calibrated:
230 230
 // so you shouldn't use it unless you are OK with PWM on your bed.  (see the comment on enabling PIDTEMPBED)
231 231
 #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
232 232
 
233
+//#define PID_BED_DEBUG // Sends debug data to the serial port.
234
+
233 235
 #ifdef PIDTEMPBED
234 236
 //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
235 237
 //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)

+ 2
- 0
Marlin/example_configurations/SCARA/Configuration.h View File

@@ -254,6 +254,8 @@ Here are some standard links for getting your machine calibrated:
254 254
 // so you shouldn't use it unless you are OK with PWM on your bed.  (see the comment on enabling PIDTEMPBED)
255 255
 #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
256 256
 
257
+//#define PID_BED_DEBUG // Sends debug data to the serial port.
258
+
257 259
 #ifdef PIDTEMPBED
258 260
 //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
259 261
 //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)

+ 2
- 0
Marlin/example_configurations/WITBOX/Configuration.h View File

@@ -230,6 +230,8 @@ Here are some standard links for getting your machine calibrated:
230 230
 // so you shouldn't use it unless you are OK with PWM on your bed.  (see the comment on enabling PIDTEMPBED)
231 231
 #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
232 232
 
233
+//#define PID_BED_DEBUG // Sends debug data to the serial port.
234
+
233 235
 #ifdef PIDTEMPBED
234 236
 //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
235 237
 //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)

+ 2
- 0
Marlin/example_configurations/delta/generic/Configuration.h View File

@@ -258,6 +258,8 @@ Here are some standard links for getting your machine calibrated:
258 258
 // so you shouldn't use it unless you are OK with PWM on your bed.  (see the comment on enabling PIDTEMPBED)
259 259
 #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
260 260
 
261
+//#define PID_BED_DEBUG // Sends debug data to the serial port.
262
+
261 263
 #ifdef PIDTEMPBED
262 264
 //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
263 265
 //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)

+ 2
- 0
Marlin/example_configurations/delta/kossel_mini/Configuration.h View File

@@ -259,6 +259,8 @@ Here are some standard links for getting your machine calibrated:
259 259
 // so you shouldn't use it unless you are OK with PWM on your bed.  (see the comment on enabling PIDTEMPBED)
260 260
 #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
261 261
 
262
+//#define PID_BED_DEBUG // Sends debug data to the serial port.
263
+
262 264
 #ifdef PIDTEMPBED
263 265
 //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
264 266
 //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)

+ 2
- 0
Marlin/example_configurations/makibox/Configuration.h View File

@@ -228,6 +228,8 @@ Here are some standard links for getting your machine calibrated:
228 228
 // to increase the heat up rate. However, if changed, user must be aware of the safety concerns
229 229
 // of drawing too much current from the power supply.
230 230
 
231
+//#define PID_BED_DEBUG // Sends debug data to the serial port.
232
+
231 233
 #ifdef PIDTEMPBED
232 234
 //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
233 235
 //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)

+ 2
- 0
Marlin/example_configurations/tvrrug/Round2/Configuration.h View File

@@ -230,6 +230,8 @@ Here are some standard links for getting your machine calibrated:
230 230
 // so you shouldn't use it unless you are OK with PWM on your bed.  (see the comment on enabling PIDTEMPBED)
231 231
 #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
232 232
 
233
+//#define PID_BED_DEBUG // Sends debug data to the serial port.
234
+
233 235
 #ifdef PIDTEMPBED
234 236
 //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
235 237
 //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)

+ 1
- 1
Marlin/stepper.cpp View File

@@ -89,7 +89,7 @@ static bool old_x_min_endstop = false,
89 89
 static bool check_endstops = true;
90 90
 
91 91
 volatile long count_position[NUM_AXIS] = { 0 };
92
-volatile signed char count_direction[NUM_AXIS] = { 1 };
92
+volatile signed char count_direction[NUM_AXIS] = { 1, 1, 1, 1 };
93 93
 
94 94
 
95 95
 //===========================================================================

+ 15
- 0
Marlin/temperature.cpp View File

@@ -636,6 +636,21 @@ float get_pid_output(int e) {
636 636
       pid_output = constrain(target_temperature_bed, 0, MAX_BED_POWER);
637 637
     #endif // PID_OPENLOOP
638 638
 
639
+    #ifdef PID_BED_DEBUG
640
+      SERIAL_ECHO_START;
641
+      SERIAL_ECHO(" PID_BED_DEBUG ");
642
+      SERIAL_ECHO(": Input ");
643
+      SERIAL_ECHO(current_temperature_bed);
644
+      SERIAL_ECHO(" Output ");
645
+      SERIAL_ECHO(pid_output);
646
+      SERIAL_ECHO(" pTerm ");
647
+      SERIAL_ECHO(pTerm_bed);
648
+      SERIAL_ECHO(" iTerm ");
649
+      SERIAL_ECHO(iTerm_bed);
650
+      SERIAL_ECHO(" dTerm ");
651
+      SERIAL_ECHOLN(dTerm_bed);
652
+    #endif //PID_BED_DEBUG
653
+
639 654
     return pid_output;
640 655
   }
641 656
 #endif

+ 18
- 18
Marlin/ultralcd_implementation_hitachi_HD44780.h View File

@@ -653,26 +653,26 @@ static void lcd_implementation_drawmenu_setting_edit_generic_P(bool sel, uint8_t
653 653
   while (n--) lcd.print(' ');
654 654
   lcd_printPGM(data);
655 655
 }
656
-#define lcd_implementation_drawmenu_setting_edit_int3(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ' ', itostr3(*(data)))
657
-#define lcd_implementation_drawmenu_setting_edit_float3(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ' ', ftostr3(*(data)))
658
-#define lcd_implementation_drawmenu_setting_edit_float32(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ' ', ftostr32(*(data)))
659
-#define lcd_implementation_drawmenu_setting_edit_float43(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ' ', ftostr43(*(data)))
660
-#define lcd_implementation_drawmenu_setting_edit_float5(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ' ', ftostr5(*(data)))
661
-#define lcd_implementation_drawmenu_setting_edit_float52(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ' ', ftostr52(*(data)))
662
-#define lcd_implementation_drawmenu_setting_edit_float51(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ' ', ftostr51(*(data)))
663
-#define lcd_implementation_drawmenu_setting_edit_long5(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ' ', ftostr5(*(data)))
664
-#define lcd_implementation_drawmenu_setting_edit_bool(sel, row, pstr, pstr2, data) lcd_implementation_drawmenu_setting_edit_generic_P(sel, row, pstr, ' ', (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF))
656
+#define lcd_implementation_drawmenu_setting_edit_int3(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', itostr3(*(data)))
657
+#define lcd_implementation_drawmenu_setting_edit_float3(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', ftostr3(*(data)))
658
+#define lcd_implementation_drawmenu_setting_edit_float32(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', ftostr32(*(data)))
659
+#define lcd_implementation_drawmenu_setting_edit_float43(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', ftostr43(*(data)))
660
+#define lcd_implementation_drawmenu_setting_edit_float5(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', ftostr5(*(data)))
661
+#define lcd_implementation_drawmenu_setting_edit_float52(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', ftostr52(*(data)))
662
+#define lcd_implementation_drawmenu_setting_edit_float51(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', ftostr51(*(data)))
663
+#define lcd_implementation_drawmenu_setting_edit_long5(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', ftostr5(*(data)))
664
+#define lcd_implementation_drawmenu_setting_edit_bool(sel, row, pstr, pstr2, data) lcd_implementation_drawmenu_setting_edit_generic_P(sel, row, pstr, '>', (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF))
665 665
 
666 666
 //Add version for callback functions
667
-#define lcd_implementation_drawmenu_setting_edit_callback_int3(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ' ', itostr3(*(data)))
668
-#define lcd_implementation_drawmenu_setting_edit_callback_float3(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ' ', ftostr3(*(data)))
669
-#define lcd_implementation_drawmenu_setting_edit_callback_float32(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ' ', ftostr32(*(data)))
670
-#define lcd_implementation_drawmenu_setting_edit_callback_float43(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ' ', ftostr43(*(data)))
671
-#define lcd_implementation_drawmenu_setting_edit_callback_float5(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ' ', ftostr5(*(data)))
672
-#define lcd_implementation_drawmenu_setting_edit_callback_float52(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ' ', ftostr52(*(data)))
673
-#define lcd_implementation_drawmenu_setting_edit_callback_float51(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ' ', ftostr51(*(data)))
674
-#define lcd_implementation_drawmenu_setting_edit_callback_long5(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ' ', ftostr5(*(data)))
675
-#define lcd_implementation_drawmenu_setting_edit_callback_bool(sel, row, pstr, pstr2, data, callback) lcd_implementation_drawmenu_setting_edit_generic_P(sel, row, pstr, ' ', (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF))
667
+#define lcd_implementation_drawmenu_setting_edit_callback_int3(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', itostr3(*(data)))
668
+#define lcd_implementation_drawmenu_setting_edit_callback_float3(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', ftostr3(*(data)))
669
+#define lcd_implementation_drawmenu_setting_edit_callback_float32(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', ftostr32(*(data)))
670
+#define lcd_implementation_drawmenu_setting_edit_callback_float43(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', ftostr43(*(data)))
671
+#define lcd_implementation_drawmenu_setting_edit_callback_float5(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', ftostr5(*(data)))
672
+#define lcd_implementation_drawmenu_setting_edit_callback_float52(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', ftostr52(*(data)))
673
+#define lcd_implementation_drawmenu_setting_edit_callback_float51(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', ftostr51(*(data)))
674
+#define lcd_implementation_drawmenu_setting_edit_callback_long5(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', ftostr5(*(data)))
675
+#define lcd_implementation_drawmenu_setting_edit_callback_bool(sel, row, pstr, pstr2, data, callback) lcd_implementation_drawmenu_setting_edit_generic_P(sel, row, pstr, '>', (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF))
676 676
 
677 677
 void lcd_implementation_drawedit(const char* pstr, char* value) {
678 678
   lcd.setCursor(1, 1);

Loading…
Cancel
Save