ソースを参照

Merge pull request #1 from MarlinFirmware/Development

dev pull
Wurstnase 10年前
コミット
92ebb7f4c8
58個のファイルの変更6394行の追加5486行の削除
  1. 1
    1
      ArduinoAddons/Arduino_1.5.x/hardware/marlin/avr/boards.txt
  2. 1
    8
      Marlin/BlinkM.cpp
  3. 3
    4
      Marlin/BlinkM.h
  4. 43
    10
      Marlin/Configuration.h
  5. 3
    3
      Marlin/ConfigurationStore.h
  6. 5
    0
      Marlin/Configuration_adv.h
  7. 8
    4
      Marlin/LiquidCrystalRus.cpp
  8. 5
    4
      Marlin/Marlin.h
  9. 3198
    2414
      Marlin/Marlin_main.cpp
  10. 2
    1
      Marlin/boards.h
  11. 252
    379
      Marlin/cardreader.cpp
  12. 30
    34
      Marlin/cardreader.h
  13. 38
    39
      Marlin/digipot_mcp4451.cpp
  14. 15
    16
      Marlin/dogm_lcd_implementation.h
  15. 36
    2
      Marlin/example_configurations/Hephestos/Configuration.h
  16. 5
    0
      Marlin/example_configurations/Hephestos/Configuration_adv.h
  17. 37
    3
      Marlin/example_configurations/K8200/Configuration.h
  18. 5
    0
      Marlin/example_configurations/K8200/Configuration_adv.h
  19. 36
    2
      Marlin/example_configurations/SCARA/Configuration.h
  20. 17
    0
      Marlin/example_configurations/SCARA/Configuration_adv.h
  21. 37
    3
      Marlin/example_configurations/WITBOX/Configuration.h
  22. 5
    0
      Marlin/example_configurations/WITBOX/Configuration_adv.h
  23. 36
    2
      Marlin/example_configurations/delta/Configuration.h
  24. 17
    0
      Marlin/example_configurations/delta/Configuration_adv.h
  25. 37
    3
      Marlin/example_configurations/makibox/Configuration.h
  26. 17
    0
      Marlin/example_configurations/makibox/Configuration_adv.h
  27. 38
    4
      Marlin/example_configurations/tvrrug/Round2/Configuration.h
  28. 17
    0
      Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h
  29. 3
    0
      Marlin/fastio.h
  30. 39
    0
      Marlin/language.h
  31. 298
    6
      Marlin/language_en.h
  32. 38
    38
      Marlin/language_fi.h
  33. 15
    15
      Marlin/language_ru.h
  34. 5
    1
      Marlin/pins.h
  35. 2
    0
      Marlin/pins_3DRAG.h
  36. 8
    0
      Marlin/pins_AZTEEG_X3.h
  37. 9
    5
      Marlin/pins_AZTEEG_X3_PRO.h
  38. 11
    0
      Marlin/pins_BAM_DICE_DUE.h
  39. 0
    6
      Marlin/pins_CHEAPTRONIC.h
  40. 0
    6
      Marlin/pins_ELEFU_3.h
  41. 3
    0
      Marlin/pins_HEPHESTOS.h
  42. 0
    6
      Marlin/pins_MEGATRONICS.h
  43. 0
    6
      Marlin/pins_MEGATRONICS_1.h
  44. 0
    6
      Marlin/pins_MEGATRONICS_2.h
  45. 14
    6
      Marlin/pins_MEGATRONICS_3.h
  46. 0
    11
      Marlin/pins_RAMBO.h
  47. 31
    33
      Marlin/pins_RAMPS_13.h
  48. 4
    0
      Marlin/pins_RUMBA.h
  49. 3
    0
      Marlin/pins_WITBOX.h
  50. 10
    2
      Marlin/planner.cpp
  51. 84
    95
      Marlin/stepper.cpp
  52. 921
    1281
      Marlin/temperature.cpp
  53. 39
    72
      Marlin/temperature.h
  54. 23
    0
      Marlin/thermistortables.h
  55. 859
    907
      Marlin/ultralcd.cpp
  56. 2
    1
      Marlin/ultralcd.h
  57. 26
    41
      Marlin/ultralcd_implementation_hitachi_HD44780.h
  58. 3
    6
      Marlin/ultralcd_st7920_u8glib_rrd.h

+ 1
- 1
ArduinoAddons/Arduino_1.5.x/hardware/marlin/avr/boards.txt ファイルの表示

@@ -33,7 +33,7 @@ rambo.build.variant=rambo
33 33
 ########################################
34 34
 sanguino.name=Sanguino
35 35
 
36
-sanguino.upload.tool=ardunio:avrdude
36
+sanguino.upload.tool=arduino:avrdude
37 37
 sanguino.upload.protocol=stk500
38 38
 sanguino.upload.maximum_size=131072
39 39
 sanguino.upload.speed=57600

+ 1
- 8
Marlin/BlinkM.cpp ファイルの表示

@@ -5,16 +5,9 @@
5 5
 #include "Marlin.h"
6 6
 #ifdef BLINKM
7 7
 
8
-#if (ARDUINO >= 100)
9
-  # include "Arduino.h"
10
-#else
11
-  # include "WProgram.h"
12
-#endif
13
-
14 8
 #include "BlinkM.h"
15 9
 
16
-void SendColors(byte red, byte grn, byte blu)
17
-{
10
+void SendColors(byte red, byte grn, byte blu) {
18 11
   Wire.begin(); 
19 12
   Wire.beginTransmission(0x09);
20 13
   Wire.write('o');                    //to disable ongoing script, only needs to be used once

+ 3
- 4
Marlin/BlinkM.h ファイルの表示

@@ -2,13 +2,12 @@
2 2
   BlinkM.h
3 3
   Library header file for BlinkM library
4 4
  */
5
-#if (ARDUINO >= 100)
6
-  # include "Arduino.h"
5
+#if ARDUINO >= 100
6
+  #include "Arduino.h"
7 7
 #else
8
-  # include "WProgram.h"
8
+  #include "WProgram.h"
9 9
 #endif
10 10
 
11 11
 #include "Wire.h"
12 12
 
13 13
 void SendColors(byte red, byte grn, byte blu);
14
-

+ 43
- 10
Marlin/Configuration.h ファイルの表示

@@ -118,10 +118,15 @@ Here are some standard links for getting your machine calibrated:
118 118
 // 1010 is Pt1000 with 1k pullup (non standard)
119 119
 // 147 is Pt100 with 4k7 pullup
120 120
 // 110 is Pt100 with 1k pullup (non standard)
121
+// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. 
122
+//     Use it for Testing or Development purposes. NEVER for production machine.
123
+//     #define DUMMY_THERMISTOR_998_VALUE 25
124
+//     #define DUMMY_THERMISTOR_999_VALUE 100
121 125
 
122 126
 #define TEMP_SENSOR_0 -1
123 127
 #define TEMP_SENSOR_1 -1
124 128
 #define TEMP_SENSOR_2 0
129
+#define TEMP_SENSOR_3 0
125 130
 #define TEMP_SENSOR_BED 0
126 131
 
127 132
 // This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted.
@@ -139,6 +144,7 @@ Here are some standard links for getting your machine calibrated:
139 144
 #define HEATER_0_MINTEMP 5
140 145
 #define HEATER_1_MINTEMP 5
141 146
 #define HEATER_2_MINTEMP 5
147
+#define HEATER_3_MINTEMP 5
142 148
 #define BED_MINTEMP 5
143 149
 
144 150
 // When temperature exceeds max temp, your heater will be switched off.
@@ -147,6 +153,7 @@ Here are some standard links for getting your machine calibrated:
147 153
 #define HEATER_0_MAXTEMP 275
148 154
 #define HEATER_1_MAXTEMP 275
149 155
 #define HEATER_2_MAXTEMP 275
156
+#define HEATER_3_MAXTEMP 275
150 157
 #define BED_MAXTEMP 150
151 158
 
152 159
 // If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
@@ -323,11 +330,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
323 330
 //#define DISABLE_MAX_ENDSTOPS
324 331
 //#define DISABLE_MIN_ENDSTOPS
325 332
 
326
-// Disable max endstops for compatibility with endstop checking routine
327
-#if defined(COREXY) && !defined(DISABLE_MAX_ENDSTOPS)
328
-  #define DISABLE_MAX_ENDSTOPS
329
-#endif
330
-
331 333
 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
332 334
 #define X_ENABLE_ON 0
333 335
 #define Y_ENABLE_ON 0
@@ -341,12 +343,13 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
341 343
 #define DISABLE_E false // For all extruders
342 344
 #define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
343 345
 
344
-#define INVERT_X_DIR true    // for Mendel set to false, for Orca set to true
346
+#define INVERT_X_DIR true     // for Mendel set to false, for Orca set to true
345 347
 #define INVERT_Y_DIR false    // for Mendel set to true, for Orca set to false
346 348
 #define INVERT_Z_DIR true     // for Mendel set to false, for Orca set to true
347 349
 #define INVERT_E0_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
348
-#define INVERT_E1_DIR false    // for direct drive extruder v9 set to true, for geared extruder set to false
350
+#define INVERT_E1_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
349 351
 #define INVERT_E2_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
352
+#define INVERT_E3_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
350 353
 
351 354
 // ENDSTOP SETTINGS:
352 355
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
@@ -425,9 +428,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
425 428
 
426 429
   // these are the offsets to the probe relative to the extruder tip (Hotend - Probe)
427 430
   // X and Y offsets must be integers
428
-  #define X_PROBE_OFFSET_FROM_EXTRUDER -25
429
-  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29
430
-  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35
431
+  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // -left  +right
432
+  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // -front +behind
433
+  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // -below (always!)
431 434
 
432 435
   #define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z before homing (G28) for Probe Clearance.
433 436
                                         // Be sure you have this distance over your Z_MAX_POS in case
@@ -582,10 +585,20 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
582 585
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
583 586
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
584 587
 
588
+// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
589
+// http://reprap.org/wiki/PanelOne
590
+//#define PANEL_ONE
591
+
585 592
 // The MaKr3d Makr-Panel with graphic controller and SD support
586 593
 // http://reprap.org/wiki/MaKr3d_MaKrPanel
587 594
 //#define MAKRPANEL
588 595
 
596
+// The Panucatt Devices Viki 2.0 and mini Viki with Graphic LCD
597
+// http://panucatt.com
598
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
599
+//#define VIKI2
600
+//#define miniVIKI
601
+
589 602
 // The RepRapDiscount Smart Controller (white PCB)
590 603
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
591 604
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER
@@ -619,6 +632,26 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
619 632
  #define DEFAULT_LCD_CONTRAST 17
620 633
 #endif
621 634
 
635
+#if defined(miniVIKI) || defined(VIKI2)
636
+ #define ULTRA_LCD  //general LCD support, also 16x2
637
+ #define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
638
+ #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
639
+ 
640
+  #ifdef miniVIKI
641
+   #define DEFAULT_LCD_CONTRAST 95
642
+  #else
643
+   #define DEFAULT_LCD_CONTRAST 40
644
+  #endif
645
+  
646
+ #define ENCODER_PULSES_PER_STEP 4
647
+ #define ENCODER_STEPS_PER_MENU_ITEM 1
648
+#endif
649
+
650
+#if defined (PANEL_ONE)
651
+ #define SDSUPPORT
652
+ #define ULTIMAKERCONTROLLER
653
+#endif
654
+
622 655
 #if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
623 656
  #define DOGLCD
624 657
  #define U8GLIB_ST7920

+ 3
- 3
Marlin/ConfigurationStore.h ファイルの表示

@@ -1,5 +1,5 @@
1
-#ifndef CONFIG_STORE_H
2
-#define CONFIG_STORE_H
1
+#ifndef CONFIGURATIONSTORE_H
2
+#define CONFIGURATIONSTORE_H
3 3
 
4 4
 #include "Configuration.h"
5 5
 
@@ -19,4 +19,4 @@ void Config_ResetDefault();
19 19
   FORCE_INLINE void Config_RetrieveSettings() { Config_ResetDefault(); Config_PrintSettings(); }
20 20
 #endif
21 21
 
22
-#endif // __CONFIG_STORE_H
22
+#endif //CONFIGURATIONSTORE_H

+ 5
- 0
Marlin/Configuration_adv.h ファイルの表示

@@ -284,6 +284,11 @@
284 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 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 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,10 +14,14 @@
14 14
 // it is a Russian alphabet translation
15 15
 // except 0401 --> 0xa2 = ╗, 0451 --> 0xb5
16 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 27
 // When the display powers up, it is configured as follows:

+ 5
- 4
Marlin/Marlin.h ファイルの表示

@@ -180,8 +180,8 @@ void manage_inactivity(bool ignore_stepper_queue=false);
180 180
   #define disable_e3() /* nothing */
181 181
 #endif
182 182
 
183
-enum AxisEnum {X_AXIS=0, Y_AXIS=1, Z_AXIS=2, E_AXIS=3, X_HEAD=4, Y_HEAD=5};
184
-
183
+enum AxisEnum {X_AXIS=0, Y_AXIS=1, Z_AXIS=2, E_AXIS=3, X_HEAD=4, Y_HEAD=5}; 
184
+//X_HEAD and Y_HEAD is used for systems that don't have a 1:1 relationship between X_AXIS and X Head movement, like CoreXY bots.
185 185
 
186 186
 void FlushSerialRequestResend();
187 187
 void ClearToSend();
@@ -201,8 +201,9 @@ void Stop();
201 201
 
202 202
 bool IsStopped();
203 203
 
204
-void enquecommand(const char *cmd); //put an ASCII command at the end of the current buffer.
205
-void enquecommand_P(const char *cmd); //put an ASCII command at the end of the current buffer, read from flash
204
+bool enquecommand(const char *cmd); //put a single ASCII command at the end of the current buffer or return false when it is full
205
+void enquecommands_P(const char *cmd); //put one or many ASCII commands at the end of the current buffer, read from flash
206
+
206 207
 void prepare_arc_move(char isclockwise);
207 208
 void clamp_to_software_endstops(float target[3]);
208 209
 

+ 3198
- 2414
Marlin/Marlin_main.cpp
ファイル差分が大きすぎるため省略します
ファイルの表示


+ 2
- 1
Marlin/boards.h ファイルの表示

@@ -50,10 +50,11 @@
50 50
 #define BOARD_LEAPFROG          999  // Leapfrog
51 51
 #define BOARD_WITBOX            41   // bq WITBOX
52 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 56
 #define BOARD_99                99   // This is in pins.h but...?
55 57
 
56 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 60
 #endif //__BOARDS_H

+ 252
- 379
Marlin/cardreader.cpp ファイルの表示

@@ -7,476 +7,382 @@
7 7
 
8 8
 #ifdef SDSUPPORT
9 9
 
10
+CardReader::CardReader() {
11
+  filesize = 0;
12
+  sdpos = 0;
13
+  sdprinting = false;
14
+  cardOK = false;
15
+  saving = false;
16
+  logging = false;
17
+  workDirDepth = 0;
18
+  file_subcall_ctr = 0;
19
+  memset(workDirParents, 0, sizeof(workDirParents));
10 20
 
11
-
12
-CardReader::CardReader()
13
-{
14
-   filesize = 0;
15
-   sdpos = 0;
16
-   sdprinting = false;
17
-   cardOK = false;
18
-   saving = false;
19
-   logging = false;
20
-   autostart_atmillis=0;
21
-   workDirDepth = 0;
22
-   file_subcall_ctr=0;
23
-   memset(workDirParents, 0, sizeof(workDirParents));
24
-
25
-   autostart_stilltocheck=true; //the SD start is delayed, because otherwise the serial cannot answer fast enough to make contact with the host software.
26
-   autostart_index=0;
21
+  autostart_stilltocheck = true; //the SD start is delayed, because otherwise the serial cannot answer fast enough to make contact with the host software.
22
+  autostart_index = 0;
27 23
   //power to SD reader
28 24
   #if SDPOWER > -1
29
-    SET_OUTPUT(SDPOWER); 
30
-    WRITE(SDPOWER,HIGH);
25
+    OUT_WRITE(SDPOWER, HIGH);
31 26
   #endif //SDPOWER
32
-  
33
-  autostart_atmillis=millis()+5000;
27
+
28
+  autostart_atmillis = millis() + 5000;
34 29
 }
35 30
 
36
-char *createFilename(char *buffer,const dir_t &p) //buffer>12characters
37
-{
38
-  char *pos=buffer;
39
-  for (uint8_t i = 0; i < 11; i++) 
40
-  {
41
-    if (p.name[i] == ' ')continue;
42
-    if (i == 8) 
43
-    {
44
-      *pos++='.';
45
-    }
46
-    *pos++=p.name[i];
31
+char *createFilename(char *buffer, const dir_t &p) { //buffer > 12characters
32
+  char *pos = buffer;
33
+  for (uint8_t i = 0; i < 11; i++) {
34
+    if (p.name[i] == ' ') continue;
35
+    if (i == 8) *pos++ = '.';
36
+    *pos++ = p.name[i];
47 37
   }
48
-  *pos++=0;
38
+  *pos++ = 0;
49 39
   return buffer;
50 40
 }
51 41
 
52
-
53
-void CardReader::lsDive(const char *prepend, SdFile parent, const char * const match/*=NULL*/)
54
-{
42
+void CardReader::lsDive(const char *prepend, SdFile parent, const char * const match/*=NULL*/) {
55 43
   dir_t p;
56
- uint8_t cnt=0;
57
- 
58
-  while (parent.readDir(p, longFilename) > 0)
59
-  {
60
-    if( DIR_IS_SUBDIR(&p) && lsAction!=LS_Count && lsAction!=LS_GetFilename) // hence LS_SerialPrint
61
-    {
44
+  uint8_t cnt = 0;
62 45
 
46
+  while (parent.readDir(p, longFilename) > 0) {
47
+    if (DIR_IS_SUBDIR(&p) && lsAction != LS_Count && lsAction != LS_GetFilename) { // hence LS_SerialPrint
63 48
       char path[FILENAME_LENGTH*2];
64 49
       char lfilename[FILENAME_LENGTH];
65
-      createFilename(lfilename,p);
66
-      
67
-      path[0]=0;
68
-      if(strlen(prepend)==0) //avoid leading / if already in prepend
69
-      {
70
-       strcat(path,"/");
71
-      }
72
-      strcat(path,prepend);
73
-      strcat(path,lfilename);
74
-      strcat(path,"/");
75
-      
50
+      createFilename(lfilename, p);
51
+
52
+      path[0] = 0;
53
+      if (prepend[0] == 0) strcat(path, "/"); //avoid leading / if already in prepend
54
+      strcat(path, prepend);
55
+      strcat(path, lfilename);
56
+      strcat(path, "/");
57
+
76 58
       //Serial.print(path);
77
-      
59
+
78 60
       SdFile dir;
79
-      if(!dir.open(parent,lfilename, O_READ))
80
-      {
81
-        if(lsAction==LS_SerialPrint)
82
-        {
61
+      if (!dir.open(parent, lfilename, O_READ)) {
62
+        if (lsAction == LS_SerialPrint) {
83 63
           SERIAL_ECHO_START;
84 64
           SERIAL_ECHOLN(MSG_SD_CANT_OPEN_SUBDIR);
85 65
           SERIAL_ECHOLN(lfilename);
86 66
         }
87 67
       }
88
-      lsDive(path,dir);
68
+      lsDive(path, dir);
89 69
       //close done automatically by destructor of SdFile
90
-
91
-      
92 70
     }
93
-    else
94
-    {
71
+    else {
95 72
       char pn0 = p.name[0];
96 73
       if (pn0 == DIR_NAME_FREE) break;
97
-      if (pn0 == DIR_NAME_DELETED || pn0 == '.' || pn0 == '_') continue;
74
+      if (pn0 == DIR_NAME_DELETED || pn0 == '.') continue;
98 75
       char lf0 = longFilename[0];
99
-      if (lf0 == '.' || lf0 == '_') continue;
76
+      if (lf0 == '.') continue;
100 77
 
101 78
       if (!DIR_IS_FILE_OR_SUBDIR(&p)) continue;
102
-      filenameIsDir=DIR_IS_SUBDIR(&p);
103
-      
104
-      
105
-      if(!filenameIsDir)
106
-      {
107
-        if(p.name[8]!='G') continue;
108
-        if(p.name[9]=='~') continue;
109
-      }
110
-      //if(cnt++!=nr) continue;
111
-      createFilename(filename,p);
112
-      if(lsAction==LS_SerialPrint)
113
-      {
79
+
80
+      filenameIsDir = DIR_IS_SUBDIR(&p);
81
+
82
+      if (!filenameIsDir && (p.name[8] != 'G' || p.name[9] == '~')) continue;
83
+
84
+      //if (cnt++ != nr) continue;
85
+      createFilename(filename, p);
86
+      if (lsAction == LS_SerialPrint) {
114 87
         SERIAL_PROTOCOL(prepend);
115 88
         SERIAL_PROTOCOLLN(filename);
116 89
       }
117
-      else if(lsAction==LS_Count)
118
-      {
90
+      else if (lsAction == LS_Count) {
119 91
         nrFiles++;
120
-      } 
121
-      else if(lsAction==LS_GetFilename)
122
-      {
92
+      }
93
+      else if (lsAction == LS_GetFilename) {
123 94
         if (match != NULL) {
124 95
           if (strcasecmp(match, filename) == 0) return;
125 96
         }
126 97
         else if (cnt == nrFiles) return;
127 98
         cnt++;
128
-        
129 99
       }
130 100
     }
131 101
   }
132 102
 }
133 103
 
134
-void CardReader::ls() 
135
-{
136
-  lsAction=LS_SerialPrint;
137
-  if(lsAction==LS_Count)
138
-  nrFiles=0;
139
-
104
+void CardReader::ls()  {
105
+  lsAction = LS_SerialPrint;
140 106
   root.rewind();
141
-  lsDive("",root);
107
+  lsDive("", root);
142 108
 }
143 109
 
144
-
145
-void CardReader::initsd()
146
-{
110
+void CardReader::initsd() {
147 111
   cardOK = false;
148
-  if(root.isOpen())
149
-    root.close();
150
-#ifdef SDSLOW
151
-  if (!card.init(SPI_HALF_SPEED,SDSS)
152
-  #if defined(LCD_SDSS) && (LCD_SDSS != SDSS)
153
-    && !card.init(SPI_HALF_SPEED,LCD_SDSS)
154
-  #endif
155
-    )
156
-#else
157
-  if (!card.init(SPI_FULL_SPEED,SDSS)
158
-  #if defined(LCD_SDSS) && (LCD_SDSS != SDSS)
159
-    && !card.init(SPI_FULL_SPEED,LCD_SDSS)
112
+  if (root.isOpen()) root.close();
113
+
114
+  #ifdef SDSLOW
115
+    #define SPI_SPEED SPI_HALF_SPEED
116
+  #else
117
+    #define SPI_SPEED SPI_FULL_SPEED
160 118
   #endif
161
-    )
162
-#endif
163
-  {
119
+
120
+  if (!card.init(SPI_SPEED,SDSS)
121
+    #if defined(LCD_SDSS) && (LCD_SDSS != SDSS)
122
+      && !card.init(SPI_SPEED, LCD_SDSS)
123
+    #endif
124
+  ) {
164 125
     //if (!card.init(SPI_HALF_SPEED,SDSS))
165 126
     SERIAL_ECHO_START;
166 127
     SERIAL_ECHOLNPGM(MSG_SD_INIT_FAIL);
167 128
   }
168
-  else if (!volume.init(&card))
169
-  {
129
+  else if (!volume.init(&card)) {
170 130
     SERIAL_ERROR_START;
171 131
     SERIAL_ERRORLNPGM(MSG_SD_VOL_INIT_FAIL);
172 132
   }
173
-  else if (!root.openRoot(&volume)) 
174
-  {
133
+  else if (!root.openRoot(&volume)) {
175 134
     SERIAL_ERROR_START;
176 135
     SERIAL_ERRORLNPGM(MSG_SD_OPENROOT_FAIL);
177 136
   }
178
-  else 
179
-  {
137
+  else {
180 138
     cardOK = true;
181 139
     SERIAL_ECHO_START;
182 140
     SERIAL_ECHOLNPGM(MSG_SD_CARD_OK);
183 141
   }
184
-  workDir=root;
185
-  curDir=&root;
142
+  workDir = root;
143
+  curDir = &root;
186 144
   /*
187
-  if(!workDir.openRoot(&volume))
188
-  {
145
+  if (!workDir.openRoot(&volume)) {
189 146
     SERIAL_ECHOLNPGM(MSG_SD_WORKDIR_FAIL);
190 147
   }
191 148
   */
192
-  
193 149
 }
194 150
 
195
-void CardReader::setroot()
196
-{
197
-  /*if(!workDir.openRoot(&volume))
198
-  {
151
+void CardReader::setroot() {
152
+  /*if (!workDir.openRoot(&volume)) {
199 153
     SERIAL_ECHOLNPGM(MSG_SD_WORKDIR_FAIL);
200 154
   }*/
201
-  workDir=root;
202
-  
203
-  curDir=&workDir;
155
+  workDir = root;
156
+  curDir = &workDir;
204 157
 }
205
-void CardReader::release()
206
-{
158
+
159
+void CardReader::release() {
207 160
   sdprinting = false;
208 161
   cardOK = false;
209 162
 }
210 163
 
211
-void CardReader::startFileprint()
212
-{
213
-  if(cardOK)
214
-  {
164
+void CardReader::startFileprint() {
165
+  if (cardOK) {
215 166
     sdprinting = true;
216 167
   }
217 168
 }
218 169
 
219
-void CardReader::pauseSDPrint()
220
-{
221
-  if(sdprinting)
222
-  {
223
-    sdprinting = false;
224
-  }
170
+void CardReader::pauseSDPrint() {
171
+  if (sdprinting) sdprinting = false;
225 172
 }
226 173
 
227
-
228
-void CardReader::openLogFile(char* name)
229
-{
174
+void CardReader::openLogFile(char* name) {
230 175
   logging = true;
231 176
   openFile(name, false);
232 177
 }
233 178
 
234
-void CardReader::getAbsFilename(char *t)
235
-{
236
-  uint8_t cnt=0;
237
-  *t='/';t++;cnt++;
238
-  for(uint8_t i=0;i<workDirDepth;i++)
239
-  {
179
+void CardReader::getAbsFilename(char *t) {
180
+  uint8_t cnt = 0;
181
+  *t = '/'; t++; cnt++;
182
+  for (uint8_t i = 0; i < workDirDepth; i++) {
240 183
     workDirParents[i].getFilename(t); //SDBaseFile.getfilename!
241
-    while(*t!=0 && cnt< MAXPATHNAMELENGTH) 
242
-    {t++;cnt++;}  //crawl counter forward.
184
+    while(*t && cnt < MAXPATHNAMELENGTH) { t++; cnt++; } //crawl counter forward.
243 185
   }
244
-  if(cnt<MAXPATHNAMELENGTH-FILENAME_LENGTH)
186
+  if (cnt < MAXPATHNAMELENGTH - FILENAME_LENGTH)
245 187
     file.getFilename(t);
246 188
   else
247
-    t[0]=0;
189
+    t[0] = 0;
248 190
 }
249 191
 
250
-void CardReader::openFile(char* name,bool read, bool replace_current/*=true*/)
251
-{
252
-  if(!cardOK)
253
-    return;
254
-  if(file.isOpen())  //replacing current file by new file, or subfile call
255
-  {
256
-    if(!replace_current)
257
-    {
258
-     if((int)file_subcall_ctr>(int)SD_PROCEDURE_DEPTH-1)
259
-     {
192
+void CardReader::openFile(char* name, bool read, bool replace_current/*=true*/) {
193
+  if (!cardOK) return;
194
+  if (file.isOpen()) { //replacing current file by new file, or subfile call
195
+    if (!replace_current) {
196
+     if (file_subcall_ctr > SD_PROCEDURE_DEPTH - 1) {
260 197
        SERIAL_ERROR_START;
261 198
        SERIAL_ERRORPGM("trying to call sub-gcode files with too many levels. MAX level is:");
262 199
        SERIAL_ERRORLN(SD_PROCEDURE_DEPTH);
263 200
        kill();
264 201
        return;
265 202
      }
266
-     
203
+
267 204
      SERIAL_ECHO_START;
268 205
      SERIAL_ECHOPGM("SUBROUTINE CALL target:\"");
269 206
      SERIAL_ECHO(name);
270 207
      SERIAL_ECHOPGM("\" parent:\"");
271
-     
208
+
272 209
      //store current filename and position
273 210
      getAbsFilename(filenames[file_subcall_ctr]);
274
-     
211
+
275 212
      SERIAL_ECHO(filenames[file_subcall_ctr]);
276 213
      SERIAL_ECHOPGM("\" pos");
277 214
      SERIAL_ECHOLN(sdpos);
278
-     filespos[file_subcall_ctr]=sdpos;
215
+     filespos[file_subcall_ctr] = sdpos;
279 216
      file_subcall_ctr++;
280 217
     }
281
-    else
282
-    {
218
+    else {
283 219
      SERIAL_ECHO_START;
284 220
      SERIAL_ECHOPGM("Now doing file: ");
285 221
      SERIAL_ECHOLN(name);
286 222
     }
287 223
     file.close();
288 224
   }
289
-  else //opening fresh file
290
-  {
291
-    file_subcall_ctr=0; //resetting procedure depth in case user cancels print while in procedure
225
+  else { //opening fresh file
226
+    file_subcall_ctr = 0; //resetting procedure depth in case user cancels print while in procedure
292 227
     SERIAL_ECHO_START;
293 228
     SERIAL_ECHOPGM("Now fresh file: ");
294 229
     SERIAL_ECHOLN(name);
295 230
   }
296 231
   sdprinting = false;
297
-  
298
- 
232
+
299 233
   SdFile myDir;
300
-  curDir=&root;
301
-  char *fname=name;
302
-  
303
-  char *dirname_start,*dirname_end;
304
-  if(name[0]=='/')
305
-  {
306
-    dirname_start=strchr(name,'/')+1;
307
-    while(dirname_start>0)
308
-    {
309
-      dirname_end=strchr(dirname_start,'/');
310
-      //SERIAL_ECHO("start:");SERIAL_ECHOLN((int)(dirname_start-name));
311
-      //SERIAL_ECHO("end  :");SERIAL_ECHOLN((int)(dirname_end-name));
312
-      if(dirname_end>0 && dirname_end>dirname_start)
313
-      {
234
+  curDir = &root;
235
+  char *fname = name;
236
+
237
+  char *dirname_start, *dirname_end;
238
+  if (name[0] == '/') {
239
+    dirname_start = &name[1];
240
+    while(dirname_start > 0) {
241
+      dirname_end = strchr(dirname_start, '/');
242
+      //SERIAL_ECHO("start:");SERIAL_ECHOLN((int)(dirname_start - name));
243
+      //SERIAL_ECHO("end  :");SERIAL_ECHOLN((int)(dirname_end - name));
244
+      if (dirname_end > 0 && dirname_end > dirname_start) {
314 245
         char subdirname[FILENAME_LENGTH];
315
-        strncpy(subdirname, dirname_start, dirname_end-dirname_start);
316
-        subdirname[dirname_end-dirname_start]=0;
246
+        strncpy(subdirname, dirname_start, dirname_end - dirname_start);
247
+        subdirname[dirname_end - dirname_start] = 0;
317 248
         SERIAL_ECHOLN(subdirname);
318
-        if(!myDir.open(curDir,subdirname,O_READ))
319
-        {
249
+        if (!myDir.open(curDir, subdirname, O_READ)) {
320 250
           SERIAL_PROTOCOLPGM(MSG_SD_OPEN_FILE_FAIL);
321 251
           SERIAL_PROTOCOL(subdirname);
322 252
           SERIAL_PROTOCOLLNPGM(".");
323 253
           return;
324 254
         }
325
-        else
326
-        {
255
+        else {
327 256
           //SERIAL_ECHOLN("dive ok");
328 257
         }
329
-          
330
-        curDir=&myDir; 
331
-        dirname_start=dirname_end+1;
258
+
259
+        curDir = &myDir;
260
+        dirname_start = dirname_end + 1;
332 261
       }
333
-      else // the reminder after all /fsa/fdsa/ is the filename
334
-      {
335
-        fname=dirname_start;
336
-        //SERIAL_ECHOLN("remaider");
262
+      else { // the remainder after all /fsa/fdsa/ is the filename
263
+        fname = dirname_start;
264
+        //SERIAL_ECHOLN("remainder");
337 265
         //SERIAL_ECHOLN(fname);
338 266
         break;
339 267
       }
340
-      
341 268
     }
342 269
   }
343
-  else //relative path
344
-  {
345
-    curDir=&workDir;
270
+  else { //relative path
271
+    curDir = &workDir;
346 272
   }
347
-  if(read)
348
-  {
349
-    if (file.open(curDir, fname, O_READ)) 
350
-    {
273
+
274
+  if (read) {
275
+    if (file.open(curDir, fname, O_READ)) {
351 276
       filesize = file.fileSize();
352 277
       SERIAL_PROTOCOLPGM(MSG_SD_FILE_OPENED);
353 278
       SERIAL_PROTOCOL(fname);
354 279
       SERIAL_PROTOCOLPGM(MSG_SD_SIZE);
355 280
       SERIAL_PROTOCOLLN(filesize);
356 281
       sdpos = 0;
357
-      
282
+
358 283
       SERIAL_PROTOCOLLNPGM(MSG_SD_FILE_SELECTED);
359 284
       getfilename(0, fname);
360 285
       lcd_setstatus(longFilename[0] ? longFilename : fname);
361 286
     }
362
-    else
363
-    {
287
+    else {
364 288
       SERIAL_PROTOCOLPGM(MSG_SD_OPEN_FILE_FAIL);
365 289
       SERIAL_PROTOCOL(fname);
366 290
       SERIAL_PROTOCOLLNPGM(".");
367 291
     }
368 292
   }
369
-  else 
370
-  { //write
371
-    if (!file.open(curDir, fname, O_CREAT | O_APPEND | O_WRITE | O_TRUNC))
372
-    {
293
+  else { //write
294
+    if (!file.open(curDir, fname, O_CREAT | O_APPEND | O_WRITE | O_TRUNC)) {
373 295
       SERIAL_PROTOCOLPGM(MSG_SD_OPEN_FILE_FAIL);
374 296
       SERIAL_PROTOCOL(fname);
375 297
       SERIAL_PROTOCOLLNPGM(".");
376 298
     }
377
-    else
378
-    {
299
+    else {
379 300
       saving = true;
380 301
       SERIAL_PROTOCOLPGM(MSG_SD_WRITE_TO_FILE);
381 302
       SERIAL_PROTOCOLLN(name);
382 303
       lcd_setstatus(fname);
383 304
     }
384 305
   }
385
-  
386 306
 }
387 307
 
388
-void CardReader::removeFile(char* name)
389
-{
390
-  if(!cardOK)
391
-    return;
308
+void CardReader::removeFile(char* name) {
309
+  if (!cardOK) return;
310
+
392 311
   file.close();
393 312
   sdprinting = false;
394
-  
395
-  
313
+
396 314
   SdFile myDir;
397
-  curDir=&root;
398
-  char *fname=name;
399
-  
400
-  char *dirname_start,*dirname_end;
401
-  if(name[0]=='/')
402
-  {
403
-    dirname_start=strchr(name,'/')+1;
404
-    while(dirname_start>0)
405
-    {
406
-      dirname_end=strchr(dirname_start,'/');
407
-      //SERIAL_ECHO("start:");SERIAL_ECHOLN((int)(dirname_start-name));
408
-      //SERIAL_ECHO("end  :");SERIAL_ECHOLN((int)(dirname_end-name));
409
-      if(dirname_end>0 && dirname_end>dirname_start)
410
-      {
315
+  curDir = &root;
316
+  char *fname = name;
317
+
318
+  char *dirname_start, *dirname_end;
319
+  if (name[0] == '/') {
320
+    dirname_start = strchr(name, '/') + 1;
321
+    while (dirname_start > 0) {
322
+      dirname_end = strchr(dirname_start, '/');
323
+      //SERIAL_ECHO("start:");SERIAL_ECHOLN((int)(dirname_start - name));
324
+      //SERIAL_ECHO("end  :");SERIAL_ECHOLN((int)(dirname_end - name));
325
+      if (dirname_end > 0 && dirname_end > dirname_start) {
411 326
         char subdirname[FILENAME_LENGTH];
412
-        strncpy(subdirname, dirname_start, dirname_end-dirname_start);
413
-        subdirname[dirname_end-dirname_start]=0;
327
+        strncpy(subdirname, dirname_start, dirname_end - dirname_start);
328
+        subdirname[dirname_end - dirname_start] = 0;
414 329
         SERIAL_ECHOLN(subdirname);
415
-        if(!myDir.open(curDir,subdirname,O_READ))
416
-        {
330
+        if (!myDir.open(curDir, subdirname, O_READ)) {
417 331
           SERIAL_PROTOCOLPGM("open failed, File: ");
418 332
           SERIAL_PROTOCOL(subdirname);
419 333
           SERIAL_PROTOCOLLNPGM(".");
420 334
           return;
421 335
         }
422
-        else
423
-        {
336
+        else {
424 337
           //SERIAL_ECHOLN("dive ok");
425 338
         }
426
-          
427
-        curDir=&myDir; 
428
-        dirname_start=dirname_end+1;
339
+
340
+        curDir = &myDir;
341
+        dirname_start = dirname_end + 1;
429 342
       }
430
-      else // the reminder after all /fsa/fdsa/ is the filename
431
-      {
432
-        fname=dirname_start;
433
-        //SERIAL_ECHOLN("remaider");
343
+      else { // the remainder after all /fsa/fdsa/ is the filename
344
+        fname = dirname_start;
345
+        //SERIAL_ECHOLN("remainder");
434 346
         //SERIAL_ECHOLN(fname);
435 347
         break;
436 348
       }
437
-      
438 349
     }
439 350
   }
440
-  else //relative path
441
-  {
442
-    curDir=&workDir;
351
+  else { // relative path
352
+    curDir = &workDir;
353
+  }
354
+
355
+  if (file.remove(curDir, fname)) {
356
+    SERIAL_PROTOCOLPGM("File deleted:");
357
+    SERIAL_PROTOCOLLN(fname);
358
+    sdpos = 0;
359
+  }
360
+  else {
361
+    SERIAL_PROTOCOLPGM("Deletion failed, File: ");
362
+    SERIAL_PROTOCOL(fname);
363
+    SERIAL_PROTOCOLLNPGM(".");
443 364
   }
444
-    if (file.remove(curDir, fname)) 
445
-    {
446
-      SERIAL_PROTOCOLPGM("File deleted:");
447
-      SERIAL_PROTOCOLLN(fname);
448
-      sdpos = 0;
449
-    }
450
-    else
451
-    {
452
-      SERIAL_PROTOCOLPGM("Deletion failed, File: ");
453
-      SERIAL_PROTOCOL(fname);
454
-      SERIAL_PROTOCOLLNPGM(".");
455
-    }
456
-  
457 365
 }
458 366
 
459
-void CardReader::getStatus()
460
-{
461
-  if(cardOK){
367
+void CardReader::getStatus() {
368
+  if (cardOK) {
462 369
     SERIAL_PROTOCOLPGM(MSG_SD_PRINTING_BYTE);
463 370
     SERIAL_PROTOCOL(sdpos);
464 371
     SERIAL_PROTOCOLPGM("/");
465 372
     SERIAL_PROTOCOLLN(filesize);
466 373
   }
467
-  else{
374
+  else {
468 375
     SERIAL_PROTOCOLLNPGM(MSG_SD_NOT_PRINTING);
469 376
   }
470 377
 }
471
-void CardReader::write_command(char *buf)
472
-{
378
+
379
+void CardReader::write_command(char *buf) {
473 380
   char* begin = buf;
474 381
   char* npos = 0;
475 382
   char* end = buf + strlen(buf) - 1;
476 383
 
477 384
   file.writeError = false;
478
-  if((npos = strchr(buf, 'N')) != NULL)
479
-  {
385
+  if ((npos = strchr(buf, 'N')) != NULL) {
480 386
     begin = strchr(npos, ' ') + 1;
481 387
     end = strchr(npos, '*') - 1;
482 388
   }
@@ -484,162 +390,129 @@ void CardReader::write_command(char *buf)
484 390
   end[2] = '\n';
485 391
   end[3] = '\0';
486 392
   file.write(begin);
487
-  if (file.writeError)
488
-  {
393
+  if (file.writeError) {
489 394
     SERIAL_ERROR_START;
490 395
     SERIAL_ERRORLNPGM(MSG_SD_ERR_WRITE_TO_FILE);
491 396
   }
492 397
 }
493 398
 
399
+void CardReader::checkautostart(bool force) {
400
+  if (!force && (!autostart_stilltocheck || autostart_atmillis < millis()))
401
+    return;
494 402
 
495
-void CardReader::checkautostart(bool force)
496
-{
497
-  if(!force)
498
-  {
499
-    if(!autostart_stilltocheck)
500
-      return;
501
-    if(autostart_atmillis<millis())
502
-      return;
503
-  }
504
-  autostart_stilltocheck=false;
505
-  if(!cardOK)
506
-  {
403
+  autostart_stilltocheck = false;
404
+
405
+  if (!cardOK) {
507 406
     initsd();
508
-    if(!cardOK) //fail
509
-      return;
407
+    if (!cardOK) return; // fail
510 408
   }
511
-  
409
+
512 410
   char autoname[30];
513 411
   sprintf_P(autoname, PSTR("auto%i.g"), autostart_index);
514
-  for(int8_t i=0;i<(int8_t)strlen(autoname);i++)
515
-    autoname[i]=tolower(autoname[i]);
412
+  for (int8_t i = 0; i < (int8_t)strlen(autoname); i++) autoname[i] = tolower(autoname[i]);
413
+
516 414
   dir_t p;
517 415
 
518 416
   root.rewind();
519
-  
520
-  bool found=false;
521
-  while (root.readDir(p, NULL) > 0) 
522
-  {
523
-    for(int8_t i=0;i<(int8_t)strlen((char*)p.name);i++)
524
-    p.name[i]=tolower(p.name[i]);
525
-    //Serial.print((char*)p.name);
526
-    //Serial.print(" ");
527
-    //Serial.println(autoname);
528
-    if(p.name[9]!='~') //skip safety copies
529
-    if(strncmp((char*)p.name,autoname,5)==0)
530
-    {
531
-      char cmd[30];
532 417
 
418
+  bool found = false;
419
+  while (root.readDir(p, NULL) > 0) {
420
+    for (int8_t i = 0; i < (int8_t)strlen((char*)p.name); i++) p.name[i] = tolower(p.name[i]);
421
+    if (p.name[9] != '~' && strncmp((char*)p.name, autoname, 5) == 0) {
422
+      char cmd[30];
533 423
       sprintf_P(cmd, PSTR("M23 %s"), autoname);
534 424
       enquecommand(cmd);
535
-      enquecommand_P(PSTR("M24"));
536
-      found=true;
425
+      enquecommands_P(PSTR("M24"));
426
+      found = true;
537 427
     }
538 428
   }
539
-  if(!found)
540
-    autostart_index=-1;
429
+  if (!found)
430
+    autostart_index = -1;
541 431
   else
542 432
     autostart_index++;
543 433
 }
544 434
 
545
-void CardReader::closefile(bool store_location)
546
-{
435
+void CardReader::closefile(bool store_location) {
547 436
   file.sync();
548 437
   file.close();
549
-  saving = false; 
550
-  logging = false;
551
-  
552
-  if(store_location)
553
-  {
438
+  saving = logging = false;
439
+
440
+  if (store_location) {
554 441
     //future: store printer state, filename and position for continuing a stopped print
555 442
     // so one can unplug the printer and continue printing the next day.
556
-    
557 443
   }
558
-
559
-  
560 444
 }
561 445
 
562
-void CardReader::getfilename(uint16_t nr, const char * const match/*=NULL*/)
563
-{
564
-  curDir=&workDir;
565
-  lsAction=LS_GetFilename;
566
-  nrFiles=nr;
446
+/**
447
+ * Get the name of a file in the current directory by index
448
+ */
449
+void CardReader::getfilename(uint16_t nr, const char * const match/*=NULL*/) {
450
+  curDir = &workDir;
451
+  lsAction = LS_GetFilename;
452
+  nrFiles = nr;
567 453
   curDir->rewind();
568
-  lsDive("",*curDir,match);
569
-  
454
+  lsDive("", *curDir, match);
570 455
 }
571 456
 
572
-uint16_t CardReader::getnrfilenames()
573
-{
574
-  curDir=&workDir;
575
-  lsAction=LS_Count;
576
-  nrFiles=0;
457
+uint16_t CardReader::getnrfilenames() {
458
+  curDir = &workDir;
459
+  lsAction = LS_Count;
460
+  nrFiles = 0;
577 461
   curDir->rewind();
578
-  lsDive("",*curDir);
462
+  lsDive("", *curDir);
579 463
   //SERIAL_ECHOLN(nrFiles);
580 464
   return nrFiles;
581 465
 }
582 466
 
583
-void CardReader::chdir(const char * relpath)
584
-{
467
+void CardReader::chdir(const char * relpath) {
585 468
   SdFile newfile;
586
-  SdFile *parent=&root;
587
-  
588
-  if(workDir.isOpen())
589
-    parent=&workDir;
590
-  
591
-  if(!newfile.open(*parent,relpath, O_READ))
592
-  {
593
-   SERIAL_ECHO_START;
594
-   SERIAL_ECHOPGM(MSG_SD_CANT_ENTER_SUBDIR);
595
-   SERIAL_ECHOLN(relpath);
469
+  SdFile *parent = &root;
470
+
471
+  if (workDir.isOpen()) parent = &workDir;
472
+
473
+  if (!newfile.open(*parent, relpath, O_READ)) {
474
+    SERIAL_ECHO_START;
475
+    SERIAL_ECHOPGM(MSG_SD_CANT_ENTER_SUBDIR);
476
+    SERIAL_ECHOLN(relpath);
596 477
   }
597
-  else
598
-  {
478
+  else {
599 479
     if (workDirDepth < MAX_DIR_DEPTH) {
600
-      for (int d = ++workDirDepth; d--;)
601
-        workDirParents[d+1] = workDirParents[d];
602
-      workDirParents[0]=*parent;
480
+      ++workDirDepth;
481
+      for (int d = workDirDepth; d--;) workDirParents[d + 1] = workDirParents[d];
482
+      workDirParents[0] = *parent;
603 483
     }
604
-    workDir=newfile;
484
+    workDir = newfile;
605 485
   }
606 486
 }
607 487
 
608
-void CardReader::updir()
609
-{
610
-  if(workDirDepth > 0)
611
-  {
488
+void CardReader::updir() {
489
+  if (workDirDepth > 0) {
612 490
     --workDirDepth;
613 491
     workDir = workDirParents[0];
614
-    int d;
615 492
     for (int d = 0; d < workDirDepth; d++)
616 493
       workDirParents[d] = workDirParents[d+1];
617 494
   }
618 495
 }
619 496
 
620
-
621
-void CardReader::printingHasFinished()
622
-{
623
-    st_synchronize();
624
-    if(file_subcall_ctr>0) //heading up to a parent file that called current as a procedure.
625
-    {
626
-      file.close();
627
-      file_subcall_ctr--;
628
-      openFile(filenames[file_subcall_ctr],true,true);
629
-      setIndex(filespos[file_subcall_ctr]);
630
-      startFileprint();
631
-    }
632
-    else
633
-    {
634
-      quickStop();
635
-      file.close();
636
-      sdprinting = false;
637
-      if(SD_FINISHED_STEPPERRELEASE)
638
-      {
639
-          //finishAndDisableSteppers();
640
-          enquecommand_P(PSTR(SD_FINISHED_RELEASECOMMAND));
641
-      }
642
-      autotempShutdown();
497
+void CardReader::printingHasFinished() {
498
+  st_synchronize();
499
+  if (file_subcall_ctr > 0) { // Heading up to a parent file that called current as a procedure.
500
+    file.close();
501
+    file_subcall_ctr--;
502
+    openFile(filenames[file_subcall_ctr], true, true);
503
+    setIndex(filespos[file_subcall_ctr]);
504
+    startFileprint();
505
+  }
506
+  else {
507
+    quickStop();
508
+    file.close();
509
+    sdprinting = false;
510
+    if (SD_FINISHED_STEPPERRELEASE) {
511
+      //finishAndDisableSteppers();
512
+      enquecommands_P(PSTR(SD_FINISHED_RELEASECOMMAND));
643 513
     }
514
+    autotempShutdown();
515
+  }
644 516
 }
517
+
645 518
 #endif //SDSUPPORT

+ 30
- 34
Marlin/cardreader.h ファイルの表示

@@ -3,21 +3,21 @@
3 3
 
4 4
 #ifdef SDSUPPORT
5 5
 
6
-#define MAX_DIR_DEPTH 10
6
+#define MAX_DIR_DEPTH 10          // Maximum folder depth
7 7
 
8 8
 #include "SdFile.h"
9
-enum LsAction {LS_SerialPrint,LS_Count,LS_GetFilename};
10
-class CardReader
11
-{
9
+enum LsAction { LS_SerialPrint, LS_Count, LS_GetFilename };
10
+
11
+class CardReader {
12 12
 public:
13 13
   CardReader();
14
-  
14
+
15 15
   void initsd();
16 16
   void write_command(char *buf);
17 17
   //files auto[0-9].g on the sd card are performed in a row
18 18
   //this is to delay autostart and hence the initialisaiton of the sd card to some seconds after the normal init, so the device is available quick after a reset
19 19
 
20
-  void checkautostart(bool x); 
20
+  void checkautostart(bool x);
21 21
   void openFile(char* name,bool read,bool replace_current=true);
22 22
   void openLogFile(char* name);
23 23
   void removeFile(char* name);
@@ -30,9 +30,8 @@ public:
30 30
 
31 31
   void getfilename(uint16_t nr, const char* const match=NULL);
32 32
   uint16_t getnrfilenames();
33
-  
33
+
34 34
   void getAbsFilename(char *t);
35
-  
36 35
 
37 36
   void ls();
38 37
   void chdir(const char * relpath);
@@ -41,56 +40,52 @@ public:
41 40
 
42 41
 
43 42
   FORCE_INLINE bool isFileOpen() { return file.isOpen(); }
44
-  FORCE_INLINE bool eof() { return sdpos>=filesize ;};
45
-  FORCE_INLINE int16_t get() {  sdpos = file.curPosition();return (int16_t)file.read();};
46
-  FORCE_INLINE void setIndex(long index) {sdpos = index;file.seekSet(index);};
47
-  FORCE_INLINE uint8_t percentDone(){if(!isFileOpen()) return 0; if(filesize) return sdpos/((filesize+99)/100); else return 0;};
48
-  FORCE_INLINE char* getWorkDirName(){workDir.getFilename(filename);return filename;};
43
+  FORCE_INLINE bool eof() { return sdpos >= filesize; }
44
+  FORCE_INLINE int16_t get() { sdpos = file.curPosition(); return (int16_t)file.read(); }
45
+  FORCE_INLINE void setIndex(long index) { sdpos = index; file.seekSet(index); }
46
+  FORCE_INLINE uint8_t percentDone() { return (isFileOpen() && filesize) ? sdpos / ((filesize + 99) / 100) : 0; }
47
+  FORCE_INLINE char* getWorkDirName() { workDir.getFilename(filename); return filename; }
49 48
 
50 49
 public:
51
-  bool saving;
52
-  bool logging;
53
-  bool sdprinting;  
54
-  bool cardOK;
55
-  char filename[FILENAME_LENGTH];
56
-  char longFilename[LONG_FILENAME_LENGTH];
57
-  bool filenameIsDir;
50
+  bool saving, logging, sdprinting, cardOK, filenameIsDir;
51
+  char filename[FILENAME_LENGTH], longFilename[LONG_FILENAME_LENGTH];
58 52
   int autostart_index;
59 53
 private:
60
-  SdFile root,*curDir,workDir,workDirParents[MAX_DIR_DEPTH];
54
+  SdFile root, *curDir, workDir, workDirParents[MAX_DIR_DEPTH];
61 55
   uint16_t workDirDepth;
62 56
   Sd2Card card;
63 57
   SdVolume volume;
64 58
   SdFile file;
65 59
   #define SD_PROCEDURE_DEPTH 1
66
-  #define MAXPATHNAMELENGTH (FILENAME_LENGTH*MAX_DIR_DEPTH+MAX_DIR_DEPTH+1)
60
+  #define MAXPATHNAMELENGTH (FILENAME_LENGTH*MAX_DIR_DEPTH + MAX_DIR_DEPTH + 1)
67 61
   uint8_t file_subcall_ctr;
68 62
   uint32_t filespos[SD_PROCEDURE_DEPTH];
69 63
   char filenames[SD_PROCEDURE_DEPTH][MAXPATHNAMELENGTH];
70 64
   uint32_t filesize;
71
-  //int16_t n;
72 65
   unsigned long autostart_atmillis;
73
-  uint32_t sdpos ;
66
+  uint32_t sdpos;
74 67
 
75 68
   bool autostart_stilltocheck; //the sd start is delayed, because otherwise the serial cannot answer fast enought to make contact with the hostsoftware.
76
-  
69
+
77 70
   LsAction lsAction; //stored for recursion.
78
-  int16_t nrFiles; //counter for the files in the current directory and recycled as position counter for getting the nrFiles'th name in the directory.
71
+  uint16_t nrFiles; //counter for the files in the current directory and recycled as position counter for getting the nrFiles'th name in the directory.
79 72
   char* diveDirName;
80 73
   void lsDive(const char *prepend, SdFile parent, const char * const match=NULL);
81 74
 };
75
+
82 76
 extern CardReader card;
77
+
83 78
 #define IS_SD_PRINTING (card.sdprinting)
84 79
 
85 80
 #if (SDCARDDETECT > -1)
86
-# ifdef SDCARDDETECTINVERTED 
87
-#  define IS_SD_INSERTED (READ(SDCARDDETECT)!=0)
88
-# else
89
-#  define IS_SD_INSERTED (READ(SDCARDDETECT)==0)
90
-# endif //SDCARDTETECTINVERTED
81
+  #ifdef SDCARDDETECTINVERTED
82
+    #define IS_SD_INSERTED (READ(SDCARDDETECT) != 0)
83
+  #else
84
+    #define IS_SD_INSERTED (READ(SDCARDDETECT) == 0)
85
+  #endif
91 86
 #else
92
-//If we don't have a card detect line, aways asume the card is inserted
93
-# define IS_SD_INSERTED true
87
+  //No card detect line? Assume the card is inserted.
88
+  #define IS_SD_INSERTED true
94 89
 #endif
95 90
 
96 91
 #else
@@ -98,4 +93,5 @@ extern CardReader card;
98 93
 #define IS_SD_PRINTING (false)
99 94
 
100 95
 #endif //SDSUPPORT
101
-#endif
96
+
97
+#endif //__CARDREADER_H

+ 38
- 39
Marlin/digipot_mcp4451.cpp ファイルの表示

@@ -1,59 +1,58 @@
1 1
 #include "Configuration.h"
2 2
 
3 3
 #ifdef DIGIPOT_I2C
4
+
4 5
 #include "Stream.h"
5 6
 #include "utility/twi.h"
6 7
 #include "Wire.h"
7 8
 
8 9
 // Settings for the I2C based DIGIPOT (MCP4451) on Azteeg X3 Pro
9 10
 #if MB(5DPRINT)
10
-#define DIGIPOT_I2C_FACTOR 117.96
11
-#define DIGIPOT_I2C_MAX_CURRENT 1.736
11
+  #define DIGIPOT_I2C_FACTOR 117.96
12
+  #define DIGIPOT_I2C_MAX_CURRENT 1.736
12 13
 #else
13
-#define DIGIPOT_I2C_FACTOR 106.7
14
-#define DIGIPOT_I2C_MAX_CURRENT 2.5
14
+  #define DIGIPOT_I2C_FACTOR 106.7
15
+  #define DIGIPOT_I2C_MAX_CURRENT 2.5
15 16
 #endif
16 17
 
17
-static byte current_to_wiper( float current ){
18
-    return byte(ceil(float((DIGIPOT_I2C_FACTOR*current))));
18
+static byte current_to_wiper(float current) {
19
+  return byte(ceil(float((DIGIPOT_I2C_FACTOR*current))));
19 20
 }
20 21
 
21
-static void i2c_send(byte addr, byte a, byte b)
22
-{
23
-	Wire.beginTransmission(addr);
24
-    Wire.write(a);
25
-    Wire.write(b);
26
-    Wire.endTransmission();
22
+static void i2c_send(byte addr, byte a, byte b) {
23
+  Wire.beginTransmission(addr);
24
+  Wire.write(a);
25
+  Wire.write(b);
26
+  Wire.endTransmission();
27 27
 }
28 28
 
29 29
 // This is for the MCP4451 I2C based digipot
30
-void digipot_i2c_set_current( int channel, float current )
31
-{
32
-    current = min( (float) max( current, 0.0f ), DIGIPOT_I2C_MAX_CURRENT);
33
-    // these addresses are specific to Azteeg X3 Pro, can be set to others,
34
-    // In this case first digipot is at address A0=0, A1= 0, second one is at A0=0, A1= 1
35
-    byte addr= 0x2C; // channel 0-3
36
-    if(channel >= 4) {
37
-    	addr= 0x2E; // channel 4-7
38
-    	channel-= 4;
39
-    }
40
-
41
-    // Initial setup
42
-    i2c_send( addr, 0x40, 0xff );
43
-    i2c_send( addr, 0xA0, 0xff );
44
-
45
-    // Set actual wiper value
46
-    byte addresses[4] = { 0x00, 0x10, 0x60, 0x70 };
47
-    i2c_send( addr, addresses[channel], current_to_wiper(current) );
30
+void digipot_i2c_set_current(int channel, float current) {
31
+  current = min( (float) max( current, 0.0f ), DIGIPOT_I2C_MAX_CURRENT);
32
+  // these addresses are specific to Azteeg X3 Pro, can be set to others,
33
+  // In this case first digipot is at address A0=0, A1= 0, second one is at A0=0, A1= 1
34
+  byte addr = 0x2C; // channel 0-3
35
+  if (channel >= 4) {
36
+  	addr = 0x2E; // channel 4-7
37
+  	channel -= 4;
38
+  }
39
+
40
+  // Initial setup
41
+  i2c_send(addr, 0x40, 0xff);
42
+  i2c_send(addr, 0xA0, 0xff);
43
+
44
+  // Set actual wiper value
45
+  byte addresses[4] = { 0x00, 0x10, 0x60, 0x70 };
46
+  i2c_send(addr, addresses[channel], current_to_wiper(current));
48 47
 }
49 48
 
50
-void digipot_i2c_init()
51
-{
52
-    const float digipot_motor_current[] = DIGIPOT_I2C_MOTOR_CURRENTS;
53
-    Wire.begin();
54
-    // setup initial currents as defined in Configuration_adv.h
55
-    for(int i=0;i<=sizeof(digipot_motor_current)/sizeof(float);i++) {
56
-        digipot_i2c_set_current(i, digipot_motor_current[i]);
57
-    }
49
+void digipot_i2c_init() {
50
+  const float digipot_motor_current[] = DIGIPOT_I2C_MOTOR_CURRENTS;
51
+  Wire.begin();
52
+  // setup initial currents as defined in Configuration_adv.h
53
+  for(int i = 0; i <= sizeof(digipot_motor_current) / sizeof(float); i++) {
54
+    digipot_i2c_set_current(i, digipot_motor_current[i]);
55
+  }
58 56
 }
59
-#endif
57
+
58
+#endif //DIGIPOT_I2C

+ 15
- 16
Marlin/dogm_lcd_implementation.h ファイルの表示

@@ -21,17 +21,13 @@
21 21
 **/
22 22
 
23 23
 #ifdef ULTIPANEL
24
-#define BLEN_A 0
25
-#define BLEN_B 1
26
-#define BLEN_C 2
27
-#define EN_A (1<<BLEN_A)
28
-#define EN_B (1<<BLEN_B)
29
-#define EN_C (1<<BLEN_C)
30
-#define encrot0 0
31
-#define encrot1 2
32
-#define encrot2 3
33
-#define encrot3 1
34
-#define LCD_CLICKED (buttons&EN_C)
24
+  #define BLEN_A 0
25
+  #define BLEN_B 1
26
+  #define BLEN_C 2
27
+  #define EN_A (1<<BLEN_A)
28
+  #define EN_B (1<<BLEN_B)
29
+  #define EN_C (1<<BLEN_C)
30
+  #define LCD_CLICKED (buttons&EN_C)
35 31
 #endif
36 32
 
37 33
 #include <U8glib.h>
@@ -92,6 +88,9 @@ U8GLIB_ST7920_128X64_RRD u8g(0);
92 88
 #elif defined(MAKRPANEL)
93 89
 // The MaKrPanel display, ST7565 controller as well
94 90
 U8GLIB_NHD_C12864 u8g(DOGLCD_CS, DOGLCD_A0);
91
+#elif defined(VIKI2) || defined(miniVIKI)
92
+// Mini Viki and Viki 2.0 LCD, ST7565 controller as well
93
+U8GLIB_NHD_C12864 u8g(DOGLCD_CS, DOGLCD_A0);
95 94
 #else
96 95
 // for regular DOGM128 display with HW-SPI
97 96
 U8GLIB_DOGM128 u8g(DOGLCD_CS, DOGLCD_A0);  // HW-SPI Com: CS, A0
@@ -312,7 +311,7 @@ static void lcd_implementation_drawmenu_generic(uint8_t row, const char* pstr, c
312 311
 
313 312
 static void _drawmenu_setting_edit_generic(uint8_t row, const char* pstr, char pre_char, const char* data, bool pgm) {
314 313
   char c;
315
-  uint8_t n = LCD_WIDTH - 2 - (pgm ? strlen_P(data) : (strlen(data)));
314
+  uint8_t n = LCD_WIDTH - 2 - (pgm ? lcd_strlen_P(data) : (lcd_strlen((char*)data)));
316 315
 
317 316
   lcd_implementation_mark_as_selected(row, pre_char);
318 317
 
@@ -374,18 +373,18 @@ void lcd_implementation_drawedit(const char* pstr, char* value) {
374 373
   uint8_t char_width = DOG_CHAR_WIDTH;
375 374
 
376 375
   #ifdef USE_BIG_EDIT_FONT
377
-    if (strlen_P(pstr) <= LCD_WIDTH_EDIT - 1) {
376
+    if (lcd_strlen_P(pstr) <= LCD_WIDTH_EDIT - 1) {
378 377
       u8g.setFont(FONT_MENU_EDIT);
379 378
       lcd_width = LCD_WIDTH_EDIT + 1;
380 379
       char_width = DOG_CHAR_WIDTH_EDIT;
381
-      if (strlen_P(pstr) >= LCD_WIDTH_EDIT - strlen(value)) rows = 2;
380
+      if (lcd_strlen_P(pstr) >= LCD_WIDTH_EDIT - lcd_strlen(value)) rows = 2;
382 381
     }
383 382
     else {
384 383
       u8g.setFont(FONT_MENU);
385 384
     }
386 385
   #endif
387 386
 
388
-  if (strlen_P(pstr) > LCD_WIDTH - 2 - strlen(value)) rows = 2;
387
+  if (lcd_strlen_P(pstr) > LCD_WIDTH - 2 - lcd_strlen(value)) rows = 2;
389 388
 
390 389
   const float kHalfChar = DOG_CHAR_HEIGHT_EDIT / 2;
391 390
   float rowHeight = u8g.getHeight() / (rows + 1); // 1/(rows+1) = 1/2 or 1/3
@@ -393,7 +392,7 @@ void lcd_implementation_drawedit(const char* pstr, char* value) {
393 392
   u8g.setPrintPos(0, rowHeight + kHalfChar);
394 393
   lcd_printPGM(pstr);
395 394
   u8g.print(':');
396
-  u8g.setPrintPos((lcd_width-1-strlen(value)) * char_width, rows * rowHeight + kHalfChar);
395
+  u8g.setPrintPos((lcd_width-1-lcd_strlen(value)) * char_width, rows * rowHeight + kHalfChar);
397 396
   u8g.print(value);
398 397
 }
399 398
 

+ 36
- 2
Marlin/example_configurations/Hephestos/Configuration.h ファイルの表示

@@ -1,4 +1,4 @@
1
-#ifndef CONFIGURATION_H
1
+#ifndef CONFIGURATION_H
2 2
 #define CONFIGURATION_H
3 3
 
4 4
 #include "boards.h"
@@ -122,6 +122,7 @@ Here are some standard links for getting your machine calibrated:
122 122
 #define TEMP_SENSOR_0 1
123 123
 #define TEMP_SENSOR_1 0
124 124
 #define TEMP_SENSOR_2 0
125
+#define TEMP_SENSOR_3 0
125 126
 #define TEMP_SENSOR_BED 0
126 127
 
127 128
 // This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted.
@@ -139,6 +140,7 @@ Here are some standard links for getting your machine calibrated:
139 140
 #define HEATER_0_MINTEMP 5
140 141
 #define HEATER_1_MINTEMP 5
141 142
 #define HEATER_2_MINTEMP 5
143
+#define HEATER_3_MINTEMP 5
142 144
 #define BED_MINTEMP 5
143 145
 
144 146
 // When temperature exceeds max temp, your heater will be switched off.
@@ -147,6 +149,7 @@ Here are some standard links for getting your machine calibrated:
147 149
 #define HEATER_0_MAXTEMP 260
148 150
 #define HEATER_1_MAXTEMP 260
149 151
 #define HEATER_2_MAXTEMP 260
152
+#define HEATER_3_MAXTEMP 260
150 153
 #define BED_MAXTEMP 150
151 154
 
152 155
 // If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
@@ -351,8 +354,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
351 354
 #define INVERT_Y_DIR false    // for Mendel set to true, for Orca set to false
352 355
 #define INVERT_Z_DIR true     // for Mendel set to false, for Orca set to true
353 356
 #define INVERT_E0_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
354
-#define INVERT_E1_DIR false    // for direct drive extruder v9 set to true, for geared extruder set to false
357
+#define INVERT_E1_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
355 358
 #define INVERT_E2_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
359
+#define INVERT_E3_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
356 360
 
357 361
 // ENDSTOP SETTINGS:
358 362
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
@@ -583,10 +587,20 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
583 587
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
584 588
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
585 589
 
590
+// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
591
+// http://reprap.org/wiki/PanelOne
592
+//#define PANEL_ONE
593
+
586 594
 // The MaKr3d Makr-Panel with graphic controller and SD support
587 595
 // http://reprap.org/wiki/MaKr3d_MaKrPanel
588 596
 //#define MAKRPANEL
589 597
 
598
+// The Panucatt Devices Viki 2.0 and mini Viki with Graphic LCD
599
+// http://panucatt.com
600
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
601
+//#define VIKI2
602
+//#define miniVIKI
603
+
590 604
 // The RepRapDiscount Smart Controller (white PCB)
591 605
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
592 606
 #define REPRAP_DISCOUNT_SMART_CONTROLLER
@@ -620,6 +634,26 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
620 634
  #define DEFAULT_LCD_CONTRAST 17
621 635
 #endif
622 636
 
637
+#if defined(miniVIKI) || defined(VIKI2)
638
+ #define ULTRA_LCD  //general LCD support, also 16x2
639
+ #define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
640
+ #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
641
+ 
642
+  #ifdef miniVIKI
643
+   #define DEFAULT_LCD_CONTRAST 95
644
+  #else
645
+   #define DEFAULT_LCD_CONTRAST 40
646
+  #endif
647
+  
648
+ #define ENCODER_PULSES_PER_STEP 4
649
+ #define ENCODER_STEPS_PER_MENU_ITEM 1
650
+#endif
651
+
652
+#if defined (PANEL_ONE)
653
+ #define SDSUPPORT
654
+ #define ULTIMAKERCONTROLLER
655
+#endif
656
+
623 657
 #if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
624 658
  #define DOGLCD
625 659
  #define U8GLIB_ST7920

+ 5
- 0
Marlin/example_configurations/Hephestos/Configuration_adv.h ファイルの表示

@@ -284,6 +284,11 @@
284 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 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 293
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
289 294
 

+ 37
- 3
Marlin/example_configurations/K8200/Configuration.h ファイルの表示

@@ -1,4 +1,4 @@
1
-#ifndef CONFIGURATION_H
1
+#ifndef CONFIGURATION_H
2 2
 #define CONFIGURATION_H
3 3
 
4 4
 #include "boards.h"
@@ -124,6 +124,7 @@ Here are some standard links for getting your machine calibrated:
124 124
 #define TEMP_SENSOR_0 5
125 125
 #define TEMP_SENSOR_1 0
126 126
 #define TEMP_SENSOR_2 0
127
+#define TEMP_SENSOR_3 0
127 128
 #define TEMP_SENSOR_BED 5
128 129
 
129 130
 // This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted.
@@ -141,6 +142,7 @@ Here are some standard links for getting your machine calibrated:
141 142
 #define HEATER_0_MINTEMP 5
142 143
 #define HEATER_1_MINTEMP 5
143 144
 #define HEATER_2_MINTEMP 5
145
+#define HEATER_3_MINTEMP 5
144 146
 #define BED_MINTEMP 5
145 147
 
146 148
 // When temperature exceeds max temp, your heater will be switched off.
@@ -149,6 +151,7 @@ Here are some standard links for getting your machine calibrated:
149 151
 #define HEATER_0_MAXTEMP 275
150 152
 #define HEATER_1_MAXTEMP 275
151 153
 #define HEATER_2_MAXTEMP 275
154
+#define HEATER_3_MAXTEMP 275
152 155
 #define BED_MAXTEMP 150
153 156
 
154 157
 // If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
@@ -357,10 +360,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
357 360
 
358 361
 #define INVERT_X_DIR false    // for Mendel set to false, for Orca set to true
359 362
 #define INVERT_Y_DIR false    // for Mendel set to true, for Orca set to false
360
-#define INVERT_Z_DIR false     // for Mendel set to false, for Orca set to true
363
+#define INVERT_Z_DIR false    // for Mendel set to false, for Orca set to true
361 364
 #define INVERT_E0_DIR true   // for direct drive extruder v9 set to true, for geared extruder set to false
362
-#define INVERT_E1_DIR true    // for direct drive extruder v9 set to true, for geared extruder set to false
365
+#define INVERT_E1_DIR true   // for direct drive extruder v9 set to true, for geared extruder set to false
363 366
 #define INVERT_E2_DIR true   // for direct drive extruder v9 set to true, for geared extruder set to false
367
+#define INVERT_E3_DIR true   // for direct drive extruder v9 set to true, for geared extruder set to false
364 368
 
365 369
 // ENDSTOP SETTINGS:
366 370
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
@@ -593,10 +597,20 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
593 597
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
594 598
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
595 599
 
600
+// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
601
+// http://reprap.org/wiki/PanelOne
602
+//#define PANEL_ONE
603
+
596 604
 // The MaKr3d Makr-Panel with graphic controller and SD support
597 605
 // http://reprap.org/wiki/MaKr3d_MaKrPanel
598 606
 //#define MAKRPANEL
599 607
 
608
+// The Panucatt Devices Viki 2.0 and mini Viki with Graphic LCD
609
+// http://panucatt.com
610
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
611
+//#define VIKI2
612
+//#define miniVIKI
613
+
600 614
 // The RepRapDiscount Smart Controller (white PCB)
601 615
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
602 616
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER
@@ -630,6 +644,26 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
630 644
  #define DEFAULT_LCD_CONTRAST 17
631 645
 #endif
632 646
 
647
+#if defined(miniVIKI) || defined(VIKI2)
648
+ #define ULTRA_LCD  //general LCD support, also 16x2
649
+ #define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
650
+ #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
651
+ 
652
+  #ifdef miniVIKI
653
+   #define DEFAULT_LCD_CONTRAST 95
654
+  #else
655
+   #define DEFAULT_LCD_CONTRAST 40
656
+  #endif
657
+  
658
+ #define ENCODER_PULSES_PER_STEP 4
659
+ #define ENCODER_STEPS_PER_MENU_ITEM 1
660
+#endif
661
+
662
+#if defined (PANEL_ONE)
663
+ #define SDSUPPORT
664
+ #define ULTIMAKERCONTROLLER
665
+#endif
666
+
633 667
 #if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
634 668
  #define DOGLCD
635 669
  #define U8GLIB_ST7920

+ 5
- 0
Marlin/example_configurations/K8200/Configuration_adv.h ファイルの表示

@@ -284,6 +284,11 @@
284 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 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 293
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
289 294
 

+ 36
- 2
Marlin/example_configurations/SCARA/Configuration.h ファイルの表示

@@ -1,4 +1,4 @@
1
-#ifndef CONFIGURATION_H
1
+#ifndef CONFIGURATION_H
2 2
 #define CONFIGURATION_H
3 3
 
4 4
 #include "boards.h"
@@ -142,6 +142,7 @@ Here are some standard links for getting your machine calibrated:
142 142
 #define TEMP_SENSOR_0 1
143 143
 #define TEMP_SENSOR_1 0
144 144
 #define TEMP_SENSOR_2 0
145
+#define TEMP_SENSOR_3 0
145 146
 #define TEMP_SENSOR_BED 1
146 147
 
147 148
 // This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted.
@@ -159,6 +160,7 @@ Here are some standard links for getting your machine calibrated:
159 160
 #define HEATER_0_MINTEMP 5
160 161
 #define HEATER_1_MINTEMP 5
161 162
 #define HEATER_2_MINTEMP 5
163
+#define HEATER_3_MINTEMP 5
162 164
 #define BED_MINTEMP 5
163 165
 
164 166
 // When temperature exceeds max temp, your heater will be switched off.
@@ -167,6 +169,7 @@ Here are some standard links for getting your machine calibrated:
167 169
 #define HEATER_0_MAXTEMP 275
168 170
 #define HEATER_1_MAXTEMP 275
169 171
 #define HEATER_2_MAXTEMP 275
172
+#define HEATER_3_MAXTEMP 275
170 173
 #define BED_MAXTEMP 150
171 174
 
172 175
 // If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
@@ -380,8 +383,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
380 383
 #define INVERT_Y_DIR false    // for Mendel set to true, for Orca set to false
381 384
 #define INVERT_Z_DIR true     // for Mendel set to false, for Orca set to true
382 385
 #define INVERT_E0_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
383
-#define INVERT_E1_DIR false    // for direct drive extruder v9 set to true, for geared extruder set to false
386
+#define INVERT_E1_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
384 387
 #define INVERT_E2_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
388
+#define INVERT_E3_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
385 389
 
386 390
 // ENDSTOP SETTINGS:
387 391
 // Sets direction of endstop	s when homing; 1=MAX, -1=MIN
@@ -586,10 +590,20 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
586 590
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
587 591
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
588 592
 
593
+// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
594
+// http://reprap.org/wiki/PanelOne
595
+//#define PANEL_ONE
596
+
589 597
 // The MaKr3d Makr-Panel with graphic controller and SD support
590 598
 // http://reprap.org/wiki/MaKr3d_MaKrPanel
591 599
 //#define MAKRPANEL
592 600
 
601
+// The Panucatt Devices Viki 2.0 and mini Viki with Graphic LCD
602
+// http://panucatt.com
603
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
604
+//#define VIKI2
605
+//#define miniVIKI
606
+
593 607
 // The RepRapDiscount Smart Controller (white PCB)
594 608
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
595 609
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER
@@ -623,6 +637,26 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
623 637
  #define DEFAULT_LCD_CONTRAST 17
624 638
 #endif
625 639
 
640
+#if defined(miniVIKI) || defined(VIKI2)
641
+ #define ULTRA_LCD  //general LCD support, also 16x2
642
+ #define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
643
+ #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
644
+ 
645
+  #ifdef miniVIKI
646
+   #define DEFAULT_LCD_CONTRAST 95
647
+  #else
648
+   #define DEFAULT_LCD_CONTRAST 40
649
+  #endif
650
+  
651
+ #define ENCODER_PULSES_PER_STEP 4
652
+ #define ENCODER_STEPS_PER_MENU_ITEM 1
653
+#endif
654
+
655
+#if defined (PANEL_ONE)
656
+ #define SDSUPPORT
657
+ #define ULTIMAKERCONTROLLER
658
+#endif
659
+
626 660
 #if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
627 661
  #define DOGLCD
628 662
  #define U8GLIB_ST7920

+ 17
- 0
Marlin/example_configurations/SCARA/Configuration_adv.h ファイルの表示

@@ -78,6 +78,7 @@
78 78
 #define EXTRUDER_0_AUTO_FAN_PIN   -1
79 79
 #define EXTRUDER_1_AUTO_FAN_PIN   -1
80 80
 #define EXTRUDER_2_AUTO_FAN_PIN   -1
81
+#define EXTRUDER_3_AUTO_FAN_PIN   -1
81 82
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
82 83
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
83 84
 
@@ -286,6 +287,11 @@
286 287
 //=============================Additional Features===========================
287 288
 //===========================================================================
288 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
+
289 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/
290 296
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
291 297
 
@@ -478,6 +484,10 @@ const unsigned int dropsegments=5; //everything with less than this number of st
478 484
   #define THERMISTORHEATER_2 TEMP_SENSOR_2
479 485
   #define HEATER_2_USES_THERMISTOR
480 486
 #endif
487
+#if TEMP_SENSOR_3 > 0
488
+  #define THERMISTORHEATER_3 TEMP_SENSOR_3
489
+  #define HEATER_3_USES_THERMISTOR
490
+#endif
481 491
 #if TEMP_SENSOR_BED > 0
482 492
   #define THERMISTORBED TEMP_SENSOR_BED
483 493
   #define BED_USES_THERMISTOR
@@ -491,6 +501,9 @@ const unsigned int dropsegments=5; //everything with less than this number of st
491 501
 #if TEMP_SENSOR_2 == -1
492 502
   #define HEATER_2_USES_AD595
493 503
 #endif
504
+#if TEMP_SENSOR_3 == -1
505
+  #define HEATER_3_USES_AD595
506
+#endif
494 507
 #if TEMP_SENSOR_BED == -1
495 508
   #define BED_USES_AD595
496 509
 #endif
@@ -509,6 +522,10 @@ const unsigned int dropsegments=5; //everything with less than this number of st
509 522
   #undef HEATER_2_MINTEMP
510 523
   #undef HEATER_2_MAXTEMP
511 524
 #endif
525
+#if TEMP_SENSOR_3 == 0
526
+  #undef HEATER_3_MINTEMP
527
+  #undef HEATER_3_MAXTEMP
528
+#endif
512 529
 #if TEMP_SENSOR_BED == 0
513 530
   #undef BED_MINTEMP
514 531
   #undef BED_MAXTEMP

+ 37
- 3
Marlin/example_configurations/WITBOX/Configuration.h ファイルの表示

@@ -1,4 +1,4 @@
1
-#ifndef CONFIGURATION_H
1
+#ifndef CONFIGURATION_H
2 2
 #define CONFIGURATION_H
3 3
 
4 4
 #include "boards.h"
@@ -125,6 +125,7 @@ Here are some standard links for getting your machine calibrated:
125 125
 #define TEMP_SENSOR_0 1
126 126
 #define TEMP_SENSOR_1 0
127 127
 #define TEMP_SENSOR_2 0
128
+#define TEMP_SENSOR_3 0
128 129
 #define TEMP_SENSOR_BED 0
129 130
 
130 131
 // This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted.
@@ -142,6 +143,7 @@ Here are some standard links for getting your machine calibrated:
142 143
 #define HEATER_0_MINTEMP 5
143 144
 #define HEATER_1_MINTEMP 5
144 145
 #define HEATER_2_MINTEMP 5
146
+#define HEATER_3_MINTEMP 5
145 147
 #define BED_MINTEMP 5
146 148
 
147 149
 // When temperature exceeds max temp, your heater will be switched off.
@@ -150,6 +152,7 @@ Here are some standard links for getting your machine calibrated:
150 152
 #define HEATER_0_MAXTEMP 260
151 153
 #define HEATER_1_MAXTEMP 260
152 154
 #define HEATER_2_MAXTEMP 260
155
+#define HEATER_3_MAXTEMP 260
153 156
 #define BED_MAXTEMP 150
154 157
 
155 158
 // If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
@@ -351,12 +354,13 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
351 354
 #define DISABLE_E false // For all extruders
352 355
 #define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
353 356
 
354
-#define INVERT_X_DIR true    // for Mendel set to false, for Orca set to true
357
+#define INVERT_X_DIR true     // for Mendel set to false, for Orca set to true
355 358
 #define INVERT_Y_DIR false    // for Mendel set to true, for Orca set to false
356 359
 #define INVERT_Z_DIR true     // for Mendel set to false, for Orca set to true
357 360
 #define INVERT_E0_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
358
-#define INVERT_E1_DIR false    // for direct drive extruder v9 set to true, for geared extruder set to false
361
+#define INVERT_E1_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
359 362
 #define INVERT_E2_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
363
+#define INVERT_E3_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
360 364
 
361 365
 // ENDSTOP SETTINGS:
362 366
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
@@ -587,10 +591,20 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
587 591
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
588 592
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
589 593
 
594
+// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
595
+// http://reprap.org/wiki/PanelOne
596
+//#define PANEL_ONE
597
+
590 598
 // The MaKr3d Makr-Panel with graphic controller and SD support
591 599
 // http://reprap.org/wiki/MaKr3d_MaKrPanel
592 600
 //#define MAKRPANEL
593 601
 
602
+// The Panucatt Devices Viki 2.0 and mini Viki with Graphic LCD
603
+// http://panucatt.com
604
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
605
+//#define VIKI2
606
+//#define miniVIKI
607
+
594 608
 // The RepRapDiscount Smart Controller (white PCB)
595 609
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
596 610
 #define REPRAP_DISCOUNT_SMART_CONTROLLER
@@ -624,6 +638,26 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
624 638
  #define DEFAULT_LCD_CONTRAST 17
625 639
 #endif
626 640
 
641
+#if defined(miniVIKI) || defined(VIKI2)
642
+ #define ULTRA_LCD  //general LCD support, also 16x2
643
+ #define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
644
+ #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
645
+ 
646
+  #ifdef miniVIKI
647
+   #define DEFAULT_LCD_CONTRAST 95
648
+  #else
649
+   #define DEFAULT_LCD_CONTRAST 40
650
+  #endif
651
+  
652
+ #define ENCODER_PULSES_PER_STEP 4
653
+ #define ENCODER_STEPS_PER_MENU_ITEM 1
654
+#endif
655
+
656
+#if defined (PANEL_ONE)
657
+ #define SDSUPPORT
658
+ #define ULTIMAKERCONTROLLER
659
+#endif
660
+
627 661
 #if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
628 662
  #define DOGLCD
629 663
  #define U8GLIB_ST7920

+ 5
- 0
Marlin/example_configurations/WITBOX/Configuration_adv.h ファイルの表示

@@ -284,6 +284,11 @@
284 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 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 293
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
289 294
 

+ 36
- 2
Marlin/example_configurations/delta/Configuration.h ファイルの表示

@@ -1,4 +1,4 @@
1
-#ifndef CONFIGURATION_H
1
+#ifndef CONFIGURATION_H
2 2
 #define CONFIGURATION_H
3 3
 
4 4
 #include "boards.h"
@@ -147,6 +147,7 @@ Here are some standard links for getting your machine calibrated:
147 147
 #define TEMP_SENSOR_0 -1
148 148
 #define TEMP_SENSOR_1 -1
149 149
 #define TEMP_SENSOR_2 0
150
+#define TEMP_SENSOR_3 0
150 151
 #define TEMP_SENSOR_BED 0
151 152
 
152 153
 // This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted.
@@ -164,6 +165,7 @@ Here are some standard links for getting your machine calibrated:
164 165
 #define HEATER_0_MINTEMP 5
165 166
 #define HEATER_1_MINTEMP 5
166 167
 #define HEATER_2_MINTEMP 5
168
+#define HEATER_3_MINTEMP 5
167 169
 #define BED_MINTEMP 5
168 170
 
169 171
 // When temperature exceeds max temp, your heater will be switched off.
@@ -172,6 +174,7 @@ Here are some standard links for getting your machine calibrated:
172 174
 #define HEATER_0_MAXTEMP 275
173 175
 #define HEATER_1_MAXTEMP 275
174 176
 #define HEATER_2_MAXTEMP 275
177
+#define HEATER_3_MAXTEMP 275
175 178
 #define BED_MAXTEMP 150
176 179
 
177 180
 // If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
@@ -368,8 +371,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
368 371
 #define INVERT_Z_DIR false
369 372
 
370 373
 #define INVERT_E0_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
371
-#define INVERT_E1_DIR false    // for direct drive extruder v9 set to true, for geared extruder set to false
374
+#define INVERT_E1_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
372 375
 #define INVERT_E2_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
376
+#define INVERT_E3_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
373 377
 
374 378
 // ENDSTOP SETTINGS:
375 379
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
@@ -491,10 +495,20 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
491 495
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
492 496
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
493 497
 
498
+// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
499
+// http://reprap.org/wiki/PanelOne
500
+//#define PANEL_ONE
501
+
494 502
 // The MaKr3d Makr-Panel with graphic controller and SD support
495 503
 // http://reprap.org/wiki/MaKr3d_MaKrPanel
496 504
 //#define MAKRPANEL
497 505
 
506
+// The Panucatt Devices Viki 2.0 and mini Viki with Graphic LCD
507
+// http://panucatt.com
508
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
509
+//#define VIKI2
510
+//#define miniVIKI
511
+
498 512
 // The RepRapDiscount Smart Controller (white PCB)
499 513
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
500 514
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER
@@ -535,6 +549,26 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
535 549
  #define DEFAULT_LCD_CONTRAST 17
536 550
 #endif
537 551
 
552
+#if defined(miniVIKI) || defined(VIKI2)
553
+ #define ULTRA_LCD  //general LCD support, also 16x2
554
+ #define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
555
+ #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
556
+ 
557
+  #ifdef miniVIKI
558
+   #define DEFAULT_LCD_CONTRAST 95
559
+  #else
560
+   #define DEFAULT_LCD_CONTRAST 40
561
+  #endif
562
+  
563
+ #define ENCODER_PULSES_PER_STEP 4
564
+ #define ENCODER_STEPS_PER_MENU_ITEM 1
565
+#endif
566
+
567
+#if defined (PANEL_ONE)
568
+ #define SDSUPPORT
569
+ #define ULTIMAKERCONTROLLER
570
+#endif
571
+
538 572
 #if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
539 573
  #define DOGLCD
540 574
  #define U8GLIB_ST7920

+ 17
- 0
Marlin/example_configurations/delta/Configuration_adv.h ファイルの表示

@@ -78,6 +78,7 @@
78 78
 #define EXTRUDER_0_AUTO_FAN_PIN   -1
79 79
 #define EXTRUDER_1_AUTO_FAN_PIN   -1
80 80
 #define EXTRUDER_2_AUTO_FAN_PIN   -1
81
+#define EXTRUDER_3_AUTO_FAN_PIN   -1
81 82
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
82 83
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
83 84
 
@@ -278,6 +279,11 @@
278 279
 //=============================Additional Features===========================
279 280
 //===========================================================================
280 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
+
281 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/
282 288
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
283 289
 
@@ -472,6 +478,10 @@ const unsigned int dropsegments=5; //everything with less than this number of st
472 478
   #define THERMISTORHEATER_2 TEMP_SENSOR_2
473 479
   #define HEATER_2_USES_THERMISTOR
474 480
 #endif
481
+#if TEMP_SENSOR_3 > 0
482
+  #define THERMISTORHEATER_3 TEMP_SENSOR_3
483
+  #define HEATER_3_USES_THERMISTOR
484
+#endif
475 485
 #if TEMP_SENSOR_BED > 0
476 486
   #define THERMISTORBED TEMP_SENSOR_BED
477 487
   #define BED_USES_THERMISTOR
@@ -485,6 +495,9 @@ const unsigned int dropsegments=5; //everything with less than this number of st
485 495
 #if TEMP_SENSOR_2 == -1
486 496
   #define HEATER_2_USES_AD595
487 497
 #endif
498
+#if TEMP_SENSOR_3 == -1
499
+  #define HEATER_3_USES_AD595
500
+#endif
488 501
 #if TEMP_SENSOR_BED == -1
489 502
   #define BED_USES_AD595
490 503
 #endif
@@ -503,6 +516,10 @@ const unsigned int dropsegments=5; //everything with less than this number of st
503 516
   #undef HEATER_2_MINTEMP
504 517
   #undef HEATER_2_MAXTEMP
505 518
 #endif
519
+#if TEMP_SENSOR_3 == 0
520
+  #undef HEATER_3_MINTEMP
521
+  #undef HEATER_3_MAXTEMP
522
+#endif
506 523
 #if TEMP_SENSOR_BED == 0
507 524
   #undef BED_MINTEMP
508 525
   #undef BED_MAXTEMP

+ 37
- 3
Marlin/example_configurations/makibox/Configuration.h ファイルの表示

@@ -1,4 +1,4 @@
1
-#ifndef CONFIGURATION_H
1
+#ifndef CONFIGURATION_H
2 2
 #define CONFIGURATION_H
3 3
 
4 4
 #include "boards.h"
@@ -127,6 +127,7 @@ Here are some standard links for getting your machine calibrated:
127 127
 #define TEMP_SENSOR_0 1
128 128
 #define TEMP_SENSOR_1 0
129 129
 #define TEMP_SENSOR_2 0
130
+#define TEMP_SENSOR_3 0
130 131
 #define TEMP_SENSOR_BED 12
131 132
 
132 133
 // This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted.
@@ -144,6 +145,7 @@ Here are some standard links for getting your machine calibrated:
144 145
 #define HEATER_0_MINTEMP 5
145 146
 #define HEATER_1_MINTEMP 5
146 147
 #define HEATER_2_MINTEMP 5
148
+#define HEATER_3_MINTEMP 5
147 149
 #define BED_MINTEMP 5
148 150
 
149 151
 // When temperature exceeds max temp, your heater will be switched off.
@@ -152,6 +154,7 @@ Here are some standard links for getting your machine calibrated:
152 154
 #define HEATER_0_MAXTEMP 275
153 155
 #define HEATER_1_MAXTEMP 275
154 156
 #define HEATER_2_MAXTEMP 275
157
+#define HEATER_3_MAXTEMP 275
155 158
 #define BED_MAXTEMP 150
156 159
 
157 160
 // If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
@@ -352,9 +355,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
352 355
 #define INVERT_X_DIR false    // for Mendel set to false, for Orca set to true
353 356
 #define INVERT_Y_DIR false    // for Mendel set to true, for Orca set to false
354 357
 #define INVERT_Z_DIR false    // for Mendel set to false, for Orca set to true
355
-#define INVERT_E0_DIR true   // for direct drive extruder v9 set to true, for geared extruder set to false
356
-#define INVERT_E1_DIR false    // for direct drive extruder v9 set to true, for geared extruder set to false
358
+#define INVERT_E0_DIR true    // for direct drive extruder v9 set to true, for geared extruder set to false
359
+#define INVERT_E1_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
357 360
 #define INVERT_E2_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
361
+#define INVERT_E3_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
358 362
 
359 363
 // ENDSTOP SETTINGS:
360 364
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
@@ -561,10 +565,20 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
561 565
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
562 566
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
563 567
 
568
+// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
569
+// http://reprap.org/wiki/PanelOne
570
+//#define PANEL_ONE
571
+
564 572
 // The MaKr3d Makr-Panel with graphic controller and SD support
565 573
 // http://reprap.org/wiki/MaKr3d_MaKrPanel
566 574
 //#define MAKRPANEL
567 575
 
576
+// The Panucatt Devices Viki 2.0 and mini Viki with Graphic LCD
577
+// http://panucatt.com
578
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
579
+//#define VIKI2
580
+//#define miniVIKI
581
+
568 582
 // The RepRapDiscount Smart Controller (white PCB)
569 583
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
570 584
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER
@@ -598,6 +612,26 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
598 612
  #define DEFAULT_LCD_CONTRAST 17
599 613
 #endif
600 614
 
615
+#if defined(miniVIKI) || defined(VIKI2)
616
+ #define ULTRA_LCD  //general LCD support, also 16x2
617
+ #define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
618
+ #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
619
+ 
620
+  #ifdef miniVIKI
621
+   #define DEFAULT_LCD_CONTRAST 95
622
+  #else
623
+   #define DEFAULT_LCD_CONTRAST 40
624
+  #endif
625
+  
626
+ #define ENCODER_PULSES_PER_STEP 4
627
+ #define ENCODER_STEPS_PER_MENU_ITEM 1
628
+#endif
629
+
630
+#if defined (PANEL_ONE)
631
+ #define SDSUPPORT
632
+ #define ULTIMAKERCONTROLLER
633
+#endif
634
+
601 635
 #if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
602 636
  #define DOGLCD
603 637
  #define U8GLIB_ST7920

+ 17
- 0
Marlin/example_configurations/makibox/Configuration_adv.h ファイルの表示

@@ -78,6 +78,7 @@
78 78
 #define EXTRUDER_0_AUTO_FAN_PIN   -1
79 79
 #define EXTRUDER_1_AUTO_FAN_PIN   -1
80 80
 #define EXTRUDER_2_AUTO_FAN_PIN   -1
81
+#define EXTRUDER_3_AUTO_FAN_PIN   -1
81 82
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
82 83
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
83 84
 
@@ -282,6 +283,11 @@
282 283
 //=============================Additional Features===========================
283 284
 //===========================================================================
284 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
+
285 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/
286 292
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
287 293
 
@@ -469,6 +475,10 @@ const unsigned int dropsegments=5; //everything with less than this number of st
469 475
   #define THERMISTORHEATER_2 TEMP_SENSOR_2
470 476
   #define HEATER_2_USES_THERMISTOR
471 477
 #endif
478
+#if TEMP_SENSOR_3 > 0
479
+  #define THERMISTORHEATER_3 TEMP_SENSOR_3
480
+  #define HEATER_3_USES_THERMISTOR
481
+#endif
472 482
 #if TEMP_SENSOR_BED > 0
473 483
   #define THERMISTORBED TEMP_SENSOR_BED
474 484
   #define BED_USES_THERMISTOR
@@ -482,6 +492,9 @@ const unsigned int dropsegments=5; //everything with less than this number of st
482 492
 #if TEMP_SENSOR_2 == -1
483 493
   #define HEATER_2_USES_AD595
484 494
 #endif
495
+#if TEMP_SENSOR_3 == -1
496
+  #define HEATER_3_USES_AD595
497
+#endif
485 498
 #if TEMP_SENSOR_BED == -1
486 499
   #define BED_USES_AD595
487 500
 #endif
@@ -500,6 +513,10 @@ const unsigned int dropsegments=5; //everything with less than this number of st
500 513
   #undef HEATER_2_MINTEMP
501 514
   #undef HEATER_2_MAXTEMP
502 515
 #endif
516
+#if TEMP_SENSOR_3 == 0
517
+  #undef HEATER_3_MINTEMP
518
+  #undef HEATER_3_MAXTEMP
519
+#endif
503 520
 #if TEMP_SENSOR_BED == 0
504 521
   #undef BED_MINTEMP
505 522
   #undef BED_MAXTEMP

+ 38
- 4
Marlin/example_configurations/tvrrug/Round2/Configuration.h ファイルの表示

@@ -1,4 +1,4 @@
1
-#ifndef CONFIGURATION_H
1
+#ifndef CONFIGURATION_H
2 2
 #define CONFIGURATION_H
3 3
 
4 4
 #include "boards.h"
@@ -126,6 +126,7 @@ Here are some standard links for getting your machine calibrated:
126 126
 #define TEMP_SENSOR_0 5
127 127
 #define TEMP_SENSOR_1 0
128 128
 #define TEMP_SENSOR_2 0
129
+#define TEMP_SENSOR_3 0
129 130
 #define TEMP_SENSOR_BED 5
130 131
 
131 132
 // This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted.
@@ -143,6 +144,7 @@ Here are some standard links for getting your machine calibrated:
143 144
 #define HEATER_0_MINTEMP 5
144 145
 #define HEATER_1_MINTEMP 5
145 146
 #define HEATER_2_MINTEMP 5
147
+#define HEATER_3_MINTEMP 5
146 148
 #define BED_MINTEMP 5
147 149
 
148 150
 // When temperature exceeds max temp, your heater will be switched off.
@@ -151,6 +153,7 @@ Here are some standard links for getting your machine calibrated:
151 153
 #define HEATER_0_MAXTEMP 275
152 154
 #define HEATER_1_MAXTEMP 275
153 155
 #define HEATER_2_MAXTEMP 275
156
+#define HEATER_3_MAXTEMP 275
154 157
 #define BED_MAXTEMP 150
155 158
 
156 159
 #define CONFIG_STEPPERS_TOSHIBA	1
@@ -353,11 +356,12 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
353 356
 #define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
354 357
 
355 358
 #define INVERT_X_DIR false    // for Mendel set to false, for Orca set to true
356
-#define INVERT_Y_DIR true    // for Mendel set to true, for Orca set to false
357
-#define INVERT_Z_DIR false     // for Mendel set to false, for Orca set to true
359
+#define INVERT_Y_DIR true     // for Mendel set to true, for Orca set to false
360
+#define INVERT_Z_DIR false    // for Mendel set to false, for Orca set to true
358 361
 #define INVERT_E0_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
359
-#define INVERT_E1_DIR false    // for direct drive extruder v9 set to true, for geared extruder set to false
362
+#define INVERT_E1_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
360 363
 #define INVERT_E2_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
364
+#define INVERT_E3_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
361 365
 
362 366
 // ENDSTOP SETTINGS:
363 367
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
@@ -574,10 +578,20 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
574 578
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
575 579
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
576 580
 
581
+// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
582
+// http://reprap.org/wiki/PanelOne
583
+//#define PANEL_ONE
584
+
577 585
 // The MaKr3d Makr-Panel with graphic controller and SD support
578 586
 // http://reprap.org/wiki/MaKr3d_MaKrPanel
579 587
 //#define MAKRPANEL
580 588
 
589
+// The Panucatt Devices Viki 2.0 and mini Viki with Graphic LCD
590
+// http://panucatt.com
591
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
592
+//#define VIKI2
593
+//#define miniVIKI
594
+
581 595
 // The RepRapDiscount Smart Controller (white PCB)
582 596
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
583 597
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER
@@ -611,6 +625,26 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
611 625
  #define DEFAULT_LCD_CONTRAST 17
612 626
 #endif
613 627
 
628
+#if defined(miniVIKI) || defined(VIKI2)
629
+ #define ULTRA_LCD  //general LCD support, also 16x2
630
+ #define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
631
+ #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
632
+ 
633
+  #ifdef miniVIKI
634
+   #define DEFAULT_LCD_CONTRAST 95
635
+  #else
636
+   #define DEFAULT_LCD_CONTRAST 40
637
+  #endif
638
+  
639
+ #define ENCODER_PULSES_PER_STEP 4
640
+ #define ENCODER_STEPS_PER_MENU_ITEM 1
641
+#endif
642
+
643
+#if defined (PANEL_ONE)
644
+ #define SDSUPPORT
645
+ #define ULTIMAKERCONTROLLER
646
+#endif
647
+
614 648
 #if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
615 649
  #define DOGLCD
616 650
  #define U8GLIB_ST7920

+ 17
- 0
Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h ファイルの表示

@@ -78,6 +78,7 @@
78 78
 #define EXTRUDER_0_AUTO_FAN_PIN   -1
79 79
 #define EXTRUDER_1_AUTO_FAN_PIN   -1
80 80
 #define EXTRUDER_2_AUTO_FAN_PIN   -1
81
+#define EXTRUDER_3_AUTO_FAN_PIN   -1
81 82
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
82 83
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
83 84
 
@@ -283,6 +284,11 @@
283 284
 //=============================Additional Features===========================
284 285
 //===========================================================================
285 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
+
286 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/
287 293
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
288 294
 
@@ -472,6 +478,10 @@ const unsigned int dropsegments=5; //everything with less than this number of st
472 478
   #define THERMISTORHEATER_2 TEMP_SENSOR_2
473 479
   #define HEATER_2_USES_THERMISTOR
474 480
 #endif
481
+#if TEMP_SENSOR_3 > 0
482
+  #define THERMISTORHEATER_3 TEMP_SENSOR_3
483
+  #define HEATER_3_USES_THERMISTOR
484
+#endif
475 485
 #if TEMP_SENSOR_BED > 0
476 486
   #define THERMISTORBED TEMP_SENSOR_BED
477 487
   #define BED_USES_THERMISTOR
@@ -485,6 +495,9 @@ const unsigned int dropsegments=5; //everything with less than this number of st
485 495
 #if TEMP_SENSOR_2 == -1
486 496
   #define HEATER_2_USES_AD595
487 497
 #endif
498
+#if TEMP_SENSOR_3 == -1
499
+  #define HEATER_3_USES_AD595
500
+#endif
488 501
 #if TEMP_SENSOR_BED == -1
489 502
   #define BED_USES_AD595
490 503
 #endif
@@ -503,6 +516,10 @@ const unsigned int dropsegments=5; //everything with less than this number of st
503 516
   #undef HEATER_2_MINTEMP
504 517
   #undef HEATER_2_MAXTEMP
505 518
 #endif
519
+#if TEMP_SENSOR_3 == 0
520
+  #undef HEATER_3_MINTEMP
521
+  #undef HEATER_3_MAXTEMP
522
+#endif
506 523
 #if TEMP_SENSOR_BED == 0
507 524
   #undef BED_MINTEMP
508 525
   #undef BED_MAXTEMP

+ 3
- 0
Marlin/fastio.h ファイルの表示

@@ -83,6 +83,9 @@
83 83
 /// check if pin is an timer wrapper
84 84
 #define GET_TIMER(IO)  _GET_TIMER(IO)
85 85
 
86
+// Shorthand
87
+#define OUT_WRITE(IO, v) { SET_OUTPUT(IO); WRITE(IO, v); }
88
+
86 89
 /*
87 90
 	ports and functions
88 91
 

+ 39
- 0
Marlin/language.h ファイルの表示

@@ -121,6 +121,7 @@
121 121
 #define MSG_UNKNOWN_COMMAND                 "Unknown command: \""
122 122
 #define MSG_ACTIVE_EXTRUDER                 "Active Extruder: "
123 123
 #define MSG_INVALID_EXTRUDER                "Invalid extruder"
124
+#define MSG_INVALID_SOLENOID                "Invalid solenoid"
124 125
 #define MSG_X_MIN                           "x_min: "
125 126
 #define MSG_X_MAX                           "x_max: "
126 127
 #define MSG_Y_MIN                           "y_min: "
@@ -159,6 +160,43 @@
159 160
 
160 161
 #define MSG_ERR_EEPROM_WRITE                "Error writing to EEPROM!"
161 162
 
163
+// temperature.cpp strings
164
+#define MSG_PID_AUTOTUNE                    "PID Autotune"
165
+#define MSG_PID_AUTOTUNE_START              MSG_PID_AUTOTUNE " start"
166
+#define MSG_PID_AUTOTUNE_FAILED             MSG_PID_AUTOTUNE " failed!"
167
+#define MSG_PID_BAD_EXTRUDER_NUM            MSG_PID_AUTOTUNE_FAILED " Bad extruder number"
168
+#define MSG_PID_TEMP_TOO_HIGH               MSG_PID_AUTOTUNE_FAILED " Temperature too high"
169
+#define MSG_PID_TIMEOUT                     MSG_PID_AUTOTUNE_FAILED " timeout"
170
+#define MSG_BIAS                            " bias: "
171
+#define MSG_D                               " d: "
172
+#define MSG_MIN                             " min: "
173
+#define MSG_MAX                             " max: "
174
+#define MSG_KU                              " Ku: "
175
+#define MSG_TU                              " Tu: "
176
+#define MSG_CLASSIC_PID                     " Classic PID "
177
+#define MSG_KP                              " Kp: "
178
+#define MSG_KI                              " Ki: "
179
+#define MSG_KD                              " Kd: "
180
+#define MSG_OK_B                            "ok B:"
181
+#define MSG_OK_T                            "ok T:"
182
+#define MSG_AT                              " @:"
183
+#define MSG_PID_AUTOTUNE_FINISHED           MSG_PID_AUTOTUNE " finished! Put the last Kp, Ki and Kd constants from above into Configuration.h"
184
+#define MSG_PID_DEBUG                       " PID_DEBUG "
185
+#define MSG_PID_DEBUG_INPUT                 ": Input "
186
+#define MSG_PID_DEBUG_OUTPUT                " Output "
187
+#define MSG_PID_DEBUG_PTERM                 " pTerm "
188
+#define MSG_PID_DEBUG_ITERM                 " iTerm "
189
+#define MSG_PID_DEBUG_DTERM                 " dTerm "
190
+#define MSG_HEATING_FAILED                  "Heating failed"
191
+#define MSG_EXTRUDER_SWITCHED_OFF           "Extruder switched off. Temperature difference between temp sensors is too high !"
192
+
193
+#define MSG_INVALID_EXTRUDER_NUM            " - Invalid extruder number !"
194
+#define MSG_THERMAL_RUNAWAY_STOP            "Thermal Runaway, system stopped! Heater_ID: "
195
+#define MSG_SWITCHED_OFF_MAX                " switched off. MAXTEMP triggered !!"
196
+#define MSG_MINTEMP_EXTRUDER_OFF            ": Extruder switched off. MINTEMP triggered !"
197
+#define MSG_MAXTEMP_EXTRUDER_OFF            ": Extruder" MSG_SWITCHED_OFF_MAX
198
+#define MSG_MAXTEMP_BED_OFF                 "Heated bed" MSG_SWITCHED_OFF_MAX
199
+
162 200
 // LCD Menu Messages
163 201
 
164 202
 // Add your own character. Reference: https://github.com/MarlinFirmware/Marlin/pull/1434 photos
@@ -223,5 +261,6 @@
223 261
 */
224 262
 
225 263
 #include LANGUAGE_INCLUDE
264
+#include "language_en.h"
226 265
 
227 266
 #endif //__LANGUAGE_H

+ 298
- 6
Marlin/language_en.h ファイルの表示

@@ -8,124 +8,416 @@
8 8
 #ifndef LANGUAGE_EN_H
9 9
 #define LANGUAGE_EN_H
10 10
 
11
+#ifndef WELCOME_MSG
11 12
 #define WELCOME_MSG                         MACHINE_NAME " ready."
13
+#endif
14
+#ifndef MSG_SD_INSERTED
12 15
 #define MSG_SD_INSERTED                     "Card inserted"
16
+#endif
17
+#ifndef MSG_SD_REMOVED
13 18
 #define MSG_SD_REMOVED                      "Card removed"
19
+#endif
20
+#ifndef MSG_MAIN
14 21
 #define MSG_MAIN                            "Main"
22
+#endif
23
+#ifndef MSG_AUTOSTART
15 24
 #define MSG_AUTOSTART                       "Autostart"
25
+#endif
26
+#ifndef MSG_DISABLE_STEPPERS
16 27
 #define MSG_DISABLE_STEPPERS                "Disable steppers"
28
+#endif
29
+#ifndef MSG_AUTO_HOME
17 30
 #define MSG_AUTO_HOME                       "Auto home"
31
+#endif
32
+#ifndef MSG_SET_HOME_OFFSETS
18 33
 #define MSG_SET_HOME_OFFSETS                "Set home offsets"
34
+#endif
35
+#ifndef MSG_SET_ORIGIN
19 36
 #define MSG_SET_ORIGIN                      "Set origin"
37
+#endif
38
+#ifndef MSG_PREHEAT_PLA
20 39
 #define MSG_PREHEAT_PLA                     "Preheat PLA"
40
+#endif
41
+#ifndef MSG_PREHEAT_PLA_N
21 42
 #define MSG_PREHEAT_PLA_N                   MSG_PREHEAT_PLA " "
43
+#endif
44
+#ifndef MSG_PREHEAT_PLA_ALL
22 45
 #define MSG_PREHEAT_PLA_ALL                 MSG_PREHEAT_PLA " All"
46
+#endif
47
+#ifndef MSG_PREHEAT_PLA_BEDONLY
23 48
 #define MSG_PREHEAT_PLA_BEDONLY             MSG_PREHEAT_PLA " Bed"
49
+#endif
50
+#ifndef MSG_PREHEAT_PLA_SETTINGS
24 51
 #define MSG_PREHEAT_PLA_SETTINGS            MSG_PREHEAT_PLA " conf"
52
+#endif
53
+#ifndef MSG_PREHEAT_ABS
25 54
 #define MSG_PREHEAT_ABS                     "Preheat ABS"
55
+#endif
56
+#ifndef MSG_PREHEAT_ABS_N
26 57
 #define MSG_PREHEAT_ABS_N                   MSG_PREHEAT_ABS " "
58
+#endif
59
+#ifndef MSG_PREHEAT_ABS_ALL
27 60
 #define MSG_PREHEAT_ABS_ALL                 MSG_PREHEAT_ABS " All"
61
+#endif
62
+#ifndef MSG_PREHEAT_ABS_BEDONLY
28 63
 #define MSG_PREHEAT_ABS_BEDONLY             MSG_PREHEAT_ABS " Bed"
64
+#endif
65
+#ifndef MSG_PREHEAT_ABS_SETTINGS
29 66
 #define MSG_PREHEAT_ABS_SETTINGS            MSG_PREHEAT_ABS " conf"
67
+#endif
68
+#ifndef MSG_H1
69
+#define MSG_H1                              "1"
70
+#endif
71
+#ifndef MSG_H2
72
+#define MSG_H2                              "2"
73
+#endif
74
+#ifndef MSG_H3
75
+#define MSG_H3                              "3"
76
+#endif
77
+#ifndef MSG_H4
78
+#define MSG_H4                              "4"
79
+#endif
80
+#ifndef MSG_COOLDOWN
30 81
 #define MSG_COOLDOWN                        "Cooldown"
82
+#endif
83
+#ifndef MSG_SWITCH_PS_ON
31 84
 #define MSG_SWITCH_PS_ON                    "Switch power on"
85
+#endif
86
+#ifndef MSG_SWITCH_PS_OFF
32 87
 #define MSG_SWITCH_PS_OFF                   "Switch power off"
88
+#endif
89
+#ifndef MSG_EXTRUDE
33 90
 #define MSG_EXTRUDE                         "Extrude"
91
+#endif
92
+#ifndef MSG_RETRACT
34 93
 #define MSG_RETRACT                         "Retract"
94
+#endif
95
+#ifndef MSG_MOVE_AXIS
35 96
 #define MSG_MOVE_AXIS                       "Move axis"
97
+#endif
98
+#ifndef MSG_MOVE_X
36 99
 #define MSG_MOVE_X                          "Move X"
100
+#endif
101
+#ifndef MSG_MOVE_Y
37 102
 #define MSG_MOVE_Y                          "Move Y"
103
+#endif
104
+#ifndef MSG_MOVE_Z
38 105
 #define MSG_MOVE_Z                          "Move Z"
106
+#endif
107
+#ifndef MSG_MOVE_E
39 108
 #define MSG_MOVE_E                          "Extruder"
109
+#endif
110
+#ifndef MSG_MOVE_01MM
40 111
 #define MSG_MOVE_01MM                       "Move 0.1mm"
112
+#endif
113
+#ifndef MSG_MOVE_1MM
41 114
 #define MSG_MOVE_1MM                        "Move 1mm"
115
+#endif
116
+#ifndef MSG_MOVE_10MM
42 117
 #define MSG_MOVE_10MM                       "Move 10mm"
118
+#endif
119
+#ifndef MSG_SPEED
43 120
 #define MSG_SPEED                           "Speed"
121
+#endif
122
+#ifndef MSG_NOZZLE
44 123
 #define MSG_NOZZLE                          "Nozzle"
124
+#endif
125
+#ifndef MSG_N2
126
+#define MSG_N2                              " 2"
127
+#endif
128
+#ifndef MSG_N3
129
+#define MSG_N3                              " 3"
130
+#endif
131
+#ifndef MSG_N4
132
+#define MSG_N4                              " 4"
133
+#endif
134
+#ifndef MSG_BED
45 135
 #define MSG_BED                             "Bed"
136
+#endif
137
+#ifndef MSG_FAN_SPEED
46 138
 #define MSG_FAN_SPEED                       "Fan speed"
139
+#endif
140
+#ifndef MSG_FLOW
47 141
 #define MSG_FLOW                            "Flow"
142
+#endif
143
+#ifndef MSG_F0
144
+#define MSG_F0                              " 0"
145
+#endif
146
+#ifndef MSG_F1
147
+#define MSG_F1                              " 1"
148
+#endif
149
+#ifndef MSG_F2
150
+#define MSG_F2                              " 2"
151
+#endif
152
+#ifndef MSG_F3
153
+#define MSG_F3                              " 3"
154
+#endif
155
+#ifndef MSG_CONTROL
48 156
 #define MSG_CONTROL                         "Control"
157
+#endif
158
+#ifndef MSG_MIN
49 159
 #define MSG_MIN                             " " STR_THERMOMETER " Min"
160
+#endif
161
+#ifndef MSG_MAX
50 162
 #define MSG_MAX                             " " STR_THERMOMETER " Max"
163
+#endif
164
+#ifndef MSG_FACTOR
51 165
 #define MSG_FACTOR                          " " STR_THERMOMETER " Fact"
166
+#endif
167
+#ifndef MSG_AUTOTEMP
52 168
 #define MSG_AUTOTEMP                        "Autotemp"
169
+#endif
170
+#ifndef MSG_ON
53 171
 #define MSG_ON                              "On "
172
+#endif
173
+#ifndef MSG_OFF
54 174
 #define MSG_OFF                             "Off"
175
+#endif
176
+#ifndef MSG_PID_P
55 177
 #define MSG_PID_P                           "PID-P"
178
+#endif
179
+#ifndef MSG_PID_I
56 180
 #define MSG_PID_I                           "PID-I"
181
+#endif
182
+#ifndef MSG_PID_D
57 183
 #define MSG_PID_D                           "PID-D"
184
+#endif
185
+#ifndef MSG_PID_C
58 186
 #define MSG_PID_C                           "PID-C"
187
+#endif
188
+#ifndef MSG_E2
189
+#define MSG_E2                              " E2"
190
+#endif
191
+#ifndef MSG_E3
192
+#define MSG_E3                              " E3"
193
+#endif
194
+#ifndef MSG_E4
195
+#define MSG_E4                              " E4"
196
+#endif
197
+#ifndef MSG_ACC
59 198
 #define MSG_ACC                             "Accel"
199
+#endif
200
+#ifndef MSG_VXY_JERK
60 201
 #define MSG_VXY_JERK                        "Vxy-jerk"
202
+#endif
203
+#ifndef MSG_VZ_JERK
61 204
 #define MSG_VZ_JERK                         "Vz-jerk"
205
+#endif
206
+#ifndef MSG_VE_JERK
62 207
 #define MSG_VE_JERK                         "Ve-jerk"
208
+#endif
209
+#ifndef MSG_VMAX
63 210
 #define MSG_VMAX                            "Vmax "
211
+#endif
212
+#ifndef MSG_X
64 213
 #define MSG_X                               "x"
214
+#endif
215
+#ifndef MSG_Y
65 216
 #define MSG_Y                               "y"
217
+#endif
218
+#ifndef MSG_Z
66 219
 #define MSG_Z                               "z"
220
+#endif
221
+#ifndef MSG_E
67 222
 #define MSG_E                               "e"
223
+#endif
224
+#ifndef MSG_VMIN
68 225
 #define MSG_VMIN                            "Vmin"
226
+#endif
227
+#ifndef MSG_VTRAV_MIN
69 228
 #define MSG_VTRAV_MIN                       "VTrav min"
229
+#endif
230
+#ifndef MSG_AMAX
70 231
 #define MSG_AMAX                            "Amax "
232
+#endif
233
+#ifndef MSG_A_RETRACT
71 234
 #define MSG_A_RETRACT                       "A-retract"
235
+#endif
236
+#ifndef MSG_XSTEPS
72 237
 #define MSG_XSTEPS                          "Xsteps/mm"
238
+#endif
239
+#ifndef MSG_YSTEPS
73 240
 #define MSG_YSTEPS                          "Ysteps/mm"
241
+#endif
242
+#ifndef MSG_ZSTEPS
74 243
 #define MSG_ZSTEPS                          "Zsteps/mm"
244
+#endif
245
+#ifndef MSG_ESTEPS
75 246
 #define MSG_ESTEPS                          "Esteps/mm"
247
+#endif
248
+#ifndef MSG_TEMPERATURE
76 249
 #define MSG_TEMPERATURE                     "Temperature"
250
+#endif
251
+#ifndef MSG_MOTION
77 252
 #define MSG_MOTION                          "Motion"
253
+#endif
254
+#ifndef MSG_VOLUMETRIC
78 255
 #define MSG_VOLUMETRIC                      "Filament"
79
-#define MSG_VOLUMETRIC_ENABLED		          "E in mm" STR_h3
256
+#endif
257
+#ifndef MSG_VOLUMETRIC_ENABLED
258
+#define MSG_VOLUMETRIC_ENABLED              "E in mm" STR_h3
259
+#endif
260
+#ifndef MSG_FILAMENT_SIZE_EXTRUDER_0
80 261
 #define MSG_FILAMENT_SIZE_EXTRUDER_0        "Fil. Dia. 1"
262
+#endif
263
+#ifndef MSG_FILAMENT_SIZE_EXTRUDER_1
81 264
 #define MSG_FILAMENT_SIZE_EXTRUDER_1        "Fil. Dia. 2"
265
+#endif
266
+#ifndef MSG_FILAMENT_SIZE_EXTRUDER_2
82 267
 #define MSG_FILAMENT_SIZE_EXTRUDER_2        "Fil. Dia. 3"
268
+#endif
269
+#ifndef MSG_FILAMENT_SIZE_EXTRUDER_3
83 270
 #define MSG_FILAMENT_SIZE_EXTRUDER_3        "Fil. Dia. 4"
271
+#endif
272
+#ifndef MSG_CONTRAST
84 273
 #define MSG_CONTRAST                        "LCD contrast"
274
+#endif
275
+#ifndef MSG_STORE_EPROM
85 276
 #define MSG_STORE_EPROM                     "Store memory"
277
+#endif
278
+#ifndef MSG_LOAD_EPROM
86 279
 #define MSG_LOAD_EPROM                      "Load memory"
280
+#endif
281
+#ifndef MSG_RESTORE_FAILSAFE
87 282
 #define MSG_RESTORE_FAILSAFE                "Restore failsafe"
283
+#endif
284
+#ifndef MSG_REFRESH
88 285
 #define MSG_REFRESH                         "Refresh"
286
+#endif
287
+#ifndef MSG_WATCH
89 288
 #define MSG_WATCH                           "Info screen"
289
+#endif
290
+#ifndef MSG_PREPARE
90 291
 #define MSG_PREPARE                         "Prepare"
292
+#endif
293
+#ifndef MSG_TUNE
91 294
 #define MSG_TUNE                            "Tune"
295
+#endif
296
+#ifndef MSG_PAUSE_PRINT
92 297
 #define MSG_PAUSE_PRINT                     "Pause print"
298
+#endif
299
+#ifndef MSG_RESUME_PRINT
93 300
 #define MSG_RESUME_PRINT                    "Resume print"
301
+#endif
302
+#ifndef MSG_STOP_PRINT
94 303
 #define MSG_STOP_PRINT                      "Stop print"
304
+#endif
305
+#ifndef MSG_CARD_MENU
95 306
 #define MSG_CARD_MENU                       "Print from SD"
307
+#endif
308
+#ifndef MSG_NO_CARD
96 309
 #define MSG_NO_CARD                         "No SD card"
310
+#endif
311
+#ifndef MSG_DWELL
97 312
 #define MSG_DWELL                           "Sleep..."
313
+#endif
314
+#ifndef MSG_USERWAIT
98 315
 #define MSG_USERWAIT                        "Wait for user..."
316
+#endif
317
+#ifndef MSG_RESUMING
99 318
 #define MSG_RESUMING                        "Resuming print"
319
+#endif
320
+#ifndef MSG_PRINT_ABORTED
100 321
 #define MSG_PRINT_ABORTED                   "Print aborted"
322
+#endif
323
+#ifndef MSG_NO_MOVE
101 324
 #define MSG_NO_MOVE                         "No move."
325
+#endif
326
+#ifndef MSG_KILLED
102 327
 #define MSG_KILLED                          "KILLED. "
328
+#endif
329
+#ifndef MSG_STOPPED
103 330
 #define MSG_STOPPED                         "STOPPED. "
331
+#endif
332
+#ifndef MSG_CONTROL_RETRACT
104 333
 #define MSG_CONTROL_RETRACT                 "Retract mm"
334
+#endif
335
+#ifndef MSG_CONTROL_RETRACT_SWAP
105 336
 #define MSG_CONTROL_RETRACT_SWAP            "Swap Re.mm"
337
+#endif
338
+#ifndef MSG_CONTROL_RETRACTF
106 339
 #define MSG_CONTROL_RETRACTF                "Retract  V"
340
+#endif
341
+#ifndef MSG_CONTROL_RETRACT_ZLIFT
107 342
 #define MSG_CONTROL_RETRACT_ZLIFT           "Hop mm"
343
+#endif
344
+#ifndef MSG_CONTROL_RETRACT_RECOVER
108 345
 #define MSG_CONTROL_RETRACT_RECOVER         "UnRet +mm"
346
+#endif
347
+#ifndef MSG_CONTROL_RETRACT_RECOVER_SWAP
109 348
 #define MSG_CONTROL_RETRACT_RECOVER_SWAP    "S UnRet+mm"
349
+#endif
350
+#ifndef MSG_CONTROL_RETRACT_RECOVERF
110 351
 #define MSG_CONTROL_RETRACT_RECOVERF        "UnRet  V"
352
+#endif
353
+#ifndef MSG_AUTORETRACT
111 354
 #define MSG_AUTORETRACT                     "AutoRetr."
355
+#endif
356
+#ifndef MSG_FILAMENTCHANGE
112 357
 #define MSG_FILAMENTCHANGE                  "Change filament"
358
+#endif
359
+#ifndef MSG_INIT_SDCARD
113 360
 #define MSG_INIT_SDCARD                     "Init. SD card"
361
+#endif
362
+#ifndef MSG_CNG_SDCARD
114 363
 #define MSG_CNG_SDCARD                      "Change SD card"
364
+#endif
365
+#ifndef MSG_ZPROBE_OUT
115 366
 #define MSG_ZPROBE_OUT                      "Z probe out. bed"
367
+#endif
368
+#ifndef MSG_POSITION_UNKNOWN
116 369
 #define MSG_POSITION_UNKNOWN                "Home X/Y before Z"
370
+#endif
371
+#ifndef MSG_ZPROBE_ZOFFSET
117 372
 #define MSG_ZPROBE_ZOFFSET                  "Z Offset"
373
+#endif
374
+#ifndef MSG_BABYSTEP_X
118 375
 #define MSG_BABYSTEP_X                      "Babystep X"
376
+#endif
377
+#ifndef MSG_BABYSTEP_Y
119 378
 #define MSG_BABYSTEP_Y                      "Babystep Y"
379
+#endif
380
+#ifndef MSG_BABYSTEP_Z
120 381
 #define MSG_BABYSTEP_Z                      "Babystep Z"
382
+#endif
383
+#ifndef MSG_ENDSTOP_ABORT
121 384
 #define MSG_ENDSTOP_ABORT                   "Endstop abort"
385
+#endif
386
+#ifndef MSG_HEATING_FAILED_LCD
387
+#define MSG_HEATING_FAILED_LCD              "Heating failed"
388
+#endif
389
+#ifndef MSG_ERR_REDUNDANT_TEMP
390
+#define MSG_ERR_REDUNDANT_TEMP              "Err: REDUNDANT TEMP ERROR"
391
+#endif
392
+#ifndef MSG_THERMAL_RUNAWAY
393
+#define MSG_THERMAL_RUNAWAY                 "THERMAL RUNAWAY"
394
+#endif
395
+#ifndef MSG_ERR_MAXTEMP
396
+#define MSG_ERR_MAXTEMP                     "Err: MAXTEMP"
397
+#endif
398
+#ifndef MSG_ERR_MINTEMP
399
+#define MSG_ERR_MINTEMP                     "Err: MINTEMP"
400
+#endif
401
+#ifndef MSG_ERR_MAXTEMP_BED
402
+#define MSG_ERR_MAXTEMP_BED                 "Err: MAXTEMP BED"
403
+#endif
122 404
 
123 405
 #ifdef DELTA_CALIBRATION_MENU
124
-    #define MSG_DELTA_CALIBRATE             "Delta Calibration"
125
-    #define MSG_DELTA_CALIBRATE_X           "Calibrate X"
126
-    #define MSG_DELTA_CALIBRATE_Y           "Calibrate Y"
127
-    #define MSG_DELTA_CALIBRATE_Z           "Calibrate Z"
128
-    #define MSG_DELTA_CALIBRATE_CENTER      "Calibrate Center"
406
+  #ifndef MSG_DELTA_CALIBRATE
407
+  #define MSG_DELTA_CALIBRATE             "Delta Calibration"
408
+  #endif
409
+  #ifndef MSG_DELTA_CALIBRATE_X
410
+  #define MSG_DELTA_CALIBRATE_X           "Calibrate X"
411
+  #endif
412
+  #ifndef MSG_DELTA_CALIBRATE_Y
413
+  #define MSG_DELTA_CALIBRATE_Y           "Calibrate Y"
414
+  #endif
415
+  #ifndef MSG_DELTA_CALIBRATE_Z
416
+  #define MSG_DELTA_CALIBRATE_Z           "Calibrate Z"
417
+  #endif
418
+  #ifndef MSG_DELTA_CALIBRATE_CENTER
419
+  #define MSG_DELTA_CALIBRATE_CENTER      "Calibrate Center"
420
+  #endif
129 421
 #endif // DELTA_CALIBRATION_MENU
130 422
 
131 423
 #endif // LANGUAGE_EN_H

+ 38
- 38
Marlin/language_fi.h ファイルの表示

@@ -17,38 +17,38 @@
17 17
 #define MSG_AUTO_HOME                       "Aja referenssiin"
18 18
 #define MSG_SET_HOME_OFFSETS                "Set home offsets"
19 19
 #define MSG_SET_ORIGIN                      "Aseta origo"
20
-#define MSG_PREHEAT_PLA                     "Esilammita PLA"
21
-#define MSG_PREHEAT_PLA_N                   "Esilammita PLA "
22
-#define MSG_PREHEAT_PLA_ALL                 "Esila. PLA Kaikki"
23
-#define MSG_PREHEAT_PLA_BEDONLY             "Esila. PLA Alusta"
24
-#define MSG_PREHEAT_PLA_SETTINGS            "Esilamm. PLA konf"
25
-#define MSG_PREHEAT_ABS                     "Esilammita ABS"
26
-#define MSG_PREHEAT_ABS_N                   "Esilammita ABS "
27
-#define MSG_PREHEAT_ABS_ALL                 "Esila. ABS Kaikki"
28
-#define MSG_PREHEAT_ABS_BEDONLY             "Esila. ABS Alusta"
29
-#define MSG_PREHEAT_ABS_SETTINGS            "Esilamm. ABS konf"
30
-#define MSG_COOLDOWN                        "Jaahdyta"
31
-#define MSG_SWITCH_PS_ON                    "Virta paalle"
20
+#define MSG_PREHEAT_PLA                     "Esil" STR_ae "mmit" STR_ae " PLA"
21
+#define MSG_PREHEAT_PLA_N                   "Esil" STR_ae "mmit" STR_ae " PLA "
22
+#define MSG_PREHEAT_PLA_ALL                 "Esil" STR_ae ". PLA Kaikki"
23
+#define MSG_PREHEAT_PLA_BEDONLY             "Esil" STR_ae ". PLA Alusta"
24
+#define MSG_PREHEAT_PLA_SETTINGS            "Esil" STR_ae "mm. PLA konf"
25
+#define MSG_PREHEAT_ABS                     "Esil" STR_ae "mmit" STR_ae " ABS"
26
+#define MSG_PREHEAT_ABS_N                   "Esil" STR_ae "mmit" STR_ae " ABS "
27
+#define MSG_PREHEAT_ABS_ALL                 "Esil" STR_ae ". ABS Kaikki"
28
+#define MSG_PREHEAT_ABS_BEDONLY             "Esil" STR_ae ". ABS Alusta"
29
+#define MSG_PREHEAT_ABS_SETTINGS            "Esil" STR_ae "mm. ABS konf"
30
+#define MSG_COOLDOWN                        "J" STR_ae "" STR_ae "hdyt" STR_ae ""
31
+#define MSG_SWITCH_PS_ON                    "Virta p" STR_ae "" STR_ae "lle"
32 32
 #define MSG_SWITCH_PS_OFF                   "Virta pois"
33 33
 #define MSG_EXTRUDE                         "Pursota"
34
-#define MSG_RETRACT                         "Veda takaisin"
34
+#define MSG_RETRACT                         "Ved" STR_ae " takaisin"
35 35
 #define MSG_MOVE_AXIS                       "Liikuta akseleita"
36
-#define MSG_MOVE_X                          "Move X"
37
-#define MSG_MOVE_Y                          "Move Y"
38
-#define MSG_MOVE_Z                          "Move Z"
36
+#define MSG_MOVE_X                          "Liikuta X"
37
+#define MSG_MOVE_Y                          "Liikuta Y"
38
+#define MSG_MOVE_Z                          "Liikuta Z"
39 39
 #define MSG_MOVE_E                          "Extruder"
40
-#define MSG_MOVE_01MM                       "Move 0.1mm"
41
-#define MSG_MOVE_1MM                        "Move 1mm"
42
-#define MSG_MOVE_10MM                       "Move 10mm"
40
+#define MSG_MOVE_01MM                       "Liikuta 0.1mm"
41
+#define MSG_MOVE_1MM                        "Liikuta 1mm"
42
+#define MSG_MOVE_10MM                       "Liikuta 10mm"
43 43
 #define MSG_SPEED                           "Nopeus"
44 44
 #define MSG_NOZZLE                          "Suutin"
45 45
 #define MSG_BED                             "Alusta"
46 46
 #define MSG_FAN_SPEED                       "Tuul. nopeus"
47 47
 #define MSG_FLOW                            "Virtaus"
48 48
 #define MSG_CONTROL                         "Kontrolli"
49
-#define MSG_MIN                             " \002 Min"
50
-#define MSG_MAX                             " \002 Max"
51
-#define MSG_FACTOR                          " \002 Kerr"
49
+#define MSG_MIN                             STR_THERMOMETER " Min"
50
+#define MSG_MAX                             STR_THERMOMETER " Max"
51
+#define MSG_FACTOR                          STR_THERMOMETER " Kerr"
52 52
 #define MSG_AUTOTEMP                        "Autotemp"
53 53
 #define MSG_ON                              "On "
54 54
 #define MSG_OFF                             "Off"
@@ -73,24 +73,24 @@
73 73
 #define MSG_YSTEPS                          "Ysteps/mm"
74 74
 #define MSG_ZSTEPS                          "Zsteps/mm"
75 75
 #define MSG_ESTEPS                          "Esteps/mm"
76
-#define MSG_TEMPERATURE                     "Lampotila"
76
+#define MSG_TEMPERATURE                     "L" STR_ae "mp" STR_oe "tila"
77 77
 #define MSG_MOTION                          "Liike"
78 78
 #define MSG_VOLUMETRIC                      "Filament"
79
-#define MSG_VOLUMETRIC_ENABLED		        "E in mm3"
79
+#define MSG_VOLUMETRIC_ENABLED              "E in mm3"
80 80
 #define MSG_FILAMENT_SIZE_EXTRUDER_0        "Fil. Dia. 1"
81 81
 #define MSG_FILAMENT_SIZE_EXTRUDER_1        "Fil. Dia. 2"
82 82
 #define MSG_FILAMENT_SIZE_EXTRUDER_2        "Fil. Dia. 3"
83
-#define MSG_CONTRAST                        "LCD contrast"
83
+#define MSG_CONTRAST                        "LCD kontrasti"
84 84
 #define MSG_STORE_EPROM                     "Tallenna muistiin"
85 85
 #define MSG_LOAD_EPROM                      "Lataa muistista"
86 86
 #define MSG_RESTORE_FAILSAFE                "Palauta oletus"
87
-#define MSG_REFRESH                         "Paivita"
87
+#define MSG_REFRESH                         "P" STR_ae "ivit" STR_ae ""
88 88
 #define MSG_WATCH                           "Seuraa"
89 89
 #define MSG_PREPARE                         "Valmistele"
90
-#define MSG_TUNE                            "Saada"
91
-#define MSG_PAUSE_PRINT                     "Keskeyta tulostus"
90
+#define MSG_TUNE                            "S" STR_ae "" STR_ae "d" STR_ae ""
91
+#define MSG_PAUSE_PRINT                     "Keskeyt" STR_ae " tulostus"
92 92
 #define MSG_RESUME_PRINT                    "Jatka tulostusta"
93
-#define MSG_STOP_PRINT                      "Pysayta tulostus"
93
+#define MSG_STOP_PRINT                      "Pys" STR_ae "yt" STR_ae " tulostus"
94 94
 #define MSG_CARD_MENU                       "Korttivalikko"
95 95
 #define MSG_NO_CARD                         "Ei korttia"
96 96
 #define MSG_DWELL                           "Nukkumassa..."
@@ -100,9 +100,9 @@
100 100
 #define MSG_NO_MOVE                         "Ei liiketta."
101 101
 #define MSG_KILLED                          "KILLED. "
102 102
 #define MSG_STOPPED                         "STOPPED. "
103
-#define MSG_CONTROL_RETRACT                 "Veda mm"
104
-#define MSG_CONTROL_RETRACT_SWAP            "Va. Veda mm"
105
-#define MSG_CONTROL_RETRACTF                "Veda V"
103
+#define MSG_CONTROL_RETRACT                 "Ved" STR_ae " mm"
104
+#define MSG_CONTROL_RETRACT_SWAP            "Va. Ved" STR_ae " mm"
105
+#define MSG_CONTROL_RETRACTF                "Ved" STR_ae " V"
106 106
 #define MSG_CONTROL_RETRACT_ZLIFT           "Z mm"
107 107
 #define MSG_CONTROL_RETRACT_RECOVER         "UnRet +mm"
108 108
 #define MSG_CONTROL_RETRACT_RECOVER_SWAP    "Va. UnRet +mm"
@@ -120,11 +120,11 @@
120 120
 #define MSG_ENDSTOP_ABORT                   "Endstop abort"
121 121
 
122 122
 #ifdef DELTA_CALIBRATION_MENU
123
-    #define MSG_DELTA_CALIBRATE             "Delta Calibration"
124
-    #define MSG_DELTA_CALIBRATE_X           "Calibrate X"
125
-    #define MSG_DELTA_CALIBRATE_Y           "Calibrate Y"
126
-    #define MSG_DELTA_CALIBRATE_Z           "Calibrate Z"
127
-    #define MSG_DELTA_CALIBRATE_CENTER      "Calibrate Center"
123
+    #define MSG_DELTA_CALIBRATE             "Delta Kalibrointi"
124
+    #define MSG_DELTA_CALIBRATE_X           "Kalibroi X"
125
+    #define MSG_DELTA_CALIBRATE_Y           "Kalibroi Y"
126
+    #define MSG_DELTA_CALIBRATE_Z           "Kalibroi Z"
127
+    #define MSG_DELTA_CALIBRATE_CENTER      "Kalibroi Center"
128 128
 #endif // DELTA_CALIBRATION_MENU
129 129
 
130
-#endif // LANGUAGE_FI_H
130
+#endif // LANGUAGE_FI_H

+ 15
- 15
Marlin/language_ru.h ファイルの表示

@@ -13,7 +13,7 @@
13 13
 #define WELCOME_MSG                         MACHINE_NAME " Готов."
14 14
 #define MSG_SD_INSERTED                     "Карта вставлена"
15 15
 #define MSG_SD_REMOVED                      "Карта извлечена"
16
-#define MSG_MAIN                            "Меню \003"
16
+#define MSG_MAIN                            "Меню"
17 17
 #define MSG_AUTOSTART                       "Автостарт"
18 18
 #define MSG_DISABLE_STEPPERS                "Выкл. двигатели"
19 19
 #define MSG_AUTO_HOME                       "Парковка"
@@ -43,14 +43,14 @@
43 43
 #define MSG_MOVE_1MM                        "Move 1mm"
44 44
 #define MSG_MOVE_10MM                       "Move 10mm"
45 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 48
 #define MSG_FAN_SPEED                       "Куллер"
49 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 54
 #define MSG_AUTOTEMP                        "Autotemp"
55 55
 #define MSG_ON                              "Вкл. "
56 56
 #define MSG_OFF                             "Выкл. "
@@ -75,10 +75,10 @@
75 75
 #define MSG_YSTEPS                          "Y шаг/mm"
76 76
 #define MSG_ZSTEPS                          "Z шаг/mm"
77 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 80
 #define MSG_VOLUMETRIC                      "Filament"
81
-#define MSG_VOLUMETRIC_ENABLED		        "E in mm3"
81
+#define MSG_VOLUMETRIC_ENABLED		          "E in mm3"
82 82
 #define MSG_FILAMENT_SIZE_EXTRUDER_0        "Fil. Dia. 1"
83 83
 #define MSG_FILAMENT_SIZE_EXTRUDER_1        "Fil. Dia. 2"
84 84
 #define MSG_FILAMENT_SIZE_EXTRUDER_2        "Fil. Dia. 3"
@@ -86,14 +86,14 @@
86 86
 #define MSG_STORE_EPROM                     "Сохранить в EPROM"
87 87
 #define MSG_LOAD_EPROM                      "Загруз. из EPROM"
88 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 93
 #define MSG_PAUSE_PRINT                     "Продолжить печать"
94 94
 #define MSG_RESUME_PRINT                    "возобн. печать"
95 95
 #define MSG_STOP_PRINT                      "Остановить печать"
96
-#define MSG_CARD_MENU                       "Меню карты      \x7E"
96
+#define MSG_CARD_MENU                       "Меню карты"
97 97
 #define MSG_NO_CARD                         "Нет карты"
98 98
 #define MSG_DWELL                           "Сон..."
99 99
 #define MSG_USERWAIT                        "Ожиданиие"

+ 5
- 1
Marlin/pins.h ファイルの表示

@@ -36,7 +36,7 @@
36 36
   #include "pins_SETHI.h"
37 37
 #elif MB(RAMPS_OLD)
38 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 40
   #include "pins_RAMPS_13.h"
41 41
 #elif MB(DUEMILANOVE_328P)
42 42
   #include "pins_DUEMILANOVE_328P.h"
@@ -110,6 +110,10 @@
110 110
   #include "pins_WITBOX.h"
111 111
 #elif MB(HEPHESTOS)
112 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 117
 #elif MB(99)
114 118
   #include "pins_99.h"
115 119
 #else

+ 2
- 0
Marlin/pins_3DRAG.h ファイルの表示

@@ -4,6 +4,8 @@
4 4
 
5 5
 #include "pins_RAMPS_13.h"
6 6
 
7
+#define Z_ENABLE_PIN       63
8
+
7 9
 #define X_MAX_PIN          2
8 10
 #define Y_MAX_PIN          15
9 11
 #define Z_MAX_PIN          -1

+ 8
- 0
Marlin/pins_AZTEEG_X3.h ファイルの表示

@@ -3,3 +3,11 @@
3 3
  */
4 4
 
5 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,6 +4,9 @@
4 4
 
5 5
 #include "pins_RAMPS_13.h"
6 6
 
7
+#define FAN_PIN             9 // (Sprinter config)
8
+#define BEEPER             33
9
+
7 10
 #define E2_STEP_PIN        23
8 11
 #define E2_DIR_PIN         25
9 12
 #define E2_ENABLE_PIN      40
@@ -16,15 +19,16 @@
16 19
 #define E4_DIR_PIN         37
17 20
 #define E4_ENABLE_PIN      42
18 21
 
22
+#define HEATER_1_PIN       -1
19 23
 #define HEATER_2_PIN       16
20 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 28
 #define HEATER_7_PIN       11
25 29
 
26 30
 #define TEMP_2_PIN         12   // ANALOG NUMBERING
27 31
 #define TEMP_3_PIN         11   // ANALOG NUMBERING
28 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 ファイルの表示

@@ -0,0 +1,11 @@
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

+ 0
- 6
Marlin/pins_CHEAPTRONIC.h ファイルの表示

@@ -87,9 +87,3 @@
87 87
 
88 88
 // Cheaptronic v1.0 does not use this port
89 89
 #define SDCARDDETECT -1
90
-
91
-// Encoder rotation values
92
-#define encrot0 0
93
-#define encrot1 2
94
-#define encrot2 3
95
-#define encrot3 1

+ 0
- 6
Marlin/pins_ELEFU_3.h ファイルの表示

@@ -74,12 +74,6 @@
74 74
   #define BLEN_B           1
75 75
   #define BLEN_A           0
76 76
 
77
-  //encoder rotation values
78
-  #define encrot0          0
79
-  #define encrot1          2
80
-  #define encrot2          3
81
-  #define encrot3          1
82
-
83 77
 #endif // RA_CONTROL_PANEL
84 78
 
85 79
 #ifdef RA_DISCO

+ 3
- 0
Marlin/pins_HEPHESTOS.h ファイルの表示

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

+ 0
- 6
Marlin/pins_MEGATRONICS.h ファイルの表示

@@ -83,10 +83,4 @@
83 83
 
84 84
   #define SDCARDDETECT -1   // Ramps does not use this port
85 85
 
86
-    //encoder rotation values
87
-  #define encrot0 0
88
-  #define encrot1 2
89
-  #define encrot2 3
90
-  #define encrot3 1
91
-
92 86
 #endif // ULTRA_LCD && NEWPANEL

+ 0
- 6
Marlin/pins_MEGATRONICS_1.h ファイルの表示

@@ -80,9 +80,3 @@
80 80
 #define BLEN_A 0
81 81
 
82 82
 #define SDCARDDETECT -1  // Megatronics does not use this port
83
-
84
-// Encoder rotation values
85
-#define encrot0 0
86
-#define encrot1 2
87
-#define encrot2 3
88
-#define encrot3 1

+ 0
- 6
Marlin/pins_MEGATRONICS_2.h ファイルの表示

@@ -95,9 +95,3 @@
95 95
 #define BLEN_A 0
96 96
 
97 97
 #define SDCARDDETECT -1  // Megatronics does not use this port
98
-
99
-// Encoder rotation values
100
-#define encrot0 0
101
-#define encrot1 2
102
-#define encrot2 3
103
-#define encrot3 1

+ 14
- 6
Marlin/pins_MEGATRONICS_3.h ファイルの表示

@@ -8,6 +8,20 @@
8 8
 
9 9
 #define LARGE_FLASH        true
10 10
 
11
+// Servo support
12
+#ifdef NUM_SERVOS
13
+  #define SERVO0_PIN       46 //AUX3-6
14
+  #if NUM_SERVOS > 1
15
+    #define SERVO1_PIN     47 //AUX3-5
16
+    #if NUM_SERVOS > 2
17
+      #define SERVO2_PIN   48 //AUX3-4
18
+      #if NUM_SERVOS > 3
19
+        #define SERVO2_PIN 49 //AUX3-3
20
+      #endif
21
+    #endif
22
+  #endif
23
+#endif
24
+
11 25
 #define X_STEP_PIN         58
12 26
 #define X_DIR_PIN          57
13 27
 #define X_ENABLE_PIN       59
@@ -81,9 +95,3 @@
81 95
 #define BLEN_A 0
82 96
 
83 97
 #define SDCARDDETECT -1	// Megatronics does not use this port
84
-
85
-// Encoder rotation values
86
-#define encrot0 0
87
-#define encrot1 2
88
-#define encrot2 3
89
-#define encrot3 1

+ 0
- 11
Marlin/pins_RAMBO.h ファイルの表示

@@ -116,11 +116,6 @@
116 116
 
117 117
     #define SDCARDDETECT 81    // Ramps does not use this port
118 118
 
119
-    //encoder rotation values
120
-    #define encrot0 0
121
-    #define encrot1 2
122
-    #define encrot2 3
123
-    #define encrot3 1
124 119
   #else //!NEWPANEL - old style panel with shift register
125 120
     //arduino pin witch triggers an piezzo beeper
126 121
     #define BEEPER 33    No Beeper added
@@ -138,12 +133,6 @@
138 133
     #define LCD_PINS_D6 27
139 134
     #define LCD_PINS_D7 29
140 135
 
141
-    //encoder rotation values
142
-    #define encrot0 0
143
-    #define encrot1 2
144
-    #define encrot2 3
145
-    #define encrot3 1
146
-
147 136
     //bits in the shift register that carry the buttons for:
148 137
     // left up center down right red
149 138
     #define BL_LE 7

+ 31
- 33
Marlin/pins_RAMPS_13.h ファイルの表示

@@ -7,10 +7,8 @@
7 7
  *  RAMPS_13_EEB (Extruder, Extruder, Bed)
8 8
  *  RAMPS_13_EFF (Extruder, Fan, Fan)
9 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 14
 #if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
@@ -63,7 +61,7 @@
63 61
   #define FILWIDTH_PIN        5
64 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 65
   #define FAN_PIN            9 // (Sprinter config)
68 66
   #if MB(RAMPS_13_EFF)
69 67
     #define CONTROLLERFAN_PIN  -1 // Pin used for the fan to cool controller
@@ -88,7 +86,7 @@
88 86
   #define HEATER_0_PIN       10   // EXTRUDER 1
89 87
 #endif
90 88
 
91
-#if MB(RAMPS_13_EFB) || MB(AZTEEG_X3) || MB(WITBOX) || MB(HEPHESTOS)
89
+#if MB(RAMPS_13_EFB)
92 90
   #define HEATER_1_PIN       -1
93 91
 #else
94 92
   #define HEATER_1_PIN       9    // EXTRUDER 2 (FAN On Sprinter)
@@ -110,40 +108,36 @@
110 108
 
111 109
 #ifdef NUM_SERVOS
112 110
   #define SERVO0_PIN         11
113
-
114 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 119
   #endif
136 120
 #endif
137 121
 
138 122
 #ifdef ULTRA_LCD
139 123
 
140 124
   #ifdef NEWPANEL
141
-    #define LCD_PINS_RS 16
142
-    #define LCD_PINS_ENABLE 17
143
-    #define LCD_PINS_D4 23
144
-    #define LCD_PINS_D5 25
145
-    #define LCD_PINS_D6 27
146
-    #define LCD_PINS_D7 29
125
+    #ifdef PANEL_ONE
126
+      #define LCD_PINS_RS 40
127
+      #define LCD_PINS_ENABLE 42
128
+      #define LCD_PINS_D4 65
129
+      #define LCD_PINS_D5 66
130
+      #define LCD_PINS_D6 44
131
+      #define LCD_PINS_D7 64
132
+    #else
133
+      #define LCD_PINS_RS 16
134
+      #define LCD_PINS_ENABLE 17
135
+      #define LCD_PINS_D4 23
136
+      #define LCD_PINS_D5 25
137
+      #define LCD_PINS_D6 27
138
+      #define LCD_PINS_D7 29
139
+    #endif
140
+
147 141
 
148 142
     #ifdef REPRAP_DISCOUNT_SMART_CONTROLLER
149 143
       #define BEEPER 37
@@ -178,6 +172,10 @@
178 172
         #define SHIFT_OUT 40 // shift register
179 173
         #define SHIFT_CLK 44 // shift register
180 174
         #define SHIFT_LD 42 // shift register
175
+      #elif defined(PANEL_ONE)
176
+        #define BTN_EN1 59 // AUX2 PIN 3
177
+        #define BTN_EN2 63 // AUX2 PIN 4
178
+        #define BTN_ENC 49 // AUX3 PIN 7
181 179
       #else
182 180
         #define BTN_EN1 37
183 181
         #define BTN_EN2 35

+ 4
- 0
Marlin/pins_RUMBA.h ファイルの表示

@@ -6,6 +6,10 @@
6 6
   #error Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
7 7
 #endif
8 8
 
9
+#if EXTRUDERS > 3
10
+  #error RUMBA supports up to 3 extruders. Comment this line to keep going.
11
+#endif
12
+
9 13
 #define X_STEP_PIN         17
10 14
 #define X_DIR_PIN          16
11 15
 #define X_ENABLE_PIN       48

+ 3
- 0
Marlin/pins_WITBOX.h ファイルの表示

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

+ 10
- 2
Marlin/planner.cpp ファイルの表示

@@ -629,13 +629,21 @@ block->steps_y = labs((target[X_AXIS]-position[X_AXIS]) - (target[Y_AXIS]-positi
629 629
     block->direction_bits |= (1<<Y_AXIS); 
630 630
   }
631 631
 #else
632
+  if (target[X_AXIS] < position[X_AXIS])
633
+  {
634
+    block->direction_bits |= (1<<X_HEAD); //AlexBorro: Save the real Extruder (head) direction in X Axis
635
+  }
636
+  if (target[Y_AXIS] < position[Y_AXIS])
637
+  {
638
+    block->direction_bits |= (1<<Y_HEAD); //AlexBorro: Save the real Extruder (head) direction in Y Axis
639
+  }
632 640
   if ((target[X_AXIS]-position[X_AXIS]) + (target[Y_AXIS]-position[Y_AXIS]) < 0)
633 641
   {
634
-    block->direction_bits |= (1<<X_AXIS); 
642
+    block->direction_bits |= (1<<X_AXIS); //AlexBorro: Motor A direction (Incorrectly implemented as X_AXIS)
635 643
   }
636 644
   if ((target[X_AXIS]-position[X_AXIS]) - (target[Y_AXIS]-position[Y_AXIS]) < 0)
637 645
   {
638
-    block->direction_bits |= (1<<Y_AXIS); 
646
+    block->direction_bits |= (1<<Y_AXIS); //AlexBorro: Motor B direction (Incorrectly implemented as Y_AXIS)
639 647
   }
640 648
 #endif
641 649
   if (target[Z_AXIS] < position[Z_AXIS])

+ 84
- 95
Marlin/stepper.cpp ファイルの表示

@@ -43,7 +43,7 @@ block_t *current_block;  // A pointer to the block currently being traced
43 43
 //===========================================================================
44 44
 //=============================private variables ============================
45 45
 //===========================================================================
46
-//static makes it inpossible to be called from outside of this file by extern.!
46
+//static makes it impossible to be called from outside of this file by extern.!
47 47
 
48 48
 // Variables used by The Stepper Driver Interrupt
49 49
 static unsigned char out_bits;        // The next stepping-bits to be output
@@ -187,7 +187,7 @@ void checkHitEndstops()
187 187
      SERIAL_ECHOPAIR(" Z:",(float)endstops_trigsteps[Z_AXIS]/axis_steps_per_unit[Z_AXIS]);
188 188
      LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "Z");
189 189
    }
190
-   SERIAL_ECHOLN("");
190
+   SERIAL_EOL;
191 191
    endstop_x_hit=false;
192 192
    endstop_y_hit=false;
193 193
    endstop_z_hit=false;
@@ -399,85 +399,84 @@ ISR(TIMER1_COMPA_vect)
399 399
       count_direction[Y_AXIS]=1;
400 400
     }
401 401
 
402
-    // Set direction en check limit switches
403
-    #ifndef COREXY
404
-    if ((out_bits & (1<<X_AXIS)) != 0) {   // stepping along -X axis
405
-    #else
406
-    if ((((out_bits & (1<<X_AXIS)) != 0)&&(out_bits & (1<<Y_AXIS)) != 0)) {   //-X occurs for -A and -B
407
-    #endif
408
-      CHECK_ENDSTOPS
409
-      {
410
-        #ifdef DUAL_X_CARRIAGE
411
-        // with 2 x-carriages, endstops are only checked in the homing direction for the active extruder
412
-        if ((current_block->active_extruder == 0 && X_HOME_DIR == -1) 
413
-            || (current_block->active_extruder != 0 && X2_HOME_DIR == -1))
414
-        #endif          
415
-        {
416
-          #if defined(X_MIN_PIN) && X_MIN_PIN > -1
417
-            bool x_min_endstop=(READ(X_MIN_PIN) != X_MIN_ENDSTOP_INVERTING);
418
-            if(x_min_endstop && old_x_min_endstop && (current_block->steps_x > 0)) {
419
-              endstops_trigsteps[X_AXIS] = count_position[X_AXIS];
420
-              endstop_x_hit=true;
421
-              step_events_completed = current_block->step_event_count;
402
+    if(check_endstops) // check X and Y Endstops
403
+    {
404
+        #ifndef COREXY
405
+        if ((out_bits & (1<<X_AXIS)) != 0)   // stepping along -X axis (regular cartesians bot)
406
+        #else
407
+        if (!((current_block->steps_x == current_block->steps_y) && ((out_bits & (1<<X_AXIS))>>X_AXIS != (out_bits & (1<<Y_AXIS))>>Y_AXIS))) // AlexBorro: If DeltaX == -DeltaY, the movement is only in Y axis
408
+        if ((out_bits & (1<<X_HEAD)) != 0) //AlexBorro: Head direction in -X axis for CoreXY bots.
409
+        #endif
410
+        { // -direction
411
+            #ifdef DUAL_X_CARRIAGE
412
+            // with 2 x-carriages, endstops are only checked in the homing direction for the active extruder
413
+            if ((current_block->active_extruder == 0 && X_HOME_DIR == -1) || (current_block->active_extruder != 0 && X2_HOME_DIR == -1))
414
+            #endif          
415
+            {
416
+                #if defined(X_MIN_PIN) && X_MIN_PIN > -1
417
+                bool x_min_endstop=(READ(X_MIN_PIN) != X_MIN_ENDSTOP_INVERTING);
418
+                if(x_min_endstop && old_x_min_endstop && (current_block->steps_x > 0))
419
+                {
420
+                    endstops_trigsteps[X_AXIS] = count_position[X_AXIS];
421
+                    endstop_x_hit=true;
422
+                    step_events_completed = current_block->step_event_count;
423
+                }
424
+                old_x_min_endstop = x_min_endstop;
425
+                #endif
422 426
             }
423
-            old_x_min_endstop = x_min_endstop;
424
-          #endif
425 427
         }
426
-      }
427
-    }
428
-    else { // +direction
429
-      CHECK_ENDSTOPS
430
-      {
431
-        #ifdef DUAL_X_CARRIAGE
432
-        // with 2 x-carriages, endstops are only checked in the homing direction for the active extruder
433
-        if ((current_block->active_extruder == 0 && X_HOME_DIR == 1) 
434
-            || (current_block->active_extruder != 0 && X2_HOME_DIR == 1))
435
-        #endif          
436
-        {
437
-          #if defined(X_MAX_PIN) && X_MAX_PIN > -1
438
-            bool x_max_endstop=(READ(X_MAX_PIN) != X_MAX_ENDSTOP_INVERTING);
439
-            if(x_max_endstop && old_x_max_endstop && (current_block->steps_x > 0)){
440
-              endstops_trigsteps[X_AXIS] = count_position[X_AXIS];
441
-              endstop_x_hit=true;
442
-              step_events_completed = current_block->step_event_count;
428
+        else 
429
+        { // +direction
430
+            #ifdef DUAL_X_CARRIAGE
431
+            // with 2 x-carriages, endstops are only checked in the homing direction for the active extruder
432
+            if ((current_block->active_extruder == 0 && X_HOME_DIR == 1) || (current_block->active_extruder != 0 && X2_HOME_DIR == 1))
433
+            #endif          
434
+            {
435
+                #if defined(X_MAX_PIN) && X_MAX_PIN > -1
436
+                bool x_max_endstop=(READ(X_MAX_PIN) != X_MAX_ENDSTOP_INVERTING);
437
+                if(x_max_endstop && old_x_max_endstop && (current_block->steps_x > 0))
438
+                {
439
+                    endstops_trigsteps[X_AXIS] = count_position[X_AXIS];
440
+                    endstop_x_hit=true;
441
+                    step_events_completed = current_block->step_event_count;
442
+                }
443
+                old_x_max_endstop = x_max_endstop;
444
+                #endif
443 445
             }
444
-            old_x_max_endstop = x_max_endstop;
445
-          #endif
446 446
         }
447
-      }
448
-    }
449 447
 
450
-    #ifndef COREXY
451
-    if ((out_bits & (1<<Y_AXIS)) != 0) {   // -direction
452
-    #else
453
-    if ((((out_bits & (1<<X_AXIS)) != 0)&&(out_bits & (1<<Y_AXIS)) == 0)) {   // -Y occurs for -A and +B
454
-    #endif
455
-      CHECK_ENDSTOPS
456
-      {
457
-        #if defined(Y_MIN_PIN) && Y_MIN_PIN > -1
458
-          bool y_min_endstop=(READ(Y_MIN_PIN) != Y_MIN_ENDSTOP_INVERTING);
459
-          if(y_min_endstop && old_y_min_endstop && (current_block->steps_y > 0)) {
460
-            endstops_trigsteps[Y_AXIS] = count_position[Y_AXIS];
461
-            endstop_y_hit=true;
462
-            step_events_completed = current_block->step_event_count;
463
-          }
464
-          old_y_min_endstop = y_min_endstop;
465
-        #endif
466
-      }
467
-    }
468
-    else { // +direction
469
-      CHECK_ENDSTOPS
470
-      {
471
-        #if defined(Y_MAX_PIN) && Y_MAX_PIN > -1
472
-          bool y_max_endstop=(READ(Y_MAX_PIN) != Y_MAX_ENDSTOP_INVERTING);
473
-          if(y_max_endstop && old_y_max_endstop && (current_block->steps_y > 0)){
474
-            endstops_trigsteps[Y_AXIS] = count_position[Y_AXIS];
475
-            endstop_y_hit=true;
476
-            step_events_completed = current_block->step_event_count;
477
-          }
478
-          old_y_max_endstop = y_max_endstop;
448
+        #ifndef COREXY
449
+        if ((out_bits & (1<<Y_AXIS)) != 0)   // -direction
450
+        #else
451
+        if (!((current_block->steps_x == current_block->steps_y) && ((out_bits & (1<<X_AXIS))>>X_AXIS == (out_bits & (1<<Y_AXIS))>>Y_AXIS))) // AlexBorro: If DeltaX == DeltaY, the movement is only in X axis
452
+        if ((out_bits & (1<<Y_HEAD)) != 0)  //AlexBorro: Head direction in -Y axis for CoreXY bots.
479 453
         #endif
480
-      }
454
+        { // -direction
455
+            #if defined(Y_MIN_PIN) && Y_MIN_PIN > -1
456
+            bool y_min_endstop=(READ(Y_MIN_PIN) != Y_MIN_ENDSTOP_INVERTING);
457
+            if(y_min_endstop && old_y_min_endstop && (current_block->steps_y > 0))
458
+            {
459
+                endstops_trigsteps[Y_AXIS] = count_position[Y_AXIS];
460
+                endstop_y_hit=true;
461
+                step_events_completed = current_block->step_event_count;
462
+            }
463
+            old_y_min_endstop = y_min_endstop;
464
+            #endif
465
+        }
466
+        else 
467
+        { // +direction
468
+            #if defined(Y_MAX_PIN) && Y_MAX_PIN > -1
469
+            bool y_max_endstop=(READ(Y_MAX_PIN) != Y_MAX_ENDSTOP_INVERTING);
470
+            if(y_max_endstop && old_y_max_endstop && (current_block->steps_y > 0))
471
+            {
472
+                endstops_trigsteps[Y_AXIS] = count_position[Y_AXIS];
473
+                endstop_y_hit=true;
474
+                step_events_completed = current_block->step_event_count;
475
+            }
476
+            old_y_max_endstop = y_max_endstop;
477
+            #endif
478
+
479
+        }
481 480
     }
482 481
 
483 482
     if ((out_bits & (1<<Z_AXIS)) != 0) {   // -direction
@@ -960,51 +959,41 @@ void st_init()
960 959
 
961 960
   //Initialize Step Pins
962 961
   #if defined(X_STEP_PIN) && (X_STEP_PIN > -1)
963
-    SET_OUTPUT(X_STEP_PIN);
964
-    WRITE(X_STEP_PIN,INVERT_X_STEP_PIN);
962
+    OUT_WRITE(X_STEP_PIN,INVERT_X_STEP_PIN);
965 963
     disable_x();
966 964
   #endif
967 965
   #if defined(X2_STEP_PIN) && (X2_STEP_PIN > -1)
968
-    SET_OUTPUT(X2_STEP_PIN);
969
-    WRITE(X2_STEP_PIN,INVERT_X_STEP_PIN);
966
+    OUT_WRITE(X2_STEP_PIN,INVERT_X_STEP_PIN);
970 967
     disable_x();
971 968
   #endif
972 969
   #if defined(Y_STEP_PIN) && (Y_STEP_PIN > -1)
973
-    SET_OUTPUT(Y_STEP_PIN);
974
-    WRITE(Y_STEP_PIN,INVERT_Y_STEP_PIN);
970
+    OUT_WRITE(Y_STEP_PIN,INVERT_Y_STEP_PIN);
975 971
     #if defined(Y_DUAL_STEPPER_DRIVERS) && defined(Y2_STEP_PIN) && (Y2_STEP_PIN > -1)
976
-      SET_OUTPUT(Y2_STEP_PIN);
977
-      WRITE(Y2_STEP_PIN,INVERT_Y_STEP_PIN);
972
+      OUT_WRITE(Y2_STEP_PIN,INVERT_Y_STEP_PIN);
978 973
     #endif
979 974
     disable_y();
980 975
   #endif
981 976
   #if defined(Z_STEP_PIN) && (Z_STEP_PIN > -1)
982
-    SET_OUTPUT(Z_STEP_PIN);
983
-    WRITE(Z_STEP_PIN,INVERT_Z_STEP_PIN);
977
+    OUT_WRITE(Z_STEP_PIN,INVERT_Z_STEP_PIN);
984 978
     #if defined(Z_DUAL_STEPPER_DRIVERS) && defined(Z2_STEP_PIN) && (Z2_STEP_PIN > -1)
985
-      SET_OUTPUT(Z2_STEP_PIN);
986
-      WRITE(Z2_STEP_PIN,INVERT_Z_STEP_PIN);
979
+      OUT_WRITE(Z2_STEP_PIN,INVERT_Z_STEP_PIN);
987 980
     #endif
988 981
     disable_z();
989 982
   #endif
990 983
   #if defined(E0_STEP_PIN) && (E0_STEP_PIN > -1)
991
-    SET_OUTPUT(E0_STEP_PIN);
992
-    WRITE(E0_STEP_PIN,INVERT_E_STEP_PIN);
984
+    OUT_WRITE(E0_STEP_PIN,INVERT_E_STEP_PIN);
993 985
     disable_e0();
994 986
   #endif
995 987
   #if defined(E1_STEP_PIN) && (E1_STEP_PIN > -1)
996
-    SET_OUTPUT(E1_STEP_PIN);
997
-    WRITE(E1_STEP_PIN,INVERT_E_STEP_PIN);
988
+    OUT_WRITE(E1_STEP_PIN,INVERT_E_STEP_PIN);
998 989
     disable_e1();
999 990
   #endif
1000 991
   #if defined(E2_STEP_PIN) && (E2_STEP_PIN > -1)
1001
-    SET_OUTPUT(E2_STEP_PIN);
1002
-    WRITE(E2_STEP_PIN,INVERT_E_STEP_PIN);
992
+    OUT_WRITE(E2_STEP_PIN,INVERT_E_STEP_PIN);
1003 993
     disable_e2();
1004 994
   #endif
1005 995
   #if defined(E3_STEP_PIN) && (E3_STEP_PIN > -1)
1006
-    SET_OUTPUT(E3_STEP_PIN);
1007
-    WRITE(E3_STEP_PIN,INVERT_E_STEP_PIN);
996
+    OUT_WRITE(E3_STEP_PIN,INVERT_E_STEP_PIN);
1008 997
     disable_e3();
1009 998
   #endif
1010 999
 

+ 921
- 1281
Marlin/temperature.cpp
ファイル差分が大きすぎるため省略します
ファイルの表示


+ 39
- 72
Marlin/temperature.h ファイルの表示

@@ -85,55 +85,25 @@ extern float current_temperature_bed;
85 85
 //inline so that there is no performance decrease.
86 86
 //deg=degreeCelsius
87 87
 
88
-FORCE_INLINE float degHotend(uint8_t extruder) {  
89
-  return current_temperature[extruder];
90
-};
88
+FORCE_INLINE float degHotend(uint8_t extruder) { return current_temperature[extruder]; }
89
+FORCE_INLINE float degBed() { return current_temperature_bed; }
91 90
 
92 91
 #ifdef SHOW_TEMP_ADC_VALUES
93
-  FORCE_INLINE float rawHotendTemp(uint8_t extruder) {  
94
-    return current_temperature_raw[extruder];
95
-  };
96
-
97
-  FORCE_INLINE float rawBedTemp() {  
98
-    return current_temperature_bed_raw;
99
-  };
92
+  FORCE_INLINE float rawHotendTemp(uint8_t extruder) { return current_temperature_raw[extruder]; }
93
+  FORCE_INLINE float rawBedTemp() { return current_temperature_bed_raw; }
100 94
 #endif
101 95
 
102
-FORCE_INLINE float degBed() {
103
-  return current_temperature_bed;
104
-};
105
-
106
-FORCE_INLINE float degTargetHotend(uint8_t extruder) {  
107
-  return target_temperature[extruder];
108
-};
109
-
110
-FORCE_INLINE float degTargetBed() {   
111
-  return target_temperature_bed;
112
-};
113
-
114
-FORCE_INLINE void setTargetHotend(const float &celsius, uint8_t extruder) {  
115
-  target_temperature[extruder] = celsius;
116
-};
117
-
118
-FORCE_INLINE void setTargetBed(const float &celsius) {  
119
-  target_temperature_bed = celsius;
120
-};
96
+FORCE_INLINE float degTargetHotend(uint8_t extruder) { return target_temperature[extruder]; }
97
+FORCE_INLINE float degTargetBed() { return target_temperature_bed; }
121 98
 
122
-FORCE_INLINE bool isHeatingHotend(uint8_t extruder){  
123
-  return target_temperature[extruder] > current_temperature[extruder];
124
-};
99
+FORCE_INLINE void setTargetHotend(const float &celsius, uint8_t extruder) { target_temperature[extruder] = celsius; }
100
+FORCE_INLINE void setTargetBed(const float &celsius) { target_temperature_bed = celsius; }
125 101
 
126
-FORCE_INLINE bool isHeatingBed() {
127
-  return target_temperature_bed > current_temperature_bed;
128
-};
102
+FORCE_INLINE bool isHeatingHotend(uint8_t extruder) { return target_temperature[extruder] > current_temperature[extruder]; }
103
+FORCE_INLINE bool isHeatingBed() { return target_temperature_bed > current_temperature_bed; }
129 104
 
130
-FORCE_INLINE bool isCoolingHotend(uint8_t extruder) {  
131
-  return target_temperature[extruder] < current_temperature[extruder];
132
-};
133
-
134
-FORCE_INLINE bool isCoolingBed() {
135
-  return target_temperature_bed < current_temperature_bed;
136
-};
105
+FORCE_INLINE bool isCoolingHotend(uint8_t extruder) { return target_temperature[extruder] < current_temperature[extruder]; }
106
+FORCE_INLINE bool isCoolingBed() { return target_temperature_bed < current_temperature_bed; }
137 107
 
138 108
 #define degHotend0() degHotend(0)
139 109
 #define degTargetHotend0() degTargetHotend(0)
@@ -141,38 +111,36 @@ FORCE_INLINE bool isCoolingBed() {
141 111
 #define isHeatingHotend0() isHeatingHotend(0)
142 112
 #define isCoolingHotend0() isCoolingHotend(0)
143 113
 #if EXTRUDERS > 1
144
-#define degHotend1() degHotend(1)
145
-#define degTargetHotend1() degTargetHotend(1)
146
-#define setTargetHotend1(_celsius) setTargetHotend((_celsius), 1)
147
-#define isHeatingHotend1() isHeatingHotend(1)
148
-#define isCoolingHotend1() isCoolingHotend(1)
114
+  #define degHotend1() degHotend(1)
115
+  #define degTargetHotend1() degTargetHotend(1)
116
+  #define setTargetHotend1(_celsius) setTargetHotend((_celsius), 1)
117
+  #define isHeatingHotend1() isHeatingHotend(1)
118
+  #define isCoolingHotend1() isCoolingHotend(1)
149 119
 #else
150
-#define setTargetHotend1(_celsius) do{}while(0)
120
+  #define setTargetHotend1(_celsius) do{}while(0)
151 121
 #endif
152 122
 #if EXTRUDERS > 2
153
-#define degHotend2() degHotend(2)
154
-#define degTargetHotend2() degTargetHotend(2)
155
-#define setTargetHotend2(_celsius) setTargetHotend((_celsius), 2)
156
-#define isHeatingHotend2() isHeatingHotend(2)
157
-#define isCoolingHotend2() isCoolingHotend(2)
123
+  #define degHotend2() degHotend(2)
124
+  #define degTargetHotend2() degTargetHotend(2)
125
+  #define setTargetHotend2(_celsius) setTargetHotend((_celsius), 2)
126
+  #define isHeatingHotend2() isHeatingHotend(2)
127
+  #define isCoolingHotend2() isCoolingHotend(2)
158 128
 #else
159
-#define setTargetHotend2(_celsius) do{}while(0)
129
+  #define setTargetHotend2(_celsius) do{}while(0)
160 130
 #endif
161 131
 #if EXTRUDERS > 3
162
-#define degHotend3() degHotend(3)
163
-#define degTargetHotend3() degTargetHotend(3)
164
-#define setTargetHotend3(_celsius) setTargetHotend((_celsius), 3)
165
-#define isHeatingHotend3() isHeatingHotend(3)
166
-#define isCoolingHotend3() isCoolingHotend(3)
132
+  #define degHotend3() degHotend(3)
133
+  #define degTargetHotend3() degTargetHotend(3)
134
+  #define setTargetHotend3(_celsius) setTargetHotend((_celsius), 3)
135
+  #define isHeatingHotend3() isHeatingHotend(3)
136
+  #define isCoolingHotend3() isCoolingHotend(3)
167 137
 #else
168
-#define setTargetHotend3(_celsius) do{}while(0)
138
+  #define setTargetHotend3(_celsius) do{}while(0)
169 139
 #endif
170 140
 #if EXTRUDERS > 4
171
-#error Invalid number of extruders
141
+  #error Invalid number of extruders
172 142
 #endif
173 143
 
174
-
175
-
176 144
 int getHeaterPower(int heater);
177 145
 void disable_heater();
178 146
 void setWatch();
@@ -189,15 +157,14 @@ static bool thermal_runaway = false;
189 157
 #endif
190 158
 #endif
191 159
 
192
-FORCE_INLINE void autotempShutdown(){
193
-#ifdef AUTOTEMP
194
-  if(autotemp_enabled)
195
-  {
196
-    autotemp_enabled=false;
197
-    if(degTargetHotend(active_extruder)>autotemp_min)
198
-      setTargetHotend(0,active_extruder);
199
-  }
200
-#endif
160
+FORCE_INLINE void autotempShutdown() {
161
+  #ifdef AUTOTEMP
162
+    if (autotemp_enabled) {
163
+      autotemp_enabled = false;
164
+      if (degTargetHotend(active_extruder) > autotemp_min)
165
+        setTargetHotend(0, active_extruder);
166
+    }
167
+  #endif
201 168
 }
202 169
 
203 170
 void PID_autotune(float temp, int extruder, int ncycles);

+ 23
- 0
Marlin/thermistortables.h ファイルの表示

@@ -1095,6 +1095,29 @@ const short temptable_1047[][2] PROGMEM = {
1095 1095
 };
1096 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 a fixed value.
1100
+  #ifndef DUMMY_THERMISTOR_999_VALUE
1101
+    #define DUMMY_THERMISTOR_999_VALUE 25
1102
+  #endif
1103
+  const short temptable_999[][2] PROGMEM = {
1104
+    {1*OVERSAMPLENR, DUMMY_THERMISTOR_999_VALUE},
1105
+    {1023*OVERSAMPLENR, DUMMY_THERMISTOR_999_VALUE}
1106
+};
1107
+#endif
1108
+
1109
+#if (THERMISTORHEATER_0 == 998) || (THERMISTORHEATER_1 == 998) || (THERMISTORHEATER_2 == 998) || (THERMISTORHEATER_3 == 998) || (THERMISTORBED == 998) //User defined table
1110
+  // Dummy Thermistor table.. It will ALWAYS read a fixed value.
1111
+  #ifndef DUMMY_THERMISTOR_998_VALUE
1112
+    #define DUMMY_THERMISTOR_998_VALUE 25
1113
+  #endif
1114
+  const short temptable_998[][2] PROGMEM = {
1115
+    {1*OVERSAMPLENR, DUMMY_THERMISTOR_998_VALUE},
1116
+    {1023*OVERSAMPLENR, DUMMY_THERMISTOR_998_VALUE}
1117
+};
1118
+#endif
1119
+
1120
+
1098 1121
 #define _TT_NAME(_N) temptable_ ## _N
1099 1122
 #define TT_NAME(_N) _TT_NAME(_N)
1100 1123
 

+ 859
- 907
Marlin/ultralcd.cpp
ファイル差分が大きすぎるため省略します
ファイルの表示


+ 2
- 1
Marlin/ultralcd.h ファイルの表示

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

+ 26
- 41
Marlin/ultralcd_implementation_hitachi_HD44780.h ファイルの表示

@@ -123,17 +123,6 @@
123 123
   #define LCD_CLICKED (buttons&(B_MI|B_ST))
124 124
 #endif
125 125
 
126
-////////////////////////
127
-// Setup Rotary Encoder Bit Values (for two pin encoders to indicate movement)
128
-// These values are independent of which pins are used for EN_A and EN_B indications
129
-// The rotary encoder part is also independent to the chipset used for the LCD
130
-#if defined(EN_A) && defined(EN_B)
131
-    #define encrot0 0
132
-    #define encrot1 2
133
-    #define encrot2 3
134
-    #define encrot3 1
135
-#endif 
136
-
137 126
 #endif //ULTIPANEL
138 127
 
139 128
 ////////////////////////////////////
@@ -636,7 +625,7 @@ static void lcd_implementation_drawmenu_generic(uint8_t row, const char* pstr, c
636 625
     {
637 626
         lcd.print(c);
638 627
         pstr++;
639
-        n--;
628
+        if ((pgm_read_byte(pstr) & 0xc0) != 0x80) n--;
640 629
     }
641 630
     while(n--)
642 631
         lcd.print(' ');
@@ -648,9 +637,9 @@ static void lcd_implementation_drawmenu_setting_edit_generic(uint8_t row, const
648 637
     char c;
649 638
     //Use all characters in narrow LCDs
650 639
   #if LCD_WIDTH < 20
651
-      uint8_t n = LCD_WIDTH - 1 - 1 - strlen(data);
640
+      uint8_t n = LCD_WIDTH - 1 - 1 - lcd_strlen(data);
652 641
     #else
653
-      uint8_t n = LCD_WIDTH - 1 - 2 - strlen(data);
642
+      uint8_t n = LCD_WIDTH - 1 - 2 - lcd_strlen(data);
654 643
   #endif
655 644
     lcd.setCursor(0, row);
656 645
     lcd.print(pre_char);
@@ -658,7 +647,7 @@ static void lcd_implementation_drawmenu_setting_edit_generic(uint8_t row, const
658 647
     {
659 648
         lcd.print(c);
660 649
         pstr++;
661
-        n--;
650
+        if ((pgm_read_byte(pstr) & 0xc0) != 0x80) n--;
662 651
     }
663 652
     lcd.print(':');
664 653
     while(n--)
@@ -670,9 +659,9 @@ static void lcd_implementation_drawmenu_setting_edit_generic_P(uint8_t row, cons
670 659
     char c;
671 660
     //Use all characters in narrow LCDs
672 661
   #if LCD_WIDTH < 20
673
-      uint8_t n = LCD_WIDTH - 1 - 1 - strlen_P(data);
662
+      uint8_t n = LCD_WIDTH - 1 - 1 - lcd_strlen_P(data);
674 663
     #else
675
-      uint8_t n = LCD_WIDTH - 1 - 2 - strlen_P(data);
664
+      uint8_t n = LCD_WIDTH - 1 - 2 - lcd_strlen_P(data);
676 665
   #endif
677 666
     lcd.setCursor(0, row);
678 667
     lcd.print(pre_char);
@@ -680,7 +669,7 @@ static void lcd_implementation_drawmenu_setting_edit_generic_P(uint8_t row, cons
680 669
     {
681 670
         lcd.print(c);
682 671
         pstr++;
683
-        n--;
672
+        if ((pgm_read_byte(pstr) & 0xc0) != 0x80) n--;
684 673
     }
685 674
     lcd.print(':');
686 675
     while(n--)
@@ -733,9 +722,9 @@ void lcd_implementation_drawedit(const char* pstr, char* value)
733 722
     lcd_printPGM(pstr);
734 723
     lcd.print(':');
735 724
    #if LCD_WIDTH < 20
736
-      lcd.setCursor(LCD_WIDTH - strlen(value), 1);
725
+      lcd.setCursor(LCD_WIDTH - lcd_strlen(value), 1);
737 726
     #else
738
-      lcd.setCursor(LCD_WIDTH -1 - strlen(value), 1);
727
+      lcd.setCursor(LCD_WIDTH -1 - lcd_strlen(value), 1);
739 728
    #endif
740 729
     lcd.print(value);
741 730
 }
@@ -832,32 +821,28 @@ static void lcd_implementation_drawmenu_sddirectory(uint8_t row, const char* pst
832 821
 
833 822
 static void lcd_implementation_quick_feedback()
834 823
 {
835
-#ifdef LCD_USE_I2C_BUZZER
836
-	#if !defined(LCD_FEEDBACK_FREQUENCY_HZ) || !defined(LCD_FEEDBACK_FREQUENCY_DURATION_MS)
837
-	  lcd_buzz(1000/6,100);
838
-	#else
839
-	  lcd_buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS,LCD_FEEDBACK_FREQUENCY_HZ);
840
-	#endif
841
-#elif defined(BEEPER) && BEEPER > -1
824
+  #ifdef LCD_USE_I2C_BUZZER
825
+    #if defined(LCD_FEEDBACK_FREQUENCY_DURATION_MS) && defined(LCD_FEEDBACK_FREQUENCY_HZ)
826
+      lcd_buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ);
827
+    #else
828
+      lcd_buzz(1000/6, 100);
829
+    #endif
830
+  #elif defined(BEEPER) && BEEPER > -1
842 831
     SET_OUTPUT(BEEPER);
843
-	#if !defined(LCD_FEEDBACK_FREQUENCY_HZ) || !defined(LCD_FEEDBACK_FREQUENCY_DURATION_MS)
844
-    for(int8_t i=0;i<10;i++)
845
-    {
846
-      WRITE(BEEPER,HIGH);
847
-      delayMicroseconds(100);
848
-      WRITE(BEEPER,LOW);
849
-      delayMicroseconds(100);
850
-    }
832
+    #if !defined(LCD_FEEDBACK_FREQUENCY_HZ) || !defined(LCD_FEEDBACK_FREQUENCY_DURATION_MS)
833
+      const unsigned int delay = 100;
834
+      uint8_t i = 10;
851 835
     #else
852
-    for(int8_t i=0;i<(LCD_FEEDBACK_FREQUENCY_DURATION_MS / (1000 / LCD_FEEDBACK_FREQUENCY_HZ));i++)
853
-    {
836
+      const unsigned int delay = 1000000 / LCD_FEEDBACK_FREQUENCY_HZ / 2;
837
+      int8_t i = LCD_FEEDBACK_FREQUENCY_DURATION_MS * LCD_FEEDBACK_FREQUENCY_HZ / 1000;
838
+    #endif
839
+    while (i--) {
854 840
       WRITE(BEEPER,HIGH);
855
-      delayMicroseconds(1000000 / LCD_FEEDBACK_FREQUENCY_HZ / 2);
841
+      delayMicroseconds(delay);
856 842
       WRITE(BEEPER,LOW);
857
-      delayMicroseconds(1000000 / LCD_FEEDBACK_FREQUENCY_HZ / 2);
843
+      delayMicroseconds(delay);
858 844
     }
859
-    #endif
860
-#endif
845
+  #endif
861 846
 }
862 847
 
863 848
 #ifdef LCD_HAS_STATUS_INDICATORS

+ 3
- 6
Marlin/ultralcd_st7920_u8glib_rrd.h ファイルの表示

@@ -47,12 +47,9 @@ uint8_t u8g_dev_rrd_st7920_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, vo
47 47
   {
48 48
     case U8G_DEV_MSG_INIT:
49 49
       {
50
-        SET_OUTPUT(ST7920_CS_PIN);
51
-        WRITE(ST7920_CS_PIN,0);
52
-        SET_OUTPUT(ST7920_DAT_PIN);
53
-        WRITE(ST7920_DAT_PIN,0);
54
-        SET_OUTPUT(ST7920_CLK_PIN);
55
-        WRITE(ST7920_CLK_PIN,1);
50
+        OUT_WRITE(ST7920_CS_PIN,LOW);
51
+        OUT_WRITE(ST7920_DAT_PIN,LOW);
52
+        OUT_WRITE(ST7920_CLK_PIN,HIGH);
56 53
 
57 54
         ST7920_CS();
58 55
         u8g_Delay(120);                 //initial delay for boot up

読み込み中…
キャンセル
保存