浏览代码

Merge branch 'Development' into marlin_configurator

Latest upstream changes
Scott Lahteine 10 年前
父节点
当前提交
c1240f23dd

+ 1
- 0
Marlin/Configuration.h 查看文件

118
 // 1010 is Pt1000 with 1k pullup (non standard)
118
 // 1010 is Pt1000 with 1k pullup (non standard)
119
 // 147 is Pt100 with 4k7 pullup
119
 // 147 is Pt100 with 4k7 pullup
120
 // 110 is Pt100 with 1k pullup (non standard)
120
 // 110 is Pt100 with 1k pullup (non standard)
121
+// 999 is a Dummy Table. It will ALWAYS read 25C.. Use it for Testing or Development purposes. NEVER for production machine.
121
 
122
 
122
 #define TEMP_SENSOR_0 -1
123
 #define TEMP_SENSOR_0 -1
123
 #define TEMP_SENSOR_1 -1
124
 #define TEMP_SENSOR_1 -1

+ 5
- 0
Marlin/Configuration_adv.h 查看文件

284
 //=============================Additional Features===========================
284
 //=============================Additional Features===========================
285
 //===========================================================================
285
 //===========================================================================
286
 
286
 
287
+#define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
288
+#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value
289
+#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value
290
+//#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
291
+
287
 //#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/
292
 //#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/
288
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
293
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
289
 
294
 

+ 8
- 4
Marlin/LiquidCrystalRus.cpp 查看文件

14
 // it is a Russian alphabet translation
14
 // it is a Russian alphabet translation
15
 // except 0401 --> 0xa2 = ╗, 0451 --> 0xb5
15
 // except 0401 --> 0xa2 = ╗, 0451 --> 0xb5
16
 const PROGMEM uint8_t utf_recode[] = 
16
 const PROGMEM uint8_t utf_recode[] = 
17
-       { 0x41,0xa0,0x42,0xa1,0xe0,0x45,0xa3,0xa4,0xa5,0xa6,0x4b,0xa7,0x4d,0x48,0x4f,
18
-         0xa8,0x50,0x43,0x54,0xa9,0xaa,0x58,0xe1,0xab,0xac,0xe2,0xad,0xae,0x62,0xaf,0xb0,0xb1,
19
-         0x61,0xb2,0xb3,0xb4,0xe3,0x65,0xb6,0xb7,0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0x6f,
20
-         0xbe,0x70,0x63,0xbf,0x79,0xe4,0x78,0xe5,0xc0,0xc1,0xe6,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7
17
+       { 0x41,0xa0,0x42,0xa1,0xe0,0x45,0xa3,0xa4,
18
+         0xa5,0xa6,0x4b,0xa7,0x4d,0x48,0x4f,0xa8,
19
+         0x50,0x43,0x54,0xa9,0xaa,0x58,0xe1,0xab,
20
+         0xac,0xe2,0xad,0xae,0x62,0xaf,0xb0,0xb1,
21
+         0x61,0xb2,0xb3,0xb4,0xe3,0x65,0xb6,0xb7,
22
+         0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0x6f,0xbe,
23
+         0x70,0x63,0xbf,0x79,0xe4,0x78,0xe5,0xc0,
24
+         0xc1,0xe6,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7
21
         };     
25
         };     
22
 
26
 
23
 // When the display powers up, it is configured as follows:
27
 // When the display powers up, it is configured as follows:

+ 2
- 1
Marlin/boards.h 查看文件

50
 #define BOARD_LEAPFROG          999  // Leapfrog
50
 #define BOARD_LEAPFROG          999  // Leapfrog
51
 #define BOARD_WITBOX            41   // bq WITBOX
51
 #define BOARD_WITBOX            41   // bq WITBOX
52
 #define BOARD_HEPHESTOS         42   // bq Prusa i3 Hephestos
52
 #define BOARD_HEPHESTOS         42   // bq Prusa i3 Hephestos
53
+#define BOARD_BAM_DICE          401  // 2PrintBeta BAM&DICE with STK drivers
54
+#define BOARD_BAM_DICE_DUE      402  // 2PrintBeta BAM&DICE Due with STK drivers
53
 
55
 
54
 #define BOARD_99                99   // This is in pins.h but...?
56
 #define BOARD_99                99   // This is in pins.h but...?
55
 
57
 
56
 #define MB(board) (MOTHERBOARD==BOARD_##board)
58
 #define MB(board) (MOTHERBOARD==BOARD_##board)
57
-#define IS_RAMPS (MB(RAMPS_OLD) || MB(RAMPS_13_EFB) || MB(RAMPS_13_EEB) || MB(RAMPS_13_EFF) || MB(RAMPS_13_EEF))
58
 
59
 
59
 #endif //__BOARDS_H
60
 #endif //__BOARDS_H

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

65
       createFilename(lfilename,p);
65
       createFilename(lfilename,p);
66
       
66
       
67
       path[0]=0;
67
       path[0]=0;
68
-      if(strlen(prepend)==0) //avoid leading / if already in prepend
68
+      if(prepend[0]==0) //avoid leading / if already in prepend
69
       {
69
       {
70
        strcat(path,"/");
70
        strcat(path,"/");
71
       }
71
       }

+ 5
- 5
Marlin/dogm_lcd_implementation.h 查看文件

315
 
315
 
316
 static void _drawmenu_setting_edit_generic(uint8_t row, const char* pstr, char pre_char, const char* data, bool pgm) {
316
 static void _drawmenu_setting_edit_generic(uint8_t row, const char* pstr, char pre_char, const char* data, bool pgm) {
317
   char c;
317
   char c;
318
-  uint8_t n = LCD_WIDTH - 2 - (pgm ? strlen_P(data) : (strlen(data)));
318
+  uint8_t n = LCD_WIDTH - 2 - (pgm ? lcd_strlen_P(data) : (lcd_strlen((char*)data)));
319
 
319
 
320
   lcd_implementation_mark_as_selected(row, pre_char);
320
   lcd_implementation_mark_as_selected(row, pre_char);
321
 
321
 
377
   uint8_t char_width = DOG_CHAR_WIDTH;
377
   uint8_t char_width = DOG_CHAR_WIDTH;
378
 
378
 
379
   #ifdef USE_BIG_EDIT_FONT
379
   #ifdef USE_BIG_EDIT_FONT
380
-    if (strlen_P(pstr) <= LCD_WIDTH_EDIT - 1) {
380
+    if (lcd_strlen_P(pstr) <= LCD_WIDTH_EDIT - 1) {
381
       u8g.setFont(FONT_MENU_EDIT);
381
       u8g.setFont(FONT_MENU_EDIT);
382
       lcd_width = LCD_WIDTH_EDIT + 1;
382
       lcd_width = LCD_WIDTH_EDIT + 1;
383
       char_width = DOG_CHAR_WIDTH_EDIT;
383
       char_width = DOG_CHAR_WIDTH_EDIT;
384
-      if (strlen_P(pstr) >= LCD_WIDTH_EDIT - strlen(value)) rows = 2;
384
+      if (lcd_strlen_P(pstr) >= LCD_WIDTH_EDIT - lcd_strlen(value)) rows = 2;
385
     }
385
     }
386
     else {
386
     else {
387
       u8g.setFont(FONT_MENU);
387
       u8g.setFont(FONT_MENU);
388
     }
388
     }
389
   #endif
389
   #endif
390
 
390
 
391
-  if (strlen_P(pstr) > LCD_WIDTH - 2 - strlen(value)) rows = 2;
391
+  if (lcd_strlen_P(pstr) > LCD_WIDTH - 2 - lcd_strlen(value)) rows = 2;
392
 
392
 
393
   const float kHalfChar = DOG_CHAR_HEIGHT_EDIT / 2;
393
   const float kHalfChar = DOG_CHAR_HEIGHT_EDIT / 2;
394
   float rowHeight = u8g.getHeight() / (rows + 1); // 1/(rows+1) = 1/2 or 1/3
394
   float rowHeight = u8g.getHeight() / (rows + 1); // 1/(rows+1) = 1/2 or 1/3
396
   u8g.setPrintPos(0, rowHeight + kHalfChar);
396
   u8g.setPrintPos(0, rowHeight + kHalfChar);
397
   lcd_printPGM(pstr);
397
   lcd_printPGM(pstr);
398
   u8g.print(':');
398
   u8g.print(':');
399
-  u8g.setPrintPos((lcd_width-1-strlen(value)) * char_width, rows * rowHeight + kHalfChar);
399
+  u8g.setPrintPos((lcd_width-1-lcd_strlen(value)) * char_width, rows * rowHeight + kHalfChar);
400
   u8g.print(value);
400
   u8g.print(value);
401
 }
401
 }
402
 
402
 

+ 5
- 0
Marlin/example_configurations/Hephestos/Configuration_adv.h 查看文件

284
 //=============================Additional Features===========================
284
 //=============================Additional Features===========================
285
 //===========================================================================
285
 //===========================================================================
286
 
286
 
287
+#define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
288
+#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value
289
+#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value
290
+//#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
291
+
287
 //#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/
292
 //#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/
288
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
293
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
289
 
294
 

+ 5
- 0
Marlin/example_configurations/K8200/Configuration_adv.h 查看文件

284
 //=============================Additional Features===========================
284
 //=============================Additional Features===========================
285
 //===========================================================================
285
 //===========================================================================
286
 
286
 
287
+#define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
288
+#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value
289
+#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value
290
+//#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
291
+
287
 //#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/
292
 //#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/
288
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
293
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
289
 
294
 

+ 5
- 0
Marlin/example_configurations/SCARA/Configuration_adv.h 查看文件

287
 //=============================Additional Features===========================
287
 //=============================Additional Features===========================
288
 //===========================================================================
288
 //===========================================================================
289
 
289
 
290
+#define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
291
+#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value
292
+#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value
293
+//#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
294
+
290
 //#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/
295
 //#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/
291
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
296
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
292
 
297
 

+ 5
- 0
Marlin/example_configurations/WITBOX/Configuration_adv.h 查看文件

284
 //=============================Additional Features===========================
284
 //=============================Additional Features===========================
285
 //===========================================================================
285
 //===========================================================================
286
 
286
 
287
+#define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
288
+#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value
289
+#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value
290
+//#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
291
+
287
 //#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/
292
 //#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/
288
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
293
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
289
 
294
 

+ 5
- 0
Marlin/example_configurations/delta/Configuration_adv.h 查看文件

279
 //=============================Additional Features===========================
279
 //=============================Additional Features===========================
280
 //===========================================================================
280
 //===========================================================================
281
 
281
 
282
+#define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
283
+#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value
284
+#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value
285
+//#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
286
+
282
 //#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/
287
 //#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/
283
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
288
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
284
 
289
 

+ 5
- 0
Marlin/example_configurations/makibox/Configuration_adv.h 查看文件

283
 //=============================Additional Features===========================
283
 //=============================Additional Features===========================
284
 //===========================================================================
284
 //===========================================================================
285
 
285
 
286
+#define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
287
+#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value
288
+#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value
289
+//#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
290
+
286
 //#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/
291
 //#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/
287
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
292
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
288
 
293
 

+ 5
- 0
Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h 查看文件

284
 //=============================Additional Features===========================
284
 //=============================Additional Features===========================
285
 //===========================================================================
285
 //===========================================================================
286
 
286
 
287
+#define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
288
+#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value
289
+#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value
290
+//#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
291
+
287
 //#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/
292
 //#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/
288
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
293
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
289
 
294
 

+ 15
- 15
Marlin/language_ru.h 查看文件

13
 #define WELCOME_MSG                         MACHINE_NAME " Готов."
13
 #define WELCOME_MSG                         MACHINE_NAME " Готов."
14
 #define MSG_SD_INSERTED                     "Карта вставлена"
14
 #define MSG_SD_INSERTED                     "Карта вставлена"
15
 #define MSG_SD_REMOVED                      "Карта извлечена"
15
 #define MSG_SD_REMOVED                      "Карта извлечена"
16
-#define MSG_MAIN                            "Меню \003"
16
+#define MSG_MAIN                            "Меню"
17
 #define MSG_AUTOSTART                       "Автостарт"
17
 #define MSG_AUTOSTART                       "Автостарт"
18
 #define MSG_DISABLE_STEPPERS                "Выкл. двигатели"
18
 #define MSG_DISABLE_STEPPERS                "Выкл. двигатели"
19
 #define MSG_AUTO_HOME                       "Парковка"
19
 #define MSG_AUTO_HOME                       "Парковка"
43
 #define MSG_MOVE_1MM                        "Move 1mm"
43
 #define MSG_MOVE_1MM                        "Move 1mm"
44
 #define MSG_MOVE_10MM                       "Move 10mm"
44
 #define MSG_MOVE_10MM                       "Move 10mm"
45
 #define MSG_SPEED                           "Скорость"
45
 #define MSG_SPEED                           "Скорость"
46
-#define MSG_NOZZLE                          "\002 Фильера"
47
-#define MSG_BED                             "\002 Кровать"
46
+#define MSG_NOZZLE                          LCD_STR_THERMOMETER " Фильера"
47
+#define MSG_BED                             LCD_STR_THERMOMETER " Кровать"
48
 #define MSG_FAN_SPEED                       "Куллер"
48
 #define MSG_FAN_SPEED                       "Куллер"
49
 #define MSG_FLOW                            "Поток"
49
 #define MSG_FLOW                            "Поток"
50
-#define MSG_CONTROL                         "Настройки \003"
51
-#define MSG_MIN                             "\002 Минимум"
52
-#define MSG_MAX                             "\002 Максимум"
53
-#define MSG_FACTOR                          "\002 Фактор"
50
+#define MSG_CONTROL                         "Настройки"
51
+#define MSG_MIN                             LCD_STR_THERMOMETER " Минимум"
52
+#define MSG_MAX                             LCD_STR_THERMOMETER " Максимум"
53
+#define MSG_FACTOR                          LCD_STR_THERMOMETER " Фактор"
54
 #define MSG_AUTOTEMP                        "Autotemp"
54
 #define MSG_AUTOTEMP                        "Autotemp"
55
 #define MSG_ON                              "Вкл. "
55
 #define MSG_ON                              "Вкл. "
56
 #define MSG_OFF                             "Выкл. "
56
 #define MSG_OFF                             "Выкл. "
75
 #define MSG_YSTEPS                          "Y шаг/mm"
75
 #define MSG_YSTEPS                          "Y шаг/mm"
76
 #define MSG_ZSTEPS                          "Z шаг/mm"
76
 #define MSG_ZSTEPS                          "Z шаг/mm"
77
 #define MSG_ESTEPS                          "E шаг/mm"
77
 #define MSG_ESTEPS                          "E шаг/mm"
78
-#define MSG_TEMPERATURE                     "Температура     \x7E"
79
-#define MSG_MOTION                          "Скорости        \x7E"
78
+#define MSG_TEMPERATURE                     "Температура"
79
+#define MSG_MOTION                          "Скорости"
80
 #define MSG_VOLUMETRIC                      "Filament"
80
 #define MSG_VOLUMETRIC                      "Filament"
81
-#define MSG_VOLUMETRIC_ENABLED		        "E in mm3"
81
+#define MSG_VOLUMETRIC_ENABLED		          "E in mm3"
82
 #define MSG_FILAMENT_SIZE_EXTRUDER_0        "Fil. Dia. 1"
82
 #define MSG_FILAMENT_SIZE_EXTRUDER_0        "Fil. Dia. 1"
83
 #define MSG_FILAMENT_SIZE_EXTRUDER_1        "Fil. Dia. 2"
83
 #define MSG_FILAMENT_SIZE_EXTRUDER_1        "Fil. Dia. 2"
84
 #define MSG_FILAMENT_SIZE_EXTRUDER_2        "Fil. Dia. 3"
84
 #define MSG_FILAMENT_SIZE_EXTRUDER_2        "Fil. Dia. 3"
86
 #define MSG_STORE_EPROM                     "Сохранить в EPROM"
86
 #define MSG_STORE_EPROM                     "Сохранить в EPROM"
87
 #define MSG_LOAD_EPROM                      "Загруз. из EPROM"
87
 #define MSG_LOAD_EPROM                      "Загруз. из EPROM"
88
 #define MSG_RESTORE_FAILSAFE                "Сброс настроек"
88
 #define MSG_RESTORE_FAILSAFE                "Сброс настроек"
89
-#define MSG_REFRESH                         "\004Обновить"
90
-#define MSG_WATCH                           "Обзор           \003"
91
-#define MSG_PREPARE                         "Действия        \x7E"
92
-#define MSG_TUNE                            "Настройки       \x7E"
89
+#define MSG_REFRESH                         LCD_STR_REFRESH "Обновить"
90
+#define MSG_WATCH                           "Обзор"
91
+#define MSG_PREPARE                         "Действия"
92
+#define MSG_TUNE                            "Настройки"
93
 #define MSG_PAUSE_PRINT                     "Продолжить печать"
93
 #define MSG_PAUSE_PRINT                     "Продолжить печать"
94
 #define MSG_RESUME_PRINT                    "возобн. печать"
94
 #define MSG_RESUME_PRINT                    "возобн. печать"
95
 #define MSG_STOP_PRINT                      "Остановить печать"
95
 #define MSG_STOP_PRINT                      "Остановить печать"
96
-#define MSG_CARD_MENU                       "Меню карты      \x7E"
96
+#define MSG_CARD_MENU                       "Меню карты"
97
 #define MSG_NO_CARD                         "Нет карты"
97
 #define MSG_NO_CARD                         "Нет карты"
98
 #define MSG_DWELL                           "Сон..."
98
 #define MSG_DWELL                           "Сон..."
99
 #define MSG_USERWAIT                        "Ожиданиие"
99
 #define MSG_USERWAIT                        "Ожиданиие"

+ 5
- 1
Marlin/pins.h 查看文件

36
   #include "pins_SETHI.h"
36
   #include "pins_SETHI.h"
37
 #elif MB(RAMPS_OLD)
37
 #elif MB(RAMPS_OLD)
38
   #include "pins_RAMPS_OLD.h"
38
   #include "pins_RAMPS_OLD.h"
39
-#elif IS_RAMPS
39
+#elif MB(RAMPS_13_EFB) || MB(RAMPS_13_EEB) || MB(RAMPS_13_EFF) || MB(RAMPS_13_EEF)
40
   #include "pins_RAMPS_13.h"
40
   #include "pins_RAMPS_13.h"
41
 #elif MB(DUEMILANOVE_328P)
41
 #elif MB(DUEMILANOVE_328P)
42
   #include "pins_DUEMILANOVE_328P.h"
42
   #include "pins_DUEMILANOVE_328P.h"
110
   #include "pins_WITBOX.h"
110
   #include "pins_WITBOX.h"
111
 #elif MB(HEPHESTOS)
111
 #elif MB(HEPHESTOS)
112
   #include "pins_HEPHESTOS.h"
112
   #include "pins_HEPHESTOS.h"
113
+#elif MB(BAM_DICE)
114
+  #include "pins_RAMPS_13.h"
115
+#elif MB(BAM_DICE_DUE)
116
+  #include "pins_BAM_DICE_DUE.h"
113
 #elif MB(99)
117
 #elif MB(99)
114
   #include "pins_99.h"
118
   #include "pins_99.h"
115
 #else
119
 #else

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

3
  */
3
  */
4
 
4
 
5
 #include "pins_RAMPS_13.h"
5
 #include "pins_RAMPS_13.h"
6
+
7
+#define FAN_PIN            9 // (Sprinter config)
8
+#define HEATER_1_PIN       -1
9
+
10
+#ifdef TEMP_STAT_LEDS
11
+  #define STAT_LED_RED       6
12
+  #define STAT_LED_BLUE     11
13
+#endif

+ 9
- 5
Marlin/pins_AZTEEG_X3_PRO.h 查看文件

4
 
4
 
5
 #include "pins_RAMPS_13.h"
5
 #include "pins_RAMPS_13.h"
6
 
6
 
7
+#define FAN_PIN             9 // (Sprinter config)
8
+#define BEEPER             33
9
+
7
 #define E2_STEP_PIN        23
10
 #define E2_STEP_PIN        23
8
 #define E2_DIR_PIN         25
11
 #define E2_DIR_PIN         25
9
 #define E2_ENABLE_PIN      40
12
 #define E2_ENABLE_PIN      40
16
 #define E4_DIR_PIN         37
19
 #define E4_DIR_PIN         37
17
 #define E4_ENABLE_PIN      42
20
 #define E4_ENABLE_PIN      42
18
 
21
 
22
+#define HEATER_1_PIN       -1
19
 #define HEATER_2_PIN       16
23
 #define HEATER_2_PIN       16
20
 #define HEATER_3_PIN       17
24
 #define HEATER_3_PIN       17
21
-#define HEATER_4_PIN       4
22
-#define HEATER_5_PIN       5
23
-#define HEATER_6_PIN       6
25
+#define HEATER_4_PIN        4
26
+#define HEATER_5_PIN        5
27
+#define HEATER_6_PIN        6
24
 #define HEATER_7_PIN       11
28
 #define HEATER_7_PIN       11
25
 
29
 
26
 #define TEMP_2_PIN         12   // ANALOG NUMBERING
30
 #define TEMP_2_PIN         12   // ANALOG NUMBERING
27
 #define TEMP_3_PIN         11   // ANALOG NUMBERING
31
 #define TEMP_3_PIN         11   // ANALOG NUMBERING
28
 #define TEMP_4_PIN         10   // ANALOG NUMBERING
32
 #define TEMP_4_PIN         10   // ANALOG NUMBERING
29
-#define TC1                4    // ANALOG NUMBERING Thermo couple on Azteeg X3Pro
30
-#define TC2                5    // ANALOG NUMBERING Thermo couple on Azteeg X3Pro
33
+#define TC1                 4   // ANALOG NUMBERING Thermo couple on Azteeg X3Pro
34
+#define TC2                 5   // ANALOG NUMBERING Thermo couple on Azteeg X3Pro

+ 11
- 0
Marlin/pins_BAM_DICE_DUE.h 查看文件

1
+/**
2
+ * BAM&DICE Due (Arduino Mega) pin assignments
3
+ */
4
+
5
+#include "pins_RAMPS_13.h"
6
+
7
+#define FAN_PIN             9 // (Sprinter config)
8
+#define HEATER_1_PIN       -1
9
+
10
+#define TEMP_0_PIN          9 // ANALOG NUMBERING
11
+#define TEMP_1_PIN         11 // ANALOG NUMBERING

+ 3
- 0
Marlin/pins_HEPHESTOS.h 查看文件

3
  */
3
  */
4
 
4
 
5
 #include "pins_RAMPS_13.h"
5
 #include "pins_RAMPS_13.h"
6
+
7
+#define FAN_PIN             9 // (Sprinter config)
8
+#define HEATER_1_PIN       -1

+ 11
- 27
Marlin/pins_RAMPS_13.h 查看文件

7
  *  RAMPS_13_EEB (Extruder, Extruder, Bed)
7
  *  RAMPS_13_EEB (Extruder, Extruder, Bed)
8
  *  RAMPS_13_EFF (Extruder, Fan, Fan)
8
  *  RAMPS_13_EFF (Extruder, Fan, Fan)
9
  *  RAMPS_13_EEF (Extruder, Extruder, Fan)
9
  *  RAMPS_13_EEF (Extruder, Extruder, Fan)
10
- *  3DRAG
11
- *  K8200
12
- *  AZTEEG_X3
13
- *  AZTEEG_X3_PRO
10
+ *
11
+ *  Other pins_MYBOARD.h files may override these defaults
14
  */
12
  */
15
 
13
 
16
 #if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
14
 #if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
63
   #define FILWIDTH_PIN        5
61
   #define FILWIDTH_PIN        5
64
 #endif
62
 #endif
65
 
63
 
66
-#if MB(RAMPS_13_EFB) || MB(RAMPS_13_EFF) || MB(AZTEEG_X3) || MB(AZTEEG_X3_PRO) || MB(WITBOX) || MB(HEPHESTOS)
64
+#if MB(RAMPS_13_EFB) || MB(RAMPS_13_EFF)
67
   #define FAN_PIN            9 // (Sprinter config)
65
   #define FAN_PIN            9 // (Sprinter config)
68
   #if MB(RAMPS_13_EFF)
66
   #if MB(RAMPS_13_EFF)
69
     #define CONTROLLERFAN_PIN  -1 // Pin used for the fan to cool controller
67
     #define CONTROLLERFAN_PIN  -1 // Pin used for the fan to cool controller
88
   #define HEATER_0_PIN       10   // EXTRUDER 1
86
   #define HEATER_0_PIN       10   // EXTRUDER 1
89
 #endif
87
 #endif
90
 
88
 
91
-#if MB(RAMPS_13_EFB) || MB(AZTEEG_X3) || MB(WITBOX) || MB(HEPHESTOS)
89
+#if MB(RAMPS_13_EFB)
92
   #define HEATER_1_PIN       -1
90
   #define HEATER_1_PIN       -1
93
 #else
91
 #else
94
   #define HEATER_1_PIN       9    // EXTRUDER 2 (FAN On Sprinter)
92
   #define HEATER_1_PIN       9    // EXTRUDER 2 (FAN On Sprinter)
110
 
108
 
111
 #ifdef NUM_SERVOS
109
 #ifdef NUM_SERVOS
112
   #define SERVO0_PIN         11
110
   #define SERVO0_PIN         11
113
-
114
   #if NUM_SERVOS > 1
111
   #if NUM_SERVOS > 1
115
-    #define SERVO1_PIN         6
116
-  #endif
117
-
118
-  #if NUM_SERVOS > 2
119
-    #define SERVO2_PIN         5
120
-  #endif
121
-
122
-  #if NUM_SERVOS > 3
123
-    #define SERVO3_PIN         4
124
-  #endif
125
-#endif
126
-
127
-#if MB(AZTEEG_X3_PRO)
128
-  #define BEEPER 33
129
-#endif
130
-
131
-#ifdef TEMP_STAT_LEDS
132
-  #if MB(AZTEEG_X3)
133
-    #define STAT_LED_RED       6
134
-    #define STAT_LED_BLUE     11
112
+    #define SERVO1_PIN        6
113
+    #if NUM_SERVOS > 2
114
+      #define SERVO2_PIN      5
115
+      #if NUM_SERVOS > 3
116
+        #define SERVO3_PIN    4
117
+      #endif
118
+    #endif
135
   #endif
119
   #endif
136
 #endif
120
 #endif
137
 
121
 

+ 3
- 0
Marlin/pins_WITBOX.h 查看文件

3
  */
3
  */
4
 
4
 
5
 #include "pins_RAMPS_13.h"
5
 #include "pins_RAMPS_13.h"
6
+
7
+#define FAN_PIN             9 // (Sprinter config)
8
+#define HEATER_1_PIN       -1

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

455
     setExtruderAutoFanState(EXTRUDER_0_AUTO_FAN_PIN, (fanState & 1) != 0);
455
     setExtruderAutoFanState(EXTRUDER_0_AUTO_FAN_PIN, (fanState & 1) != 0);
456
   #endif 
456
   #endif 
457
   #if defined(EXTRUDER_1_AUTO_FAN_PIN) && EXTRUDER_1_AUTO_FAN_PIN > -1
457
   #if defined(EXTRUDER_1_AUTO_FAN_PIN) && EXTRUDER_1_AUTO_FAN_PIN > -1
458
-    if (EXTRUDER_1_AUTO_FAN_PIN != EXTRUDER_0_AUTO_FAN_PIN) 
458
+    if (EXTRUDER_1_AUTO_FAN_PIN != EXTRUDER_0_AUTO_FAN_PIN)
459
       setExtruderAutoFanState(EXTRUDER_1_AUTO_FAN_PIN, (fanState & 2) != 0);
459
       setExtruderAutoFanState(EXTRUDER_1_AUTO_FAN_PIN, (fanState & 2) != 0);
460
   #endif 
460
   #endif 
461
   #if defined(EXTRUDER_2_AUTO_FAN_PIN) && EXTRUDER_2_AUTO_FAN_PIN > -1
461
   #if defined(EXTRUDER_2_AUTO_FAN_PIN) && EXTRUDER_2_AUTO_FAN_PIN > -1
462
-    if (EXTRUDER_2_AUTO_FAN_PIN != EXTRUDER_0_AUTO_FAN_PIN 
463
-        && EXTRUDER_2_AUTO_FAN_PIN != EXTRUDER_0_AUTO_FAN_PIN)
462
+    if (EXTRUDER_2_AUTO_FAN_PIN != EXTRUDER_0_AUTO_FAN_PIN
464
         && EXTRUDER_2_AUTO_FAN_PIN != EXTRUDER_1_AUTO_FAN_PIN)
463
         && EXTRUDER_2_AUTO_FAN_PIN != EXTRUDER_1_AUTO_FAN_PIN)
465
       setExtruderAutoFanState(EXTRUDER_2_AUTO_FAN_PIN, (fanState & 4) != 0);
464
       setExtruderAutoFanState(EXTRUDER_2_AUTO_FAN_PIN, (fanState & 4) != 0);
466
   #endif
465
   #endif
467
   #if defined(EXTRUDER_3_AUTO_FAN_PIN) && EXTRUDER_3_AUTO_FAN_PIN > -1
466
   #if defined(EXTRUDER_3_AUTO_FAN_PIN) && EXTRUDER_3_AUTO_FAN_PIN > -1
468
-    if (EXTRUDER_3_AUTO_FAN_PIN != EXTRUDER_0_AUTO_FAN_PIN 
469
-        && EXTRUDER_3_AUTO_FAN_PIN != EXTRUDER_0_AUTO_FAN_PIN)
470
-        && EXTRUDER_3_AUTO_FAN_PIN != EXTRUDER_1_AUTO_FAN_PIN)
467
+    if (EXTRUDER_3_AUTO_FAN_PIN != EXTRUDER_0_AUTO_FAN_PIN
468
+        && EXTRUDER_3_AUTO_FAN_PIN != EXTRUDER_1_AUTO_FAN_PIN
471
         && EXTRUDER_3_AUTO_FAN_PIN != EXTRUDER_2_AUTO_FAN_PIN)
469
         && EXTRUDER_3_AUTO_FAN_PIN != EXTRUDER_2_AUTO_FAN_PIN)
472
       setExtruderAutoFanState(EXTRUDER_3_AUTO_FAN_PIN, (fanState & 8) != 0);
470
       setExtruderAutoFanState(EXTRUDER_3_AUTO_FAN_PIN, (fanState & 8) != 0);
473
   #endif
471
   #endif

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

1095
 };
1095
 };
1096
 #endif
1096
 #endif
1097
 
1097
 
1098
+#if (THERMISTORHEATER_0 == 999) || (THERMISTORHEATER_1 == 999) || (THERMISTORHEATER_2 == 999) || (THERMISTORHEATER_3 == 999) || (THERMISTORBED == 999) //User defined table
1099
+// Dummy Thermistor table.. It will ALWAYS read 25C.
1100
+const short temptable_999[][2] PROGMEM = {
1101
+   {1*OVERSAMPLENR, 25},
1102
+   {1023*OVERSAMPLENR, 25}
1103
+};
1104
+#endif
1105
+
1106
+
1107
+
1098
 #define _TT_NAME(_N) temptable_ ## _N
1108
 #define _TT_NAME(_N) temptable_ ## _N
1099
 #define TT_NAME(_N) _TT_NAME(_N)
1109
 #define TT_NAME(_N) _TT_NAME(_N)
1100
 
1110
 

+ 218
- 108
Marlin/ultralcd.cpp 查看文件

10
 
10
 
11
 int8_t encoderDiff; /* encoderDiff is updated from interrupt context and added to encoderPosition every LCD update */
11
 int8_t encoderDiff; /* encoderDiff is updated from interrupt context and added to encoderPosition every LCD update */
12
 
12
 
13
+bool encoderRateMultiplierEnabled;
14
+int32_t lastEncoderMovementMillis;
15
+
13
 /* Configuration settings */
16
 /* Configuration settings */
14
 int plaPreheatHotendTemp;
17
 int plaPreheatHotendTemp;
15
 int plaPreheatHPBTemp;
18
 int plaPreheatHPBTemp;
41
 #include "ultralcd_implementation_hitachi_HD44780.h"
44
 #include "ultralcd_implementation_hitachi_HD44780.h"
42
 #endif
45
 #endif
43
 
46
 
44
-/** forward declarations **/
45
-
46
-void copy_and_scalePID_i();
47
-void copy_and_scalePID_d();
48
-
49
 /* Different menus */
47
 /* Different menus */
50
 static void lcd_status_screen();
48
 static void lcd_status_screen();
51
 #ifdef ULTIPANEL
49
 #ifdef ULTIPANEL
119
 
117
 
120
 /* Helper macros for menus */
118
 /* Helper macros for menus */
121
 #define START_MENU() do { \
119
 #define START_MENU() do { \
120
+	encoderRateMultiplierEnabled = false; \
122
     if (encoderPosition > 0x8000) encoderPosition = 0; \
121
     if (encoderPosition > 0x8000) encoderPosition = 0; \
123
     if (encoderPosition / ENCODER_STEPS_PER_MENU_ITEM < currentMenuViewOffset) currentMenuViewOffset = encoderPosition / ENCODER_STEPS_PER_MENU_ITEM;\
122
     if (encoderPosition / ENCODER_STEPS_PER_MENU_ITEM < currentMenuViewOffset) currentMenuViewOffset = encoderPosition / ENCODER_STEPS_PER_MENU_ITEM;\
124
     uint8_t _lineNr = currentMenuViewOffset, _menuItemNr; \
123
     uint8_t _lineNr = currentMenuViewOffset, _menuItemNr; \
143
     }\
142
     }\
144
     _menuItemNr++;\
143
     _menuItemNr++;\
145
 } while(0)
144
 } while(0)
145
+#ifdef ENCODER_RATE_MULTIPLIER
146
+  #define MENU_MULTIPLIER_ITEM(type, label, args...) do { \
147
+    if (_menuItemNr == _lineNr) { \
148
+      if (lcdDrawUpdate) { \
149
+        const char* _label_pstr = PSTR(label); \
150
+        if ((encoderPosition / ENCODER_STEPS_PER_MENU_ITEM) == _menuItemNr) { \
151
+          lcd_implementation_drawmenu_ ## type ## _selected (_drawLineNr, _label_pstr , ## args ); \
152
+        } \
153
+        else { \
154
+          lcd_implementation_drawmenu_ ## type (_drawLineNr, _label_pstr , ## args ); \
155
+        } \
156
+      } \
157
+      if (wasClicked && (encoderPosition / ENCODER_STEPS_PER_MENU_ITEM) == _menuItemNr) { \
158
+        lcd_quick_feedback(); \
159
+        encoderRateMultiplierEnabled = true; \
160
+        lastEncoderMovementMillis = 0; \
161
+        menu_action_ ## type ( args ); \
162
+        return; \
163
+      } \
164
+    } \
165
+    _menuItemNr++; \
166
+  } while(0)
167
+#endif //ENCODER_RATE_MULTIPLIER
146
 #define MENU_ITEM_DUMMY() do { _menuItemNr++; } while(0)
168
 #define MENU_ITEM_DUMMY() do { _menuItemNr++; } while(0)
147
 #define MENU_ITEM_EDIT(type, label, args...) MENU_ITEM(setting_edit_ ## type, label, PSTR(label) , ## args )
169
 #define MENU_ITEM_EDIT(type, label, args...) MENU_ITEM(setting_edit_ ## type, label, PSTR(label) , ## args )
148
 #define MENU_ITEM_EDIT_CALLBACK(type, label, args...) MENU_ITEM(setting_edit_callback_ ## type, label, PSTR(label) , ## args )
170
 #define MENU_ITEM_EDIT_CALLBACK(type, label, args...) MENU_ITEM(setting_edit_callback_ ## type, label, PSTR(label) , ## args )
171
+#ifdef ENCODER_RATE_MULTIPLIER
172
+  #define MENU_MULTIPLIER_ITEM_EDIT(type, label, args...) MENU_MULTIPLIER_ITEM(setting_edit_ ## type, label, PSTR(label) , ## args )
173
+  #define MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(type, label, args...) MENU_MULTIPLIER_ITEM(setting_edit_callback_ ## type, label, PSTR(label) , ## args )
174
+#else //!ENCODER_RATE_MULTIPLIER
175
+  #define MENU_MULTIPLIER_ITEM_EDIT(type, label, args...) MENU_ITEM(setting_edit_ ## type, label, PSTR(label) , ## args )
176
+  #define MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(type, label, args...) MENU_ITEM(setting_edit_callback_ ## type, label, PSTR(label) , ## args )
177
+#endif //!ENCODER_RATE_MULTIPLIER
149
 #define END_MENU() \
178
 #define END_MENU() \
150
     if (encoderPosition / ENCODER_STEPS_PER_MENU_ITEM >= _menuItemNr) encoderPosition = _menuItemNr * ENCODER_STEPS_PER_MENU_ITEM - 1; \
179
     if (encoderPosition / ENCODER_STEPS_PER_MENU_ITEM >= _menuItemNr) encoderPosition = _menuItemNr * ENCODER_STEPS_PER_MENU_ITEM - 1; \
151
     if ((uint8_t)(encoderPosition / ENCODER_STEPS_PER_MENU_ITEM) >= currentMenuViewOffset + LCD_HEIGHT) { currentMenuViewOffset = (encoderPosition / ENCODER_STEPS_PER_MENU_ITEM) - LCD_HEIGHT + 1; lcdDrawUpdate = 1; _lineNr = currentMenuViewOffset - 1; _drawLineNr = -1; } \
180
     if ((uint8_t)(encoderPosition / ENCODER_STEPS_PER_MENU_ITEM) >= currentMenuViewOffset + LCD_HEIGHT) { currentMenuViewOffset = (encoderPosition / ENCODER_STEPS_PER_MENU_ITEM) - LCD_HEIGHT + 1; lcdDrawUpdate = 1; _lineNr = currentMenuViewOffset - 1; _drawLineNr = -1; } \
185
 int32_t minEditValue, maxEditValue;
214
 int32_t minEditValue, maxEditValue;
186
 menuFunc_t callbackFunc;
215
 menuFunc_t callbackFunc;
187
 
216
 
188
-// place-holders for Ki and Kd edits, and the extruder # being edited
217
+// place-holders for Ki and Kd edits
189
 float raw_Ki, raw_Kd;
218
 float raw_Ki, raw_Kd;
190
-int pid_current_extruder;
191
 
219
 
192
 static void lcd_goto_menu(menuFunc_t menu, const uint32_t encoder=0, const bool feedback=true) {
220
 static void lcd_goto_menu(menuFunc_t menu, const uint32_t encoder=0, const bool feedback=true) {
193
   if (currentMenu != menu) {
221
   if (currentMenu != menu) {
205
 /* Main status screen. It's up to the implementation specific part to show what is needed. As this is very display dependent */
233
 /* Main status screen. It's up to the implementation specific part to show what is needed. As this is very display dependent */
206
 static void lcd_status_screen()
234
 static void lcd_status_screen()
207
 {
235
 {
236
+	encoderRateMultiplierEnabled = false;
208
   #if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT) && !defined(DOGLCD)
237
   #if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT) && !defined(DOGLCD)
209
     uint16_t mil = millis();
238
     uint16_t mil = millis();
210
     #ifndef PROGRESS_MSG_ONCE
239
     #ifndef PROGRESS_MSG_ONCE
423
     MENU_ITEM(back, MSG_MAIN, lcd_main_menu);
452
     MENU_ITEM(back, MSG_MAIN, lcd_main_menu);
424
     MENU_ITEM_EDIT(int3, MSG_SPEED, &feedmultiply, 10, 999);
453
     MENU_ITEM_EDIT(int3, MSG_SPEED, &feedmultiply, 10, 999);
425
 #if TEMP_SENSOR_0 != 0
454
 #if TEMP_SENSOR_0 != 0
426
-    MENU_ITEM_EDIT(int3, MSG_NOZZLE, &target_temperature[0], 0, HEATER_0_MAXTEMP - 15);
455
+    MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_NOZZLE, &target_temperature[0], 0, HEATER_0_MAXTEMP - 15);
427
 #endif
456
 #endif
428
 #if TEMP_SENSOR_1 != 0
457
 #if TEMP_SENSOR_1 != 0
429
-    MENU_ITEM_EDIT(int3, MSG_NOZZLE " 2", &target_temperature[1], 0, HEATER_1_MAXTEMP - 15);
458
+    MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_NOZZLE " 2", &target_temperature[1], 0, HEATER_1_MAXTEMP - 15);
430
 #endif
459
 #endif
431
 #if TEMP_SENSOR_2 != 0
460
 #if TEMP_SENSOR_2 != 0
432
-    MENU_ITEM_EDIT(int3, MSG_NOZZLE " 3", &target_temperature[2], 0, HEATER_2_MAXTEMP - 15);
461
+    MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_NOZZLE " 3", &target_temperature[2], 0, HEATER_2_MAXTEMP - 15);
433
 #endif
462
 #endif
434
 #if TEMP_SENSOR_3 != 0
463
 #if TEMP_SENSOR_3 != 0
435
-    MENU_ITEM_EDIT(int3, MSG_NOZZLE " 4", &target_temperature[3], 0, HEATER_3_MAXTEMP - 15);
464
+    MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_NOZZLE " 4", &target_temperature[3], 0, HEATER_3_MAXTEMP - 15);
436
 #endif
465
 #endif
437
 
466
 
438
 
467
 
439
 #if TEMP_SENSOR_BED != 0
468
 #if TEMP_SENSOR_BED != 0
440
-    MENU_ITEM_EDIT(int3, MSG_BED, &target_temperature_bed, 0, BED_MAXTEMP - 15);
469
+    MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_BED, &target_temperature_bed, 0, BED_MAXTEMP - 15);
441
 #endif
470
 #endif
442
-    MENU_ITEM_EDIT(int3, MSG_FAN_SPEED, &fanSpeed, 0, 255);
471
+    MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_FAN_SPEED, &fanSpeed, 0, 255);
443
     MENU_ITEM_EDIT(int3, MSG_FLOW, &extrudemultiply, 10, 999);
472
     MENU_ITEM_EDIT(int3, MSG_FLOW, &extrudemultiply, 10, 999);
444
     MENU_ITEM_EDIT(int3, MSG_FLOW " 0", &extruder_multiply[0], 10, 999);
473
     MENU_ITEM_EDIT(int3, MSG_FLOW " 0", &extruder_multiply[0], 10, 999);
445
 #if TEMP_SENSOR_1 != 0
474
 #if TEMP_SENSOR_1 != 0
616
   MENU_ITEM(back, MSG_PREPARE, lcd_prepare_menu);
645
   MENU_ITEM(back, MSG_PREPARE, lcd_prepare_menu);
617
   MENU_ITEM(function, MSG_PREHEAT_ABS_N "1", lcd_preheat_abs0);
646
   MENU_ITEM(function, MSG_PREHEAT_ABS_N "1", lcd_preheat_abs0);
618
 #if TEMP_SENSOR_1 != 0 //2 extruder preheat
647
 #if TEMP_SENSOR_1 != 0 //2 extruder preheat
619
-	MENU_ITEM(function, MSG_PREHEAT_ABS_N "2", lcd_preheat_abs1);
648
+    MENU_ITEM(function, MSG_PREHEAT_ABS_N "2", lcd_preheat_abs1);
620
 #endif //2 extruder preheat
649
 #endif //2 extruder preheat
621
 #if TEMP_SENSOR_2 != 0 //3 extruder preheat
650
 #if TEMP_SENSOR_2 != 0 //3 extruder preheat
622
   MENU_ITEM(function, MSG_PREHEAT_ABS_N "3", lcd_preheat_abs2);
651
   MENU_ITEM(function, MSG_PREHEAT_ABS_N "3", lcd_preheat_abs2);
811
     END_MENU();
840
     END_MENU();
812
 }
841
 }
813
 
842
 
843
+#ifdef PIDTEMP
844
+
845
+  // Helpers for editing PID Ki & Kd values
846
+  // grab the PID value out of the temp variable; scale it; then update the PID driver
847
+  void copy_and_scalePID_i(int e) {
848
+    PID_PARAM(Ki, e) = scalePID_i(raw_Ki);
849
+    updatePID();
850
+  }
851
+  void copy_and_scalePID_d(int e) {
852
+    PID_PARAM(Kd, e) = scalePID_d(raw_Kd);
853
+    updatePID();
854
+  }
855
+  void copy_and_scalePID_i_E1() { copy_and_scalePID_i(0); }
856
+  void copy_and_scalePID_d_E1() { copy_and_scalePID_d(0); }
857
+  #ifdef PID_PARAMS_PER_EXTRUDER
858
+    #if EXTRUDERS > 1
859
+      void copy_and_scalePID_i_E2() { copy_and_scalePID_i(1); }
860
+      void copy_and_scalePID_d_E2() { copy_and_scalePID_d(1); }
861
+      #if EXTRUDERS > 2
862
+        void copy_and_scalePID_i_E3() { copy_and_scalePID_i(2); }
863
+        void copy_and_scalePID_d_E3() { copy_and_scalePID_d(2); }
864
+        #if EXTRUDERS > 3
865
+          void copy_and_scalePID_i_E4() { copy_and_scalePID_i(3); }
866
+          void copy_and_scalePID_d_E4() { copy_and_scalePID_d(3); }
867
+        #endif //EXTRUDERS > 3
868
+      #endif //EXTRUDERS > 2
869
+    #endif //EXTRUDERS > 1
870
+  #endif //PID_PARAMS_PER_EXTRUDER
871
+
872
+#endif //PIDTEMP
873
+
814
 static void lcd_control_temperature_menu()
874
 static void lcd_control_temperature_menu()
815
 {
875
 {
816
   START_MENU();
876
   START_MENU();
817
   MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
877
   MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
818
-#if TEMP_SENSOR_0 != 0
819
-  MENU_ITEM_EDIT(int3, MSG_NOZZLE, &target_temperature[0], 0, HEATER_0_MAXTEMP - 15);
820
-#endif
821
-#if TEMP_SENSOR_1 != 0 && EXTRUDERS > 1
822
-  MENU_ITEM_EDIT(int3, MSG_NOZZLE " 2", &target_temperature[1], 0, HEATER_1_MAXTEMP - 15);
823
-#endif
824
-#if TEMP_SENSOR_2 != 0 && EXTRUDERS > 2
825
-  MENU_ITEM_EDIT(int3, MSG_NOZZLE " 3", &target_temperature[2], 0, HEATER_2_MAXTEMP - 15);
826
-#endif
827
-#if TEMP_SENSOR_3 != 0 && EXTRUDERS > 3
828
-  MENU_ITEM_EDIT(int3, MSG_NOZZLE " 4", &target_temperature[3], 0, HEATER_3_MAXTEMP - 15);
829
-#endif
830
-#if TEMP_SENSOR_BED != 0
831
-  MENU_ITEM_EDIT(int3, MSG_BED, &target_temperature_bed, 0, BED_MAXTEMP - 15);
832
-#endif
833
-  MENU_ITEM_EDIT(int3, MSG_FAN_SPEED, &fanSpeed, 0, 255);
834
-#if defined AUTOTEMP && (TEMP_SENSOR_0 != 0)
835
-  MENU_ITEM_EDIT(bool, MSG_AUTOTEMP, &autotemp_enabled);
836
-  MENU_ITEM_EDIT(float3, MSG_MIN, &autotemp_min, 0, HEATER_0_MAXTEMP - 15);
837
-  MENU_ITEM_EDIT(float3, MSG_MAX, &autotemp_max, 0, HEATER_0_MAXTEMP - 15);
838
-  MENU_ITEM_EDIT(float32, MSG_FACTOR, &autotemp_factor, 0.0, 1.0);
839
-#endif
840
-#ifdef PIDTEMP
841
-	// set up temp variables - undo the default scaling
842
-	pid_current_extruder = 0;
843
-	raw_Ki = unscalePID_i(PID_PARAM(Ki,0));
844
-	raw_Kd = unscalePID_d(PID_PARAM(Kd,0));
845
-	MENU_ITEM_EDIT(float52, MSG_PID_P, &PID_PARAM(Kp,0), 1, 9990);
846
-	// i is typically a small value so allows values below 1
847
-	MENU_ITEM_EDIT_CALLBACK(float52, MSG_PID_I, &raw_Ki, 0.01, 9990, copy_and_scalePID_i);
848
-	MENU_ITEM_EDIT_CALLBACK(float52, MSG_PID_D, &raw_Kd, 1, 9990, copy_and_scalePID_d);
878
+  #if TEMP_SENSOR_0 != 0
879
+    MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_NOZZLE, &target_temperature[0], 0, HEATER_0_MAXTEMP - 15);
880
+  #endif
881
+  #if EXTRUDERS > 1
882
+    #if TEMP_SENSOR_1 != 0
883
+      MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_NOZZLE " 2", &target_temperature[1], 0, HEATER_1_MAXTEMP - 15);
884
+    #endif
885
+    #if EXTRUDERS > 2
886
+      #if TEMP_SENSOR_2 != 0
887
+        MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_NOZZLE " 3", &target_temperature[2], 0, HEATER_2_MAXTEMP - 15);
888
+      #endif
889
+      #if EXTRUDERS > 3
890
+        #if TEMP_SENSOR_3 != 0
891
+          MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_NOZZLE " 4", &target_temperature[3], 0, HEATER_3_MAXTEMP - 15);
892
+        #endif
893
+      #endif
894
+    #endif
895
+  #endif
896
+  #if TEMP_SENSOR_BED != 0
897
+    MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_BED, &target_temperature_bed, 0, BED_MAXTEMP - 15);
898
+  #endif
899
+  MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_FAN_SPEED, &fanSpeed, 0, 255);
900
+  #if defined(AUTOTEMP) && (TEMP_SENSOR_0 != 0)
901
+    MENU_ITEM_EDIT(bool, MSG_AUTOTEMP, &autotemp_enabled);
902
+    MENU_ITEM_EDIT(float3, MSG_MIN, &autotemp_min, 0, HEATER_0_MAXTEMP - 15);
903
+    MENU_ITEM_EDIT(float3, MSG_MAX, &autotemp_max, 0, HEATER_0_MAXTEMP - 15);
904
+    MENU_ITEM_EDIT(float32, MSG_FACTOR, &autotemp_factor, 0.0, 1.0);
905
+  #endif
906
+  #ifdef PIDTEMP
907
+    // set up temp variables - undo the default scaling
908
+    raw_Ki = unscalePID_i(PID_PARAM(Ki,0));
909
+    raw_Kd = unscalePID_d(PID_PARAM(Kd,0));
910
+    MENU_ITEM_EDIT(float52, MSG_PID_P, &PID_PARAM(Kp,0), 1, 9990);
911
+    // i is typically a small value so allows values below 1
912
+    MENU_ITEM_EDIT_CALLBACK(float52, MSG_PID_I, &raw_Ki, 0.01, 9990, copy_and_scalePID_i_E1);
913
+    MENU_ITEM_EDIT_CALLBACK(float52, MSG_PID_D, &raw_Kd, 1, 9990, copy_and_scalePID_d_E1);
849
     #ifdef PID_ADD_EXTRUSION_RATE
914
     #ifdef PID_ADD_EXTRUSION_RATE
850
-	  MENU_ITEM_EDIT(float3, MSG_PID_C, &PID_PARAM(Kc,0), 1, 9990);
915
+      MENU_ITEM_EDIT(float3, MSG_PID_C, &PID_PARAM(Kc,0), 1, 9990);
851
     #endif//PID_ADD_EXTRUSION_RATE
916
     #endif//PID_ADD_EXTRUSION_RATE
852
-#ifdef PID_PARAMS_PER_EXTRUDER
853
-  #if EXTRUDERS > 1
854
-	  // set up temp variables - undo the default scaling
855
-	  pid_current_extruder = 0;
856
-	  raw_Ki = unscalePID_i(PID_PARAM(Ki,1));
857
-	  raw_Kd = unscalePID_d(PID_PARAM(Kd,1));
858
-	  MENU_ITEM_EDIT(float52, MSG_PID_P " E2", &PID_PARAM(Kp,1), 1, 9990);
859
-	  // i is typically a small value so allows values below 1
860
-	  MENU_ITEM_EDIT_CALLBACK(float52, MSG_PID_I " E2", &raw_Ki, 0.01, 9990, copy_and_scalePID_i);
861
-	  MENU_ITEM_EDIT_CALLBACK(float52, MSG_PID_D " E2", &raw_Kd, 1, 9990, copy_and_scalePID_d);
862
-      #ifdef PID_ADD_EXTRUSION_RATE
863
-	    MENU_ITEM_EDIT(float3, MSG_PID_C " E2", &PID_PARAM(Kc,1), 1, 9990);
864
-      #endif//PID_ADD_EXTRUSION_RATE
865
-  #endif//EXTRUDERS > 1
866
-  #if EXTRUDERS > 2
867
-	    // set up temp variables - undo the default scaling
868
-	    pid_current_extruder = 0;
869
-	    raw_Ki = unscalePID_i(PID_PARAM(Ki,2));
870
-	    raw_Kd = unscalePID_d(PID_PARAM(Kd,2));
871
-	    MENU_ITEM_EDIT(float52, MSG_PID_P " E3", &PID_PARAM(Kp,2), 1, 9990);
872
-	    // i is typically a small value so allows values below 1
873
-	    MENU_ITEM_EDIT_CALLBACK(float52, MSG_PID_I " E3", &raw_Ki, 0.01, 9990, copy_and_scalePID_i);
874
-	    MENU_ITEM_EDIT_CALLBACK(float52, MSG_PID_D " E3", &raw_Kd, 1, 9990, copy_and_scalePID_d);
917
+    #ifdef PID_PARAMS_PER_EXTRUDER
918
+      #if EXTRUDERS > 1
919
+        // set up temp variables - undo the default scaling
920
+        raw_Ki = unscalePID_i(PID_PARAM(Ki,1));
921
+        raw_Kd = unscalePID_d(PID_PARAM(Kd,1));
922
+        MENU_ITEM_EDIT(float52, MSG_PID_P " E2", &PID_PARAM(Kp,1), 1, 9990);
923
+        // i is typically a small value so allows values below 1
924
+        MENU_ITEM_EDIT_CALLBACK(float52, MSG_PID_I " E2", &raw_Ki, 0.01, 9990, copy_and_scalePID_i_E2);
925
+        MENU_ITEM_EDIT_CALLBACK(float52, MSG_PID_D " E2", &raw_Kd, 1, 9990, copy_and_scalePID_d_E2);
875
         #ifdef PID_ADD_EXTRUSION_RATE
926
         #ifdef PID_ADD_EXTRUSION_RATE
876
-	      MENU_ITEM_EDIT(float3, MSG_PID_C " E3", &PID_PARAM(Kc,2), 1, 9990);
927
+          MENU_ITEM_EDIT(float3, MSG_PID_C " E2", &PID_PARAM(Kc,1), 1, 9990);
877
         #endif//PID_ADD_EXTRUSION_RATE
928
         #endif//PID_ADD_EXTRUSION_RATE
878
-  #endif//EXTRUDERS > 2
879
-#endif // PID_PARAMS_PER_EXTRUDER
880
-#endif//PIDTEMP
881
-    MENU_ITEM(submenu, MSG_PREHEAT_PLA_SETTINGS, lcd_control_temperature_preheat_pla_settings_menu);
882
-    MENU_ITEM(submenu, MSG_PREHEAT_ABS_SETTINGS, lcd_control_temperature_preheat_abs_settings_menu);
883
-    END_MENU();
929
+
930
+        #if EXTRUDERS > 2
931
+          // set up temp variables - undo the default scaling
932
+          raw_Ki = unscalePID_i(PID_PARAM(Ki,2));
933
+          raw_Kd = unscalePID_d(PID_PARAM(Kd,2));
934
+          MENU_ITEM_EDIT(float52, MSG_PID_P " E3", &PID_PARAM(Kp,2), 1, 9990);
935
+          // i is typically a small value so allows values below 1
936
+          MENU_ITEM_EDIT_CALLBACK(float52, MSG_PID_I " E3", &raw_Ki, 0.01, 9990, copy_and_scalePID_i_E3);
937
+          MENU_ITEM_EDIT_CALLBACK(float52, MSG_PID_D " E3", &raw_Kd, 1, 9990, copy_and_scalePID_d_E3);
938
+          #ifdef PID_ADD_EXTRUSION_RATE
939
+            MENU_ITEM_EDIT(float3, MSG_PID_C " E3", &PID_PARAM(Kc,2), 1, 9990);
940
+          #endif//PID_ADD_EXTRUSION_RATE
941
+
942
+          #if EXTRUDERS > 3
943
+            // set up temp variables - undo the default scaling
944
+            raw_Ki = unscalePID_i(PID_PARAM(Ki,3));
945
+            raw_Kd = unscalePID_d(PID_PARAM(Kd,3));
946
+            MENU_ITEM_EDIT(float52, MSG_PID_P " E4", &PID_PARAM(Kp,3), 1, 9990);
947
+            // i is typically a small value so allows values below 1
948
+            MENU_ITEM_EDIT_CALLBACK(float52, MSG_PID_I " E4", &raw_Ki, 0.01, 9990, copy_and_scalePID_i_E4);
949
+            MENU_ITEM_EDIT_CALLBACK(float52, MSG_PID_D " E4", &raw_Kd, 1, 9990, copy_and_scalePID_d_E4);
950
+            #ifdef PID_ADD_EXTRUSION_RATE
951
+              MENU_ITEM_EDIT(float3, MSG_PID_C " E4", &PID_PARAM(Kc,3), 1, 9990);
952
+            #endif//PID_ADD_EXTRUSION_RATE
953
+          #endif//EXTRUDERS > 3
954
+        #endif//EXTRUDERS > 2
955
+      #endif//EXTRUDERS > 1
956
+    #endif //PID_PARAMS_PER_EXTRUDER
957
+  #endif//PIDTEMP
958
+  MENU_ITEM(submenu, MSG_PREHEAT_PLA_SETTINGS, lcd_control_temperature_preheat_pla_settings_menu);
959
+  MENU_ITEM(submenu, MSG_PREHEAT_ABS_SETTINGS, lcd_control_temperature_preheat_abs_settings_menu);
960
+  END_MENU();
884
 }
961
 }
885
 
962
 
886
 static void lcd_control_temperature_preheat_pla_settings_menu()
963
 static void lcd_control_temperature_preheat_pla_settings_menu()
961
 	MENU_ITEM_EDIT_CALLBACK(bool, MSG_VOLUMETRIC_ENABLED, &volumetric_enabled, calculate_volumetric_multipliers);
1038
 	MENU_ITEM_EDIT_CALLBACK(bool, MSG_VOLUMETRIC_ENABLED, &volumetric_enabled, calculate_volumetric_multipliers);
962
 
1039
 
963
 	if (volumetric_enabled) {
1040
 	if (volumetric_enabled) {
964
-		MENU_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_SIZE_EXTRUDER_0, &filament_size[0], DEFAULT_NOMINAL_FILAMENT_DIA - .5, DEFAULT_NOMINAL_FILAMENT_DIA + .5, calculate_volumetric_multipliers);
965
-#if EXTRUDERS > 1
966
-		MENU_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_SIZE_EXTRUDER_1, &filament_size[1], DEFAULT_NOMINAL_FILAMENT_DIA - .5, DEFAULT_NOMINAL_FILAMENT_DIA + .5, calculate_volumetric_multipliers);
967
-#if EXTRUDERS > 2
968
-		MENU_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_SIZE_EXTRUDER_2, &filament_size[2], DEFAULT_NOMINAL_FILAMENT_DIA - .5, DEFAULT_NOMINAL_FILAMENT_DIA + .5, calculate_volumetric_multipliers);
969
-#if EXTRUDERS > 3
970
-		MENU_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_SIZE_EXTRUDER_3, &filament_size[3], DEFAULT_NOMINAL_FILAMENT_DIA - .5, DEFAULT_NOMINAL_FILAMENT_DIA + .5, calculate_volumetric_multipliers);
971
-#endif //EXTRUDERS > 3
972
-#endif //EXTRUDERS > 2
973
-#endif //EXTRUDERS > 1
1041
+    MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_SIZE_EXTRUDER_0, &filament_size[0], 1.5, 3.25, calculate_volumetric_multipliers);
1042
+    #if EXTRUDERS > 1
1043
+      MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_SIZE_EXTRUDER_1, &filament_size[1], 1.5, 3.25, calculate_volumetric_multipliers);
1044
+      #if EXTRUDERS > 2
1045
+        MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_SIZE_EXTRUDER_2, &filament_size[2], 1.5, 3.25, calculate_volumetric_multipliers);
1046
+        #if EXTRUDERS > 3
1047
+          MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_SIZE_EXTRUDER_3, &filament_size[3], 1.5, 3.25, calculate_volumetric_multipliers);
1048
+        #endif //EXTRUDERS > 3
1049
+      #endif //EXTRUDERS > 2
1050
+    #endif //EXTRUDERS > 1
974
 	}
1051
 	}
975
 
1052
 
976
 	END_MENU();
1053
 	END_MENU();
1260
 #endif
1337
 #endif
1261
 }
1338
 }
1262
 
1339
 
1340
+int lcd_strlen(char *s) {
1341
+     int i = 0, j = 0;
1342
+   while (s[i]) {
1343
+     if ((s[i] & 0xc0) != 0x80) j++;
1344
+     i++;
1345
+   }
1346
+   return j;
1347
+}
1348
+
1349
+int lcd_strlen_P(const char *s) {
1350
+     int j = 0;
1351
+   while (pgm_read_byte(s)) {
1352
+     if ((pgm_read_byte(s) & 0xc0) != 0x80) j++;
1353
+     s++;
1354
+   }
1355
+   return j;
1356
+}
1357
+
1358
+
1359
+
1263
 void lcd_update()
1360
 void lcd_update()
1264
 {
1361
 {
1265
     static unsigned long timeoutToStatus = 0;
1362
     static unsigned long timeoutToStatus = 0;
1322
 		#endif
1419
 		#endif
1323
         if (abs(encoderDiff) >= ENCODER_PULSES_PER_STEP)
1420
         if (abs(encoderDiff) >= ENCODER_PULSES_PER_STEP)
1324
         {
1421
         {
1422
+      int32_t encoderMultiplier = 1;
1423
+
1424
+  #ifdef ENCODER_RATE_MULTIPLIER
1425
+
1426
+    if (encoderRateMultiplierEnabled) {
1427
+      int32_t encoderMovementSteps = abs(encoderDiff) / ENCODER_PULSES_PER_STEP;
1428
+
1429
+      if (lastEncoderMovementMillis != 0) {
1430
+        // Note that the rate is always calculated between to passes through the 
1431
+        // loop and that the abs of the encoderDiff value is tracked.
1432
+        float encoderStepRate =
1433
+          (float)(encoderMovementSteps) / ((float)(millis() - lastEncoderMovementMillis)) * 1000.0;
1434
+
1435
+        if (encoderStepRate >= ENCODER_100X_STEPS_PER_SEC)     encoderMultiplier = 100;
1436
+        else if (encoderStepRate >= ENCODER_10X_STEPS_PER_SEC) encoderMultiplier = 10;
1437
+
1438
+        #ifdef ENCODER_RATE_MULTIPLIER_DEBUG
1439
+          SERIAL_ECHO_START;
1440
+          SERIAL_ECHO("Enc Step Rate: ");
1441
+          SERIAL_ECHO(encoderStepRate);
1442
+          SERIAL_ECHO("  Multiplier: ");
1443
+          SERIAL_ECHO(encoderMultiplier);
1444
+          SERIAL_ECHO("  ENCODER_10X_STEPS_PER_SEC: ");
1445
+          SERIAL_ECHO(ENCODER_10X_STEPS_PER_SEC);
1446
+          SERIAL_ECHO("  ENCODER_100X_STEPS_PER_SEC: ");
1447
+          SERIAL_ECHOLN(ENCODER_100X_STEPS_PER_SEC);
1448
+        #endif //ENCODER_RATE_MULTIPLIER_DEBUG
1449
+      }
1450
+
1451
+      lastEncoderMovementMillis = millis();
1452
+    }
1453
+  #endif //ENCODER_RATE_MULTIPLIER
1454
+
1325
             lcdDrawUpdate = 1;
1455
             lcdDrawUpdate = 1;
1326
-            encoderPosition += encoderDiff / ENCODER_PULSES_PER_STEP;
1456
+            encoderPosition += (encoderDiff * encoderMultiplier) / ENCODER_PULSES_PER_STEP;
1327
             encoderDiff = 0;
1457
             encoderDiff = 0;
1328
             timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
1458
             timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
1329
         }
1459
         }
1372
 }
1502
 }
1373
 
1503
 
1374
 void lcd_finishstatus() {
1504
 void lcd_finishstatus() {
1375
-  int len = strlen(lcd_status_message);
1505
+  int len = lcd_strlen(lcd_status_message);
1376
   if (len > 0) {
1506
   if (len > 0) {
1377
     while (len < LCD_WIDTH) {
1507
     while (len < LCD_WIDTH) {
1378
       lcd_status_message[len++] = ' ';
1508
       lcd_status_message[len++] = ' ';
1785
   return conv;
1915
   return conv;
1786
 }
1916
 }
1787
 
1917
 
1788
-// Callback for after editing PID i value
1789
-// grab the PID i value out of the temp variable; scale it; then update the PID driver
1790
-void copy_and_scalePID_i()
1791
-{
1792
-#ifdef PIDTEMP
1793
-  PID_PARAM(Ki, pid_current_extruder) = scalePID_i(raw_Ki);
1794
-  updatePID();
1795
-#endif
1796
-}
1797
-
1798
-// Callback for after editing PID d value
1799
-// grab the PID d value out of the temp variable; scale it; then update the PID driver
1800
-void copy_and_scalePID_d()
1801
-{
1802
-#ifdef PIDTEMP
1803
-	PID_PARAM(Kd, pid_current_extruder) = scalePID_d(raw_Kd);
1804
-  updatePID();
1805
-#endif
1806
-}
1807
-
1808
 #endif //ULTRA_LCD
1918
 #endif //ULTRA_LCD

+ 2
- 1
Marlin/ultralcd.h 查看文件

4
 #include "Marlin.h"
4
 #include "Marlin.h"
5
 
5
 
6
 #ifdef ULTRA_LCD
6
 #ifdef ULTRA_LCD
7
-
7
+  int lcd_strlen(char *s);
8
+  int lcd_strlen_P(const char *s);
8
   void lcd_update();
9
   void lcd_update();
9
   void lcd_init();
10
   void lcd_init();
10
   void lcd_setstatus(const char* message);
11
   void lcd_setstatus(const char* message);

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

636
     {
636
     {
637
         lcd.print(c);
637
         lcd.print(c);
638
         pstr++;
638
         pstr++;
639
-        n--;
639
+        if ((pgm_read_byte(pstr) & 0xc0) != 0x80) n--;
640
     }
640
     }
641
     while(n--)
641
     while(n--)
642
         lcd.print(' ');
642
         lcd.print(' ');
648
     char c;
648
     char c;
649
     //Use all characters in narrow LCDs
649
     //Use all characters in narrow LCDs
650
   #if LCD_WIDTH < 20
650
   #if LCD_WIDTH < 20
651
-      uint8_t n = LCD_WIDTH - 1 - 1 - strlen(data);
651
+      uint8_t n = LCD_WIDTH - 1 - 1 - lcd_strlen(data);
652
     #else
652
     #else
653
-      uint8_t n = LCD_WIDTH - 1 - 2 - strlen(data);
653
+      uint8_t n = LCD_WIDTH - 1 - 2 - lcd_strlen(data);
654
   #endif
654
   #endif
655
     lcd.setCursor(0, row);
655
     lcd.setCursor(0, row);
656
     lcd.print(pre_char);
656
     lcd.print(pre_char);
658
     {
658
     {
659
         lcd.print(c);
659
         lcd.print(c);
660
         pstr++;
660
         pstr++;
661
-        n--;
661
+        if ((pgm_read_byte(pstr) & 0xc0) != 0x80) n--;
662
     }
662
     }
663
     lcd.print(':');
663
     lcd.print(':');
664
     while(n--)
664
     while(n--)
670
     char c;
670
     char c;
671
     //Use all characters in narrow LCDs
671
     //Use all characters in narrow LCDs
672
   #if LCD_WIDTH < 20
672
   #if LCD_WIDTH < 20
673
-      uint8_t n = LCD_WIDTH - 1 - 1 - strlen_P(data);
673
+      uint8_t n = LCD_WIDTH - 1 - 1 - lcd_strlen_P(data);
674
     #else
674
     #else
675
-      uint8_t n = LCD_WIDTH - 1 - 2 - strlen_P(data);
675
+      uint8_t n = LCD_WIDTH - 1 - 2 - lcd_strlen_P(data);
676
   #endif
676
   #endif
677
     lcd.setCursor(0, row);
677
     lcd.setCursor(0, row);
678
     lcd.print(pre_char);
678
     lcd.print(pre_char);
680
     {
680
     {
681
         lcd.print(c);
681
         lcd.print(c);
682
         pstr++;
682
         pstr++;
683
-        n--;
683
+        if ((pgm_read_byte(pstr) & 0xc0) != 0x80) n--;
684
     }
684
     }
685
     lcd.print(':');
685
     lcd.print(':');
686
     while(n--)
686
     while(n--)
733
     lcd_printPGM(pstr);
733
     lcd_printPGM(pstr);
734
     lcd.print(':');
734
     lcd.print(':');
735
    #if LCD_WIDTH < 20
735
    #if LCD_WIDTH < 20
736
-      lcd.setCursor(LCD_WIDTH - strlen(value), 1);
736
+      lcd.setCursor(LCD_WIDTH - lcd_strlen(value), 1);
737
     #else
737
     #else
738
-      lcd.setCursor(LCD_WIDTH -1 - strlen(value), 1);
738
+      lcd.setCursor(LCD_WIDTH -1 - lcd_strlen(value), 1);
739
    #endif
739
    #endif
740
     lcd.print(value);
740
     lcd.print(value);
741
 }
741
 }

正在加载...
取消
保存