Procházet zdrojové kódy

Merge pull request #1 from MarlinFirmware/Development

dev pull
Wurstnase před 10 roky
rodič
revize
92ebb7f4c8
58 změnil soubory, kde provedl 6394 přidání a 5486 odebrání
  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 Zobrazit soubor

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

+ 1
- 8
Marlin/BlinkM.cpp Zobrazit soubor

5
 #include "Marlin.h"
5
 #include "Marlin.h"
6
 #ifdef BLINKM
6
 #ifdef BLINKM
7
 
7
 
8
-#if (ARDUINO >= 100)
9
-  # include "Arduino.h"
10
-#else
11
-  # include "WProgram.h"
12
-#endif
13
-
14
 #include "BlinkM.h"
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
   Wire.begin(); 
11
   Wire.begin(); 
19
   Wire.beginTransmission(0x09);
12
   Wire.beginTransmission(0x09);
20
   Wire.write('o');                    //to disable ongoing script, only needs to be used once
13
   Wire.write('o');                    //to disable ongoing script, only needs to be used once

+ 3
- 4
Marlin/BlinkM.h Zobrazit soubor

2
   BlinkM.h
2
   BlinkM.h
3
   Library header file for BlinkM library
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
 #else
7
 #else
8
-  # include "WProgram.h"
8
+  #include "WProgram.h"
9
 #endif
9
 #endif
10
 
10
 
11
 #include "Wire.h"
11
 #include "Wire.h"
12
 
12
 
13
 void SendColors(byte red, byte grn, byte blu);
13
 void SendColors(byte red, byte grn, byte blu);
14
-

+ 43
- 10
Marlin/Configuration.h Zobrazit soubor

118
 // 1010 is Pt1000 with 1k pullup (non standard)
118
 // 1010 is Pt1000 with 1k pullup (non standard)
119
 // 147 is Pt100 with 4k7 pullup
119
 // 147 is Pt100 with 4k7 pullup
120
 // 110 is Pt100 with 1k pullup (non standard)
120
 // 110 is Pt100 with 1k pullup (non standard)
121
+// 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
 #define TEMP_SENSOR_0 -1
126
 #define TEMP_SENSOR_0 -1
123
 #define TEMP_SENSOR_1 -1
127
 #define TEMP_SENSOR_1 -1
124
 #define TEMP_SENSOR_2 0
128
 #define TEMP_SENSOR_2 0
129
+#define TEMP_SENSOR_3 0
125
 #define TEMP_SENSOR_BED 0
130
 #define TEMP_SENSOR_BED 0
126
 
131
 
127
 // 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.
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
 #define HEATER_0_MINTEMP 5
144
 #define HEATER_0_MINTEMP 5
140
 #define HEATER_1_MINTEMP 5
145
 #define HEATER_1_MINTEMP 5
141
 #define HEATER_2_MINTEMP 5
146
 #define HEATER_2_MINTEMP 5
147
+#define HEATER_3_MINTEMP 5
142
 #define BED_MINTEMP 5
148
 #define BED_MINTEMP 5
143
 
149
 
144
 // When temperature exceeds max temp, your heater will be switched off.
150
 // When temperature exceeds max temp, your heater will be switched off.
147
 #define HEATER_0_MAXTEMP 275
153
 #define HEATER_0_MAXTEMP 275
148
 #define HEATER_1_MAXTEMP 275
154
 #define HEATER_1_MAXTEMP 275
149
 #define HEATER_2_MAXTEMP 275
155
 #define HEATER_2_MAXTEMP 275
156
+#define HEATER_3_MAXTEMP 275
150
 #define BED_MAXTEMP 150
157
 #define BED_MAXTEMP 150
151
 
158
 
152
 // If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
159
 // If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
323
 //#define DISABLE_MAX_ENDSTOPS
330
 //#define DISABLE_MAX_ENDSTOPS
324
 //#define DISABLE_MIN_ENDSTOPS
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
 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
333
 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
332
 #define X_ENABLE_ON 0
334
 #define X_ENABLE_ON 0
333
 #define Y_ENABLE_ON 0
335
 #define Y_ENABLE_ON 0
341
 #define DISABLE_E false // For all extruders
343
 #define DISABLE_E false // For all extruders
342
 #define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
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
 #define INVERT_Y_DIR false    // for Mendel set to true, for Orca set to false
347
 #define INVERT_Y_DIR false    // for Mendel set to true, for Orca set to false
346
 #define INVERT_Z_DIR true     // for Mendel set to false, for Orca set to true
348
 #define INVERT_Z_DIR true     // for Mendel set to false, for Orca set to true
347
 #define INVERT_E0_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
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
 #define INVERT_E2_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
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
 // ENDSTOP SETTINGS:
354
 // ENDSTOP SETTINGS:
352
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
355
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
425
 
428
 
426
   // these are the offsets to the probe relative to the extruder tip (Hotend - Probe)
429
   // these are the offsets to the probe relative to the extruder tip (Hotend - Probe)
427
   // X and Y offsets must be integers
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
   #define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z before homing (G28) for Probe Clearance.
435
   #define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z before homing (G28) for Probe Clearance.
433
                                         // Be sure you have this distance over your Z_MAX_POS in case
436
                                         // Be sure you have this distance over your Z_MAX_POS in case
582
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
585
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
583
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
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
 // The MaKr3d Makr-Panel with graphic controller and SD support
592
 // The MaKr3d Makr-Panel with graphic controller and SD support
586
 // http://reprap.org/wiki/MaKr3d_MaKrPanel
593
 // http://reprap.org/wiki/MaKr3d_MaKrPanel
587
 //#define MAKRPANEL
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
 // The RepRapDiscount Smart Controller (white PCB)
602
 // The RepRapDiscount Smart Controller (white PCB)
590
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
603
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
591
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER
604
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER
619
  #define DEFAULT_LCD_CONTRAST 17
632
  #define DEFAULT_LCD_CONTRAST 17
620
 #endif
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
 #if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
655
 #if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
623
  #define DOGLCD
656
  #define DOGLCD
624
  #define U8GLIB_ST7920
657
  #define U8GLIB_ST7920

+ 3
- 3
Marlin/ConfigurationStore.h Zobrazit soubor

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

+ 5
- 0
Marlin/Configuration_adv.h Zobrazit soubor

284
 //=============================Additional Features===========================
284
 //=============================Additional Features===========================
285
 //===========================================================================
285
 //===========================================================================
286
 
286
 
287
+#define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
288
+#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value
289
+#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value
290
+//#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
291
+
287
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
292
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
288
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
293
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
289
 
294
 

+ 8
- 4
Marlin/LiquidCrystalRus.cpp Zobrazit soubor

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

+ 5
- 4
Marlin/Marlin.h Zobrazit soubor

180
   #define disable_e3() /* nothing */
180
   #define disable_e3() /* nothing */
181
 #endif
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
 void FlushSerialRequestResend();
186
 void FlushSerialRequestResend();
187
 void ClearToSend();
187
 void ClearToSend();
201
 
201
 
202
 bool IsStopped();
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
 void prepare_arc_move(char isclockwise);
207
 void prepare_arc_move(char isclockwise);
207
 void clamp_to_software_endstops(float target[3]);
208
 void clamp_to_software_endstops(float target[3]);
208
 
209
 

+ 3198
- 2414
Marlin/Marlin_main.cpp
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 2
- 1
Marlin/boards.h Zobrazit soubor

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

+ 252
- 379
Marlin/cardreader.cpp Zobrazit soubor

7
 
7
 
8
 #ifdef SDSUPPORT
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
   //power to SD reader
23
   //power to SD reader
28
   #if SDPOWER > -1
24
   #if SDPOWER > -1
29
-    SET_OUTPUT(SDPOWER); 
30
-    WRITE(SDPOWER,HIGH);
25
+    OUT_WRITE(SDPOWER, HIGH);
31
   #endif //SDPOWER
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
   return buffer;
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
   dir_t p;
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
       char path[FILENAME_LENGTH*2];
48
       char path[FILENAME_LENGTH*2];
64
       char lfilename[FILENAME_LENGTH];
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
       //Serial.print(path);
58
       //Serial.print(path);
77
-      
59
+
78
       SdFile dir;
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
           SERIAL_ECHO_START;
63
           SERIAL_ECHO_START;
84
           SERIAL_ECHOLN(MSG_SD_CANT_OPEN_SUBDIR);
64
           SERIAL_ECHOLN(MSG_SD_CANT_OPEN_SUBDIR);
85
           SERIAL_ECHOLN(lfilename);
65
           SERIAL_ECHOLN(lfilename);
86
         }
66
         }
87
       }
67
       }
88
-      lsDive(path,dir);
68
+      lsDive(path, dir);
89
       //close done automatically by destructor of SdFile
69
       //close done automatically by destructor of SdFile
90
-
91
-      
92
     }
70
     }
93
-    else
94
-    {
71
+    else {
95
       char pn0 = p.name[0];
72
       char pn0 = p.name[0];
96
       if (pn0 == DIR_NAME_FREE) break;
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
       char lf0 = longFilename[0];
75
       char lf0 = longFilename[0];
99
-      if (lf0 == '.' || lf0 == '_') continue;
76
+      if (lf0 == '.') continue;
100
 
77
 
101
       if (!DIR_IS_FILE_OR_SUBDIR(&p)) continue;
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
         SERIAL_PROTOCOL(prepend);
87
         SERIAL_PROTOCOL(prepend);
115
         SERIAL_PROTOCOLLN(filename);
88
         SERIAL_PROTOCOLLN(filename);
116
       }
89
       }
117
-      else if(lsAction==LS_Count)
118
-      {
90
+      else if (lsAction == LS_Count) {
119
         nrFiles++;
91
         nrFiles++;
120
-      } 
121
-      else if(lsAction==LS_GetFilename)
122
-      {
92
+      }
93
+      else if (lsAction == LS_GetFilename) {
123
         if (match != NULL) {
94
         if (match != NULL) {
124
           if (strcasecmp(match, filename) == 0) return;
95
           if (strcasecmp(match, filename) == 0) return;
125
         }
96
         }
126
         else if (cnt == nrFiles) return;
97
         else if (cnt == nrFiles) return;
127
         cnt++;
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
   root.rewind();
106
   root.rewind();
141
-  lsDive("",root);
107
+  lsDive("", root);
142
 }
108
 }
143
 
109
 
144
-
145
-void CardReader::initsd()
146
-{
110
+void CardReader::initsd() {
147
   cardOK = false;
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
   #endif
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
     //if (!card.init(SPI_HALF_SPEED,SDSS))
125
     //if (!card.init(SPI_HALF_SPEED,SDSS))
165
     SERIAL_ECHO_START;
126
     SERIAL_ECHO_START;
166
     SERIAL_ECHOLNPGM(MSG_SD_INIT_FAIL);
127
     SERIAL_ECHOLNPGM(MSG_SD_INIT_FAIL);
167
   }
128
   }
168
-  else if (!volume.init(&card))
169
-  {
129
+  else if (!volume.init(&card)) {
170
     SERIAL_ERROR_START;
130
     SERIAL_ERROR_START;
171
     SERIAL_ERRORLNPGM(MSG_SD_VOL_INIT_FAIL);
131
     SERIAL_ERRORLNPGM(MSG_SD_VOL_INIT_FAIL);
172
   }
132
   }
173
-  else if (!root.openRoot(&volume)) 
174
-  {
133
+  else if (!root.openRoot(&volume)) {
175
     SERIAL_ERROR_START;
134
     SERIAL_ERROR_START;
176
     SERIAL_ERRORLNPGM(MSG_SD_OPENROOT_FAIL);
135
     SERIAL_ERRORLNPGM(MSG_SD_OPENROOT_FAIL);
177
   }
136
   }
178
-  else 
179
-  {
137
+  else {
180
     cardOK = true;
138
     cardOK = true;
181
     SERIAL_ECHO_START;
139
     SERIAL_ECHO_START;
182
     SERIAL_ECHOLNPGM(MSG_SD_CARD_OK);
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
     SERIAL_ECHOLNPGM(MSG_SD_WORKDIR_FAIL);
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
     SERIAL_ECHOLNPGM(MSG_SD_WORKDIR_FAIL);
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
   sdprinting = false;
160
   sdprinting = false;
208
   cardOK = false;
161
   cardOK = false;
209
 }
162
 }
210
 
163
 
211
-void CardReader::startFileprint()
212
-{
213
-  if(cardOK)
214
-  {
164
+void CardReader::startFileprint() {
165
+  if (cardOK) {
215
     sdprinting = true;
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
   logging = true;
175
   logging = true;
231
   openFile(name, false);
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
     workDirParents[i].getFilename(t); //SDBaseFile.getfilename!
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
     file.getFilename(t);
187
     file.getFilename(t);
246
   else
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
        SERIAL_ERROR_START;
197
        SERIAL_ERROR_START;
261
        SERIAL_ERRORPGM("trying to call sub-gcode files with too many levels. MAX level is:");
198
        SERIAL_ERRORPGM("trying to call sub-gcode files with too many levels. MAX level is:");
262
        SERIAL_ERRORLN(SD_PROCEDURE_DEPTH);
199
        SERIAL_ERRORLN(SD_PROCEDURE_DEPTH);
263
        kill();
200
        kill();
264
        return;
201
        return;
265
      }
202
      }
266
-     
203
+
267
      SERIAL_ECHO_START;
204
      SERIAL_ECHO_START;
268
      SERIAL_ECHOPGM("SUBROUTINE CALL target:\"");
205
      SERIAL_ECHOPGM("SUBROUTINE CALL target:\"");
269
      SERIAL_ECHO(name);
206
      SERIAL_ECHO(name);
270
      SERIAL_ECHOPGM("\" parent:\"");
207
      SERIAL_ECHOPGM("\" parent:\"");
271
-     
208
+
272
      //store current filename and position
209
      //store current filename and position
273
      getAbsFilename(filenames[file_subcall_ctr]);
210
      getAbsFilename(filenames[file_subcall_ctr]);
274
-     
211
+
275
      SERIAL_ECHO(filenames[file_subcall_ctr]);
212
      SERIAL_ECHO(filenames[file_subcall_ctr]);
276
      SERIAL_ECHOPGM("\" pos");
213
      SERIAL_ECHOPGM("\" pos");
277
      SERIAL_ECHOLN(sdpos);
214
      SERIAL_ECHOLN(sdpos);
278
-     filespos[file_subcall_ctr]=sdpos;
215
+     filespos[file_subcall_ctr] = sdpos;
279
      file_subcall_ctr++;
216
      file_subcall_ctr++;
280
     }
217
     }
281
-    else
282
-    {
218
+    else {
283
      SERIAL_ECHO_START;
219
      SERIAL_ECHO_START;
284
      SERIAL_ECHOPGM("Now doing file: ");
220
      SERIAL_ECHOPGM("Now doing file: ");
285
      SERIAL_ECHOLN(name);
221
      SERIAL_ECHOLN(name);
286
     }
222
     }
287
     file.close();
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
     SERIAL_ECHO_START;
227
     SERIAL_ECHO_START;
293
     SERIAL_ECHOPGM("Now fresh file: ");
228
     SERIAL_ECHOPGM("Now fresh file: ");
294
     SERIAL_ECHOLN(name);
229
     SERIAL_ECHOLN(name);
295
   }
230
   }
296
   sdprinting = false;
231
   sdprinting = false;
297
-  
298
- 
232
+
299
   SdFile myDir;
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
         char subdirname[FILENAME_LENGTH];
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
         SERIAL_ECHOLN(subdirname);
248
         SERIAL_ECHOLN(subdirname);
318
-        if(!myDir.open(curDir,subdirname,O_READ))
319
-        {
249
+        if (!myDir.open(curDir, subdirname, O_READ)) {
320
           SERIAL_PROTOCOLPGM(MSG_SD_OPEN_FILE_FAIL);
250
           SERIAL_PROTOCOLPGM(MSG_SD_OPEN_FILE_FAIL);
321
           SERIAL_PROTOCOL(subdirname);
251
           SERIAL_PROTOCOL(subdirname);
322
           SERIAL_PROTOCOLLNPGM(".");
252
           SERIAL_PROTOCOLLNPGM(".");
323
           return;
253
           return;
324
         }
254
         }
325
-        else
326
-        {
255
+        else {
327
           //SERIAL_ECHOLN("dive ok");
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
         //SERIAL_ECHOLN(fname);
265
         //SERIAL_ECHOLN(fname);
338
         break;
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
       filesize = file.fileSize();
276
       filesize = file.fileSize();
352
       SERIAL_PROTOCOLPGM(MSG_SD_FILE_OPENED);
277
       SERIAL_PROTOCOLPGM(MSG_SD_FILE_OPENED);
353
       SERIAL_PROTOCOL(fname);
278
       SERIAL_PROTOCOL(fname);
354
       SERIAL_PROTOCOLPGM(MSG_SD_SIZE);
279
       SERIAL_PROTOCOLPGM(MSG_SD_SIZE);
355
       SERIAL_PROTOCOLLN(filesize);
280
       SERIAL_PROTOCOLLN(filesize);
356
       sdpos = 0;
281
       sdpos = 0;
357
-      
282
+
358
       SERIAL_PROTOCOLLNPGM(MSG_SD_FILE_SELECTED);
283
       SERIAL_PROTOCOLLNPGM(MSG_SD_FILE_SELECTED);
359
       getfilename(0, fname);
284
       getfilename(0, fname);
360
       lcd_setstatus(longFilename[0] ? longFilename : fname);
285
       lcd_setstatus(longFilename[0] ? longFilename : fname);
361
     }
286
     }
362
-    else
363
-    {
287
+    else {
364
       SERIAL_PROTOCOLPGM(MSG_SD_OPEN_FILE_FAIL);
288
       SERIAL_PROTOCOLPGM(MSG_SD_OPEN_FILE_FAIL);
365
       SERIAL_PROTOCOL(fname);
289
       SERIAL_PROTOCOL(fname);
366
       SERIAL_PROTOCOLLNPGM(".");
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
       SERIAL_PROTOCOLPGM(MSG_SD_OPEN_FILE_FAIL);
295
       SERIAL_PROTOCOLPGM(MSG_SD_OPEN_FILE_FAIL);
374
       SERIAL_PROTOCOL(fname);
296
       SERIAL_PROTOCOL(fname);
375
       SERIAL_PROTOCOLLNPGM(".");
297
       SERIAL_PROTOCOLLNPGM(".");
376
     }
298
     }
377
-    else
378
-    {
299
+    else {
379
       saving = true;
300
       saving = true;
380
       SERIAL_PROTOCOLPGM(MSG_SD_WRITE_TO_FILE);
301
       SERIAL_PROTOCOLPGM(MSG_SD_WRITE_TO_FILE);
381
       SERIAL_PROTOCOLLN(name);
302
       SERIAL_PROTOCOLLN(name);
382
       lcd_setstatus(fname);
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
   file.close();
311
   file.close();
393
   sdprinting = false;
312
   sdprinting = false;
394
-  
395
-  
313
+
396
   SdFile myDir;
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
         char subdirname[FILENAME_LENGTH];
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
         SERIAL_ECHOLN(subdirname);
329
         SERIAL_ECHOLN(subdirname);
415
-        if(!myDir.open(curDir,subdirname,O_READ))
416
-        {
330
+        if (!myDir.open(curDir, subdirname, O_READ)) {
417
           SERIAL_PROTOCOLPGM("open failed, File: ");
331
           SERIAL_PROTOCOLPGM("open failed, File: ");
418
           SERIAL_PROTOCOL(subdirname);
332
           SERIAL_PROTOCOL(subdirname);
419
           SERIAL_PROTOCOLLNPGM(".");
333
           SERIAL_PROTOCOLLNPGM(".");
420
           return;
334
           return;
421
         }
335
         }
422
-        else
423
-        {
336
+        else {
424
           //SERIAL_ECHOLN("dive ok");
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
         //SERIAL_ECHOLN(fname);
346
         //SERIAL_ECHOLN(fname);
435
         break;
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
     SERIAL_PROTOCOLPGM(MSG_SD_PRINTING_BYTE);
369
     SERIAL_PROTOCOLPGM(MSG_SD_PRINTING_BYTE);
463
     SERIAL_PROTOCOL(sdpos);
370
     SERIAL_PROTOCOL(sdpos);
464
     SERIAL_PROTOCOLPGM("/");
371
     SERIAL_PROTOCOLPGM("/");
465
     SERIAL_PROTOCOLLN(filesize);
372
     SERIAL_PROTOCOLLN(filesize);
466
   }
373
   }
467
-  else{
374
+  else {
468
     SERIAL_PROTOCOLLNPGM(MSG_SD_NOT_PRINTING);
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
   char* begin = buf;
380
   char* begin = buf;
474
   char* npos = 0;
381
   char* npos = 0;
475
   char* end = buf + strlen(buf) - 1;
382
   char* end = buf + strlen(buf) - 1;
476
 
383
 
477
   file.writeError = false;
384
   file.writeError = false;
478
-  if((npos = strchr(buf, 'N')) != NULL)
479
-  {
385
+  if ((npos = strchr(buf, 'N')) != NULL) {
480
     begin = strchr(npos, ' ') + 1;
386
     begin = strchr(npos, ' ') + 1;
481
     end = strchr(npos, '*') - 1;
387
     end = strchr(npos, '*') - 1;
482
   }
388
   }
484
   end[2] = '\n';
390
   end[2] = '\n';
485
   end[3] = '\0';
391
   end[3] = '\0';
486
   file.write(begin);
392
   file.write(begin);
487
-  if (file.writeError)
488
-  {
393
+  if (file.writeError) {
489
     SERIAL_ERROR_START;
394
     SERIAL_ERROR_START;
490
     SERIAL_ERRORLNPGM(MSG_SD_ERR_WRITE_TO_FILE);
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
     initsd();
406
     initsd();
508
-    if(!cardOK) //fail
509
-      return;
407
+    if (!cardOK) return; // fail
510
   }
408
   }
511
-  
409
+
512
   char autoname[30];
410
   char autoname[30];
513
   sprintf_P(autoname, PSTR("auto%i.g"), autostart_index);
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
   dir_t p;
414
   dir_t p;
517
 
415
 
518
   root.rewind();
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
       sprintf_P(cmd, PSTR("M23 %s"), autoname);
423
       sprintf_P(cmd, PSTR("M23 %s"), autoname);
534
       enquecommand(cmd);
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
   else
431
   else
542
     autostart_index++;
432
     autostart_index++;
543
 }
433
 }
544
 
434
 
545
-void CardReader::closefile(bool store_location)
546
-{
435
+void CardReader::closefile(bool store_location) {
547
   file.sync();
436
   file.sync();
548
   file.close();
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
     //future: store printer state, filename and position for continuing a stopped print
441
     //future: store printer state, filename and position for continuing a stopped print
555
     // so one can unplug the printer and continue printing the next day.
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
   curDir->rewind();
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
   curDir->rewind();
461
   curDir->rewind();
578
-  lsDive("",*curDir);
462
+  lsDive("", *curDir);
579
   //SERIAL_ECHOLN(nrFiles);
463
   //SERIAL_ECHOLN(nrFiles);
580
   return nrFiles;
464
   return nrFiles;
581
 }
465
 }
582
 
466
 
583
-void CardReader::chdir(const char * relpath)
584
-{
467
+void CardReader::chdir(const char * relpath) {
585
   SdFile newfile;
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
     if (workDirDepth < MAX_DIR_DEPTH) {
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
     --workDirDepth;
490
     --workDirDepth;
613
     workDir = workDirParents[0];
491
     workDir = workDirParents[0];
614
-    int d;
615
     for (int d = 0; d < workDirDepth; d++)
492
     for (int d = 0; d < workDirDepth; d++)
616
       workDirParents[d] = workDirParents[d+1];
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
 #endif //SDSUPPORT
518
 #endif //SDSUPPORT

+ 30
- 34
Marlin/cardreader.h Zobrazit soubor

3
 
3
 
4
 #ifdef SDSUPPORT
4
 #ifdef SDSUPPORT
5
 
5
 
6
-#define MAX_DIR_DEPTH 10
6
+#define MAX_DIR_DEPTH 10          // Maximum folder depth
7
 
7
 
8
 #include "SdFile.h"
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
 public:
12
 public:
13
   CardReader();
13
   CardReader();
14
-  
14
+
15
   void initsd();
15
   void initsd();
16
   void write_command(char *buf);
16
   void write_command(char *buf);
17
   //files auto[0-9].g on the sd card are performed in a row
17
   //files auto[0-9].g on the sd card are performed in a row
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
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
   void openFile(char* name,bool read,bool replace_current=true);
21
   void openFile(char* name,bool read,bool replace_current=true);
22
   void openLogFile(char* name);
22
   void openLogFile(char* name);
23
   void removeFile(char* name);
23
   void removeFile(char* name);
30
 
30
 
31
   void getfilename(uint16_t nr, const char* const match=NULL);
31
   void getfilename(uint16_t nr, const char* const match=NULL);
32
   uint16_t getnrfilenames();
32
   uint16_t getnrfilenames();
33
-  
33
+
34
   void getAbsFilename(char *t);
34
   void getAbsFilename(char *t);
35
-  
36
 
35
 
37
   void ls();
36
   void ls();
38
   void chdir(const char * relpath);
37
   void chdir(const char * relpath);
41
 
40
 
42
 
41
 
43
   FORCE_INLINE bool isFileOpen() { return file.isOpen(); }
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
 public:
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
   int autostart_index;
52
   int autostart_index;
59
 private:
53
 private:
60
-  SdFile root,*curDir,workDir,workDirParents[MAX_DIR_DEPTH];
54
+  SdFile root, *curDir, workDir, workDirParents[MAX_DIR_DEPTH];
61
   uint16_t workDirDepth;
55
   uint16_t workDirDepth;
62
   Sd2Card card;
56
   Sd2Card card;
63
   SdVolume volume;
57
   SdVolume volume;
64
   SdFile file;
58
   SdFile file;
65
   #define SD_PROCEDURE_DEPTH 1
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
   uint8_t file_subcall_ctr;
61
   uint8_t file_subcall_ctr;
68
   uint32_t filespos[SD_PROCEDURE_DEPTH];
62
   uint32_t filespos[SD_PROCEDURE_DEPTH];
69
   char filenames[SD_PROCEDURE_DEPTH][MAXPATHNAMELENGTH];
63
   char filenames[SD_PROCEDURE_DEPTH][MAXPATHNAMELENGTH];
70
   uint32_t filesize;
64
   uint32_t filesize;
71
-  //int16_t n;
72
   unsigned long autostart_atmillis;
65
   unsigned long autostart_atmillis;
73
-  uint32_t sdpos ;
66
+  uint32_t sdpos;
74
 
67
 
75
   bool autostart_stilltocheck; //the sd start is delayed, because otherwise the serial cannot answer fast enought to make contact with the hostsoftware.
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
   LsAction lsAction; //stored for recursion.
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
   char* diveDirName;
72
   char* diveDirName;
80
   void lsDive(const char *prepend, SdFile parent, const char * const match=NULL);
73
   void lsDive(const char *prepend, SdFile parent, const char * const match=NULL);
81
 };
74
 };
75
+
82
 extern CardReader card;
76
 extern CardReader card;
77
+
83
 #define IS_SD_PRINTING (card.sdprinting)
78
 #define IS_SD_PRINTING (card.sdprinting)
84
 
79
 
85
 #if (SDCARDDETECT > -1)
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
 #else
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
 #endif
89
 #endif
95
 
90
 
96
 #else
91
 #else
98
 #define IS_SD_PRINTING (false)
93
 #define IS_SD_PRINTING (false)
99
 
94
 
100
 #endif //SDSUPPORT
95
 #endif //SDSUPPORT
101
-#endif
96
+
97
+#endif //__CARDREADER_H

+ 38
- 39
Marlin/digipot_mcp4451.cpp Zobrazit soubor

1
 #include "Configuration.h"
1
 #include "Configuration.h"
2
 
2
 
3
 #ifdef DIGIPOT_I2C
3
 #ifdef DIGIPOT_I2C
4
+
4
 #include "Stream.h"
5
 #include "Stream.h"
5
 #include "utility/twi.h"
6
 #include "utility/twi.h"
6
 #include "Wire.h"
7
 #include "Wire.h"
7
 
8
 
8
 // Settings for the I2C based DIGIPOT (MCP4451) on Azteeg X3 Pro
9
 // Settings for the I2C based DIGIPOT (MCP4451) on Azteeg X3 Pro
9
 #if MB(5DPRINT)
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
 #else
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
 #endif
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
 // This is for the MCP4451 I2C based digipot
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 Zobrazit soubor

21
 **/
21
 **/
22
 
22
 
23
 #ifdef ULTIPANEL
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
 #endif
31
 #endif
36
 
32
 
37
 #include <U8glib.h>
33
 #include <U8glib.h>
92
 #elif defined(MAKRPANEL)
88
 #elif defined(MAKRPANEL)
93
 // The MaKrPanel display, ST7565 controller as well
89
 // The MaKrPanel display, ST7565 controller as well
94
 U8GLIB_NHD_C12864 u8g(DOGLCD_CS, DOGLCD_A0);
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
 #else
94
 #else
96
 // for regular DOGM128 display with HW-SPI
95
 // for regular DOGM128 display with HW-SPI
97
 U8GLIB_DOGM128 u8g(DOGLCD_CS, DOGLCD_A0);  // HW-SPI Com: CS, A0
96
 U8GLIB_DOGM128 u8g(DOGLCD_CS, DOGLCD_A0);  // HW-SPI Com: CS, A0
312
 
311
 
313
 static void _drawmenu_setting_edit_generic(uint8_t row, const char* pstr, char pre_char, const char* data, bool pgm) {
312
 static void _drawmenu_setting_edit_generic(uint8_t row, const char* pstr, char pre_char, const char* data, bool pgm) {
314
   char c;
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
   lcd_implementation_mark_as_selected(row, pre_char);
316
   lcd_implementation_mark_as_selected(row, pre_char);
318
 
317
 
374
   uint8_t char_width = DOG_CHAR_WIDTH;
373
   uint8_t char_width = DOG_CHAR_WIDTH;
375
 
374
 
376
   #ifdef USE_BIG_EDIT_FONT
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
       u8g.setFont(FONT_MENU_EDIT);
377
       u8g.setFont(FONT_MENU_EDIT);
379
       lcd_width = LCD_WIDTH_EDIT + 1;
378
       lcd_width = LCD_WIDTH_EDIT + 1;
380
       char_width = DOG_CHAR_WIDTH_EDIT;
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
     else {
382
     else {
384
       u8g.setFont(FONT_MENU);
383
       u8g.setFont(FONT_MENU);
385
     }
384
     }
386
   #endif
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
   const float kHalfChar = DOG_CHAR_HEIGHT_EDIT / 2;
389
   const float kHalfChar = DOG_CHAR_HEIGHT_EDIT / 2;
391
   float rowHeight = u8g.getHeight() / (rows + 1); // 1/(rows+1) = 1/2 or 1/3
390
   float rowHeight = u8g.getHeight() / (rows + 1); // 1/(rows+1) = 1/2 or 1/3
393
   u8g.setPrintPos(0, rowHeight + kHalfChar);
392
   u8g.setPrintPos(0, rowHeight + kHalfChar);
394
   lcd_printPGM(pstr);
393
   lcd_printPGM(pstr);
395
   u8g.print(':');
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
   u8g.print(value);
396
   u8g.print(value);
398
 }
397
 }
399
 
398
 

+ 36
- 2
Marlin/example_configurations/Hephestos/Configuration.h Zobrazit soubor

1
-#ifndef CONFIGURATION_H
1
+#ifndef CONFIGURATION_H
2
 #define CONFIGURATION_H
2
 #define CONFIGURATION_H
3
 
3
 
4
 #include "boards.h"
4
 #include "boards.h"
122
 #define TEMP_SENSOR_0 1
122
 #define TEMP_SENSOR_0 1
123
 #define TEMP_SENSOR_1 0
123
 #define TEMP_SENSOR_1 0
124
 #define TEMP_SENSOR_2 0
124
 #define TEMP_SENSOR_2 0
125
+#define TEMP_SENSOR_3 0
125
 #define TEMP_SENSOR_BED 0
126
 #define TEMP_SENSOR_BED 0
126
 
127
 
127
 // 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.
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
 #define HEATER_0_MINTEMP 5
140
 #define HEATER_0_MINTEMP 5
140
 #define HEATER_1_MINTEMP 5
141
 #define HEATER_1_MINTEMP 5
141
 #define HEATER_2_MINTEMP 5
142
 #define HEATER_2_MINTEMP 5
143
+#define HEATER_3_MINTEMP 5
142
 #define BED_MINTEMP 5
144
 #define BED_MINTEMP 5
143
 
145
 
144
 // When temperature exceeds max temp, your heater will be switched off.
146
 // When temperature exceeds max temp, your heater will be switched off.
147
 #define HEATER_0_MAXTEMP 260
149
 #define HEATER_0_MAXTEMP 260
148
 #define HEATER_1_MAXTEMP 260
150
 #define HEATER_1_MAXTEMP 260
149
 #define HEATER_2_MAXTEMP 260
151
 #define HEATER_2_MAXTEMP 260
152
+#define HEATER_3_MAXTEMP 260
150
 #define BED_MAXTEMP 150
153
 #define BED_MAXTEMP 150
151
 
154
 
152
 // If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
155
 // If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
351
 #define INVERT_Y_DIR false    // for Mendel set to true, for Orca set to false
354
 #define INVERT_Y_DIR false    // for Mendel set to true, for Orca set to false
352
 #define INVERT_Z_DIR true     // for Mendel set to false, for Orca set to true
355
 #define INVERT_Z_DIR true     // for Mendel set to false, for Orca set to true
353
 #define INVERT_E0_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
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
 #define INVERT_E2_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
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
 // ENDSTOP SETTINGS:
361
 // ENDSTOP SETTINGS:
358
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
362
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
583
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
587
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
584
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
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
 // The MaKr3d Makr-Panel with graphic controller and SD support
594
 // The MaKr3d Makr-Panel with graphic controller and SD support
587
 // http://reprap.org/wiki/MaKr3d_MaKrPanel
595
 // http://reprap.org/wiki/MaKr3d_MaKrPanel
588
 //#define MAKRPANEL
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
 // The RepRapDiscount Smart Controller (white PCB)
604
 // The RepRapDiscount Smart Controller (white PCB)
591
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
605
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
592
 #define REPRAP_DISCOUNT_SMART_CONTROLLER
606
 #define REPRAP_DISCOUNT_SMART_CONTROLLER
620
  #define DEFAULT_LCD_CONTRAST 17
634
  #define DEFAULT_LCD_CONTRAST 17
621
 #endif
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
 #if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
657
 #if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
624
  #define DOGLCD
658
  #define DOGLCD
625
  #define U8GLIB_ST7920
659
  #define U8GLIB_ST7920

+ 5
- 0
Marlin/example_configurations/Hephestos/Configuration_adv.h Zobrazit soubor

284
 //=============================Additional Features===========================
284
 //=============================Additional Features===========================
285
 //===========================================================================
285
 //===========================================================================
286
 
286
 
287
+#define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
288
+#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value
289
+#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value
290
+//#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
291
+
287
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
292
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
288
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
293
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
289
 
294
 

+ 37
- 3
Marlin/example_configurations/K8200/Configuration.h Zobrazit soubor

1
-#ifndef CONFIGURATION_H
1
+#ifndef CONFIGURATION_H
2
 #define CONFIGURATION_H
2
 #define CONFIGURATION_H
3
 
3
 
4
 #include "boards.h"
4
 #include "boards.h"
124
 #define TEMP_SENSOR_0 5
124
 #define TEMP_SENSOR_0 5
125
 #define TEMP_SENSOR_1 0
125
 #define TEMP_SENSOR_1 0
126
 #define TEMP_SENSOR_2 0
126
 #define TEMP_SENSOR_2 0
127
+#define TEMP_SENSOR_3 0
127
 #define TEMP_SENSOR_BED 5
128
 #define TEMP_SENSOR_BED 5
128
 
129
 
129
 // 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.
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
 #define HEATER_0_MINTEMP 5
142
 #define HEATER_0_MINTEMP 5
142
 #define HEATER_1_MINTEMP 5
143
 #define HEATER_1_MINTEMP 5
143
 #define HEATER_2_MINTEMP 5
144
 #define HEATER_2_MINTEMP 5
145
+#define HEATER_3_MINTEMP 5
144
 #define BED_MINTEMP 5
146
 #define BED_MINTEMP 5
145
 
147
 
146
 // When temperature exceeds max temp, your heater will be switched off.
148
 // When temperature exceeds max temp, your heater will be switched off.
149
 #define HEATER_0_MAXTEMP 275
151
 #define HEATER_0_MAXTEMP 275
150
 #define HEATER_1_MAXTEMP 275
152
 #define HEATER_1_MAXTEMP 275
151
 #define HEATER_2_MAXTEMP 275
153
 #define HEATER_2_MAXTEMP 275
154
+#define HEATER_3_MAXTEMP 275
152
 #define BED_MAXTEMP 150
155
 #define BED_MAXTEMP 150
153
 
156
 
154
 // If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
157
 // If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
357
 
360
 
358
 #define INVERT_X_DIR false    // for Mendel set to false, for Orca set to true
361
 #define INVERT_X_DIR false    // for Mendel set to false, for Orca set to true
359
 #define INVERT_Y_DIR false    // for Mendel set to true, for Orca set to false
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
 #define INVERT_E0_DIR true   // for direct drive extruder v9 set to true, for geared extruder set to false
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
 #define INVERT_E2_DIR true   // for direct drive extruder v9 set to true, for geared extruder set to false
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
 // ENDSTOP SETTINGS:
369
 // ENDSTOP SETTINGS:
366
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
370
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
593
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
597
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
594
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
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
 // The MaKr3d Makr-Panel with graphic controller and SD support
604
 // The MaKr3d Makr-Panel with graphic controller and SD support
597
 // http://reprap.org/wiki/MaKr3d_MaKrPanel
605
 // http://reprap.org/wiki/MaKr3d_MaKrPanel
598
 //#define MAKRPANEL
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
 // The RepRapDiscount Smart Controller (white PCB)
614
 // The RepRapDiscount Smart Controller (white PCB)
601
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
615
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
602
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER
616
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER
630
  #define DEFAULT_LCD_CONTRAST 17
644
  #define DEFAULT_LCD_CONTRAST 17
631
 #endif
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
 #if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
667
 #if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
634
  #define DOGLCD
668
  #define DOGLCD
635
  #define U8GLIB_ST7920
669
  #define U8GLIB_ST7920

+ 5
- 0
Marlin/example_configurations/K8200/Configuration_adv.h Zobrazit soubor

284
 //=============================Additional Features===========================
284
 //=============================Additional Features===========================
285
 //===========================================================================
285
 //===========================================================================
286
 
286
 
287
+#define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
288
+#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value
289
+#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value
290
+//#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
291
+
287
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
292
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
288
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
293
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
289
 
294
 

+ 36
- 2
Marlin/example_configurations/SCARA/Configuration.h Zobrazit soubor

1
-#ifndef CONFIGURATION_H
1
+#ifndef CONFIGURATION_H
2
 #define CONFIGURATION_H
2
 #define CONFIGURATION_H
3
 
3
 
4
 #include "boards.h"
4
 #include "boards.h"
142
 #define TEMP_SENSOR_0 1
142
 #define TEMP_SENSOR_0 1
143
 #define TEMP_SENSOR_1 0
143
 #define TEMP_SENSOR_1 0
144
 #define TEMP_SENSOR_2 0
144
 #define TEMP_SENSOR_2 0
145
+#define TEMP_SENSOR_3 0
145
 #define TEMP_SENSOR_BED 1
146
 #define TEMP_SENSOR_BED 1
146
 
147
 
147
 // 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.
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
 #define HEATER_0_MINTEMP 5
160
 #define HEATER_0_MINTEMP 5
160
 #define HEATER_1_MINTEMP 5
161
 #define HEATER_1_MINTEMP 5
161
 #define HEATER_2_MINTEMP 5
162
 #define HEATER_2_MINTEMP 5
163
+#define HEATER_3_MINTEMP 5
162
 #define BED_MINTEMP 5
164
 #define BED_MINTEMP 5
163
 
165
 
164
 // When temperature exceeds max temp, your heater will be switched off.
166
 // When temperature exceeds max temp, your heater will be switched off.
167
 #define HEATER_0_MAXTEMP 275
169
 #define HEATER_0_MAXTEMP 275
168
 #define HEATER_1_MAXTEMP 275
170
 #define HEATER_1_MAXTEMP 275
169
 #define HEATER_2_MAXTEMP 275
171
 #define HEATER_2_MAXTEMP 275
172
+#define HEATER_3_MAXTEMP 275
170
 #define BED_MAXTEMP 150
173
 #define BED_MAXTEMP 150
171
 
174
 
172
 // If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
175
 // If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
380
 #define INVERT_Y_DIR false    // for Mendel set to true, for Orca set to false
383
 #define INVERT_Y_DIR false    // for Mendel set to true, for Orca set to false
381
 #define INVERT_Z_DIR true     // for Mendel set to false, for Orca set to true
384
 #define INVERT_Z_DIR true     // for Mendel set to false, for Orca set to true
382
 #define INVERT_E0_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
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
 #define INVERT_E2_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
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
 // ENDSTOP SETTINGS:
390
 // ENDSTOP SETTINGS:
387
 // Sets direction of endstop	s when homing; 1=MAX, -1=MIN
391
 // Sets direction of endstop	s when homing; 1=MAX, -1=MIN
586
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
590
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
587
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
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
 // The MaKr3d Makr-Panel with graphic controller and SD support
597
 // The MaKr3d Makr-Panel with graphic controller and SD support
590
 // http://reprap.org/wiki/MaKr3d_MaKrPanel
598
 // http://reprap.org/wiki/MaKr3d_MaKrPanel
591
 //#define MAKRPANEL
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
 // The RepRapDiscount Smart Controller (white PCB)
607
 // The RepRapDiscount Smart Controller (white PCB)
594
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
608
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
595
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER
609
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER
623
  #define DEFAULT_LCD_CONTRAST 17
637
  #define DEFAULT_LCD_CONTRAST 17
624
 #endif
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
 #if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
660
 #if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
627
  #define DOGLCD
661
  #define DOGLCD
628
  #define U8GLIB_ST7920
662
  #define U8GLIB_ST7920

+ 17
- 0
Marlin/example_configurations/SCARA/Configuration_adv.h Zobrazit soubor

78
 #define EXTRUDER_0_AUTO_FAN_PIN   -1
78
 #define EXTRUDER_0_AUTO_FAN_PIN   -1
79
 #define EXTRUDER_1_AUTO_FAN_PIN   -1
79
 #define EXTRUDER_1_AUTO_FAN_PIN   -1
80
 #define EXTRUDER_2_AUTO_FAN_PIN   -1
80
 #define EXTRUDER_2_AUTO_FAN_PIN   -1
81
+#define EXTRUDER_3_AUTO_FAN_PIN   -1
81
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
82
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
82
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
83
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
83
 
84
 
286
 //=============================Additional Features===========================
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
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
295
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
290
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
296
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
291
 
297
 
478
   #define THERMISTORHEATER_2 TEMP_SENSOR_2
484
   #define THERMISTORHEATER_2 TEMP_SENSOR_2
479
   #define HEATER_2_USES_THERMISTOR
485
   #define HEATER_2_USES_THERMISTOR
480
 #endif
486
 #endif
487
+#if TEMP_SENSOR_3 > 0
488
+  #define THERMISTORHEATER_3 TEMP_SENSOR_3
489
+  #define HEATER_3_USES_THERMISTOR
490
+#endif
481
 #if TEMP_SENSOR_BED > 0
491
 #if TEMP_SENSOR_BED > 0
482
   #define THERMISTORBED TEMP_SENSOR_BED
492
   #define THERMISTORBED TEMP_SENSOR_BED
483
   #define BED_USES_THERMISTOR
493
   #define BED_USES_THERMISTOR
491
 #if TEMP_SENSOR_2 == -1
501
 #if TEMP_SENSOR_2 == -1
492
   #define HEATER_2_USES_AD595
502
   #define HEATER_2_USES_AD595
493
 #endif
503
 #endif
504
+#if TEMP_SENSOR_3 == -1
505
+  #define HEATER_3_USES_AD595
506
+#endif
494
 #if TEMP_SENSOR_BED == -1
507
 #if TEMP_SENSOR_BED == -1
495
   #define BED_USES_AD595
508
   #define BED_USES_AD595
496
 #endif
509
 #endif
509
   #undef HEATER_2_MINTEMP
522
   #undef HEATER_2_MINTEMP
510
   #undef HEATER_2_MAXTEMP
523
   #undef HEATER_2_MAXTEMP
511
 #endif
524
 #endif
525
+#if TEMP_SENSOR_3 == 0
526
+  #undef HEATER_3_MINTEMP
527
+  #undef HEATER_3_MAXTEMP
528
+#endif
512
 #if TEMP_SENSOR_BED == 0
529
 #if TEMP_SENSOR_BED == 0
513
   #undef BED_MINTEMP
530
   #undef BED_MINTEMP
514
   #undef BED_MAXTEMP
531
   #undef BED_MAXTEMP

+ 37
- 3
Marlin/example_configurations/WITBOX/Configuration.h Zobrazit soubor

1
-#ifndef CONFIGURATION_H
1
+#ifndef CONFIGURATION_H
2
 #define CONFIGURATION_H
2
 #define CONFIGURATION_H
3
 
3
 
4
 #include "boards.h"
4
 #include "boards.h"
125
 #define TEMP_SENSOR_0 1
125
 #define TEMP_SENSOR_0 1
126
 #define TEMP_SENSOR_1 0
126
 #define TEMP_SENSOR_1 0
127
 #define TEMP_SENSOR_2 0
127
 #define TEMP_SENSOR_2 0
128
+#define TEMP_SENSOR_3 0
128
 #define TEMP_SENSOR_BED 0
129
 #define TEMP_SENSOR_BED 0
129
 
130
 
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.
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
 #define HEATER_0_MINTEMP 5
143
 #define HEATER_0_MINTEMP 5
143
 #define HEATER_1_MINTEMP 5
144
 #define HEATER_1_MINTEMP 5
144
 #define HEATER_2_MINTEMP 5
145
 #define HEATER_2_MINTEMP 5
146
+#define HEATER_3_MINTEMP 5
145
 #define BED_MINTEMP 5
147
 #define BED_MINTEMP 5
146
 
148
 
147
 // When temperature exceeds max temp, your heater will be switched off.
149
 // When temperature exceeds max temp, your heater will be switched off.
150
 #define HEATER_0_MAXTEMP 260
152
 #define HEATER_0_MAXTEMP 260
151
 #define HEATER_1_MAXTEMP 260
153
 #define HEATER_1_MAXTEMP 260
152
 #define HEATER_2_MAXTEMP 260
154
 #define HEATER_2_MAXTEMP 260
155
+#define HEATER_3_MAXTEMP 260
153
 #define BED_MAXTEMP 150
156
 #define BED_MAXTEMP 150
154
 
157
 
155
 // If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
158
 // If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
351
 #define DISABLE_E false // For all extruders
354
 #define DISABLE_E false // For all extruders
352
 #define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
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
 #define INVERT_Y_DIR false    // for Mendel set to true, for Orca set to false
358
 #define INVERT_Y_DIR false    // for Mendel set to true, for Orca set to false
356
 #define INVERT_Z_DIR true     // for Mendel set to false, for Orca set to true
359
 #define INVERT_Z_DIR true     // for Mendel set to false, for Orca set to true
357
 #define INVERT_E0_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
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
 #define INVERT_E2_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
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
 // ENDSTOP SETTINGS:
365
 // ENDSTOP SETTINGS:
362
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
366
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
587
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
591
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
588
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
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
 // The MaKr3d Makr-Panel with graphic controller and SD support
598
 // The MaKr3d Makr-Panel with graphic controller and SD support
591
 // http://reprap.org/wiki/MaKr3d_MaKrPanel
599
 // http://reprap.org/wiki/MaKr3d_MaKrPanel
592
 //#define MAKRPANEL
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
 // The RepRapDiscount Smart Controller (white PCB)
608
 // The RepRapDiscount Smart Controller (white PCB)
595
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
609
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
596
 #define REPRAP_DISCOUNT_SMART_CONTROLLER
610
 #define REPRAP_DISCOUNT_SMART_CONTROLLER
624
  #define DEFAULT_LCD_CONTRAST 17
638
  #define DEFAULT_LCD_CONTRAST 17
625
 #endif
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
 #if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
661
 #if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
628
  #define DOGLCD
662
  #define DOGLCD
629
  #define U8GLIB_ST7920
663
  #define U8GLIB_ST7920

+ 5
- 0
Marlin/example_configurations/WITBOX/Configuration_adv.h Zobrazit soubor

284
 //=============================Additional Features===========================
284
 //=============================Additional Features===========================
285
 //===========================================================================
285
 //===========================================================================
286
 
286
 
287
+#define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
288
+#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceed this value, multiple the steps moved by ten to quickly advance the value
289
+#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceed this value, multiple the steps moved by 100 to really quickly advance the value
290
+//#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
291
+
287
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
292
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
288
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
293
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
289
 
294
 

+ 36
- 2
Marlin/example_configurations/delta/Configuration.h Zobrazit soubor

1
-#ifndef CONFIGURATION_H
1
+#ifndef CONFIGURATION_H
2
 #define CONFIGURATION_H
2
 #define CONFIGURATION_H
3
 
3
 
4
 #include "boards.h"
4
 #include "boards.h"
147
 #define TEMP_SENSOR_0 -1
147
 #define TEMP_SENSOR_0 -1
148
 #define TEMP_SENSOR_1 -1
148
 #define TEMP_SENSOR_1 -1
149
 #define TEMP_SENSOR_2 0
149
 #define TEMP_SENSOR_2 0
150
+#define TEMP_SENSOR_3 0
150
 #define TEMP_SENSOR_BED 0
151
 #define TEMP_SENSOR_BED 0
151
 
152
 
152
 // 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.
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
 #define HEATER_0_MINTEMP 5
165
 #define HEATER_0_MINTEMP 5
165
 #define HEATER_1_MINTEMP 5
166
 #define HEATER_1_MINTEMP 5
166
 #define HEATER_2_MINTEMP 5
167
 #define HEATER_2_MINTEMP 5
168
+#define HEATER_3_MINTEMP 5
167
 #define BED_MINTEMP 5
169
 #define BED_MINTEMP 5
168
 
170
 
169
 // When temperature exceeds max temp, your heater will be switched off.
171
 // When temperature exceeds max temp, your heater will be switched off.
172
 #define HEATER_0_MAXTEMP 275
174
 #define HEATER_0_MAXTEMP 275
173
 #define HEATER_1_MAXTEMP 275
175
 #define HEATER_1_MAXTEMP 275
174
 #define HEATER_2_MAXTEMP 275
176
 #define HEATER_2_MAXTEMP 275
177
+#define HEATER_3_MAXTEMP 275
175
 #define BED_MAXTEMP 150
178
 #define BED_MAXTEMP 150
176
 
179
 
177
 // If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
180
 // If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
368
 #define INVERT_Z_DIR false
371
 #define INVERT_Z_DIR false
369
 
372
 
370
 #define INVERT_E0_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
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
 #define INVERT_E2_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
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
 // ENDSTOP SETTINGS:
378
 // ENDSTOP SETTINGS:
375
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
379
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
491
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
495
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
492
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
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
 // The MaKr3d Makr-Panel with graphic controller and SD support
502
 // The MaKr3d Makr-Panel with graphic controller and SD support
495
 // http://reprap.org/wiki/MaKr3d_MaKrPanel
503
 // http://reprap.org/wiki/MaKr3d_MaKrPanel
496
 //#define MAKRPANEL
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
 // The RepRapDiscount Smart Controller (white PCB)
512
 // The RepRapDiscount Smart Controller (white PCB)
499
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
513
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
500
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER
514
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER
535
  #define DEFAULT_LCD_CONTRAST 17
549
  #define DEFAULT_LCD_CONTRAST 17
536
 #endif
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
 #if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
572
 #if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
539
  #define DOGLCD
573
  #define DOGLCD
540
  #define U8GLIB_ST7920
574
  #define U8GLIB_ST7920

+ 17
- 0
Marlin/example_configurations/delta/Configuration_adv.h Zobrazit soubor

78
 #define EXTRUDER_0_AUTO_FAN_PIN   -1
78
 #define EXTRUDER_0_AUTO_FAN_PIN   -1
79
 #define EXTRUDER_1_AUTO_FAN_PIN   -1
79
 #define EXTRUDER_1_AUTO_FAN_PIN   -1
80
 #define EXTRUDER_2_AUTO_FAN_PIN   -1
80
 #define EXTRUDER_2_AUTO_FAN_PIN   -1
81
+#define EXTRUDER_3_AUTO_FAN_PIN   -1
81
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
82
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
82
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
83
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
83
 
84
 
278
 //=============================Additional Features===========================
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
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
287
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
282
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
288
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
283
 
289
 
472
   #define THERMISTORHEATER_2 TEMP_SENSOR_2
478
   #define THERMISTORHEATER_2 TEMP_SENSOR_2
473
   #define HEATER_2_USES_THERMISTOR
479
   #define HEATER_2_USES_THERMISTOR
474
 #endif
480
 #endif
481
+#if TEMP_SENSOR_3 > 0
482
+  #define THERMISTORHEATER_3 TEMP_SENSOR_3
483
+  #define HEATER_3_USES_THERMISTOR
484
+#endif
475
 #if TEMP_SENSOR_BED > 0
485
 #if TEMP_SENSOR_BED > 0
476
   #define THERMISTORBED TEMP_SENSOR_BED
486
   #define THERMISTORBED TEMP_SENSOR_BED
477
   #define BED_USES_THERMISTOR
487
   #define BED_USES_THERMISTOR
485
 #if TEMP_SENSOR_2 == -1
495
 #if TEMP_SENSOR_2 == -1
486
   #define HEATER_2_USES_AD595
496
   #define HEATER_2_USES_AD595
487
 #endif
497
 #endif
498
+#if TEMP_SENSOR_3 == -1
499
+  #define HEATER_3_USES_AD595
500
+#endif
488
 #if TEMP_SENSOR_BED == -1
501
 #if TEMP_SENSOR_BED == -1
489
   #define BED_USES_AD595
502
   #define BED_USES_AD595
490
 #endif
503
 #endif
503
   #undef HEATER_2_MINTEMP
516
   #undef HEATER_2_MINTEMP
504
   #undef HEATER_2_MAXTEMP
517
   #undef HEATER_2_MAXTEMP
505
 #endif
518
 #endif
519
+#if TEMP_SENSOR_3 == 0
520
+  #undef HEATER_3_MINTEMP
521
+  #undef HEATER_3_MAXTEMP
522
+#endif
506
 #if TEMP_SENSOR_BED == 0
523
 #if TEMP_SENSOR_BED == 0
507
   #undef BED_MINTEMP
524
   #undef BED_MINTEMP
508
   #undef BED_MAXTEMP
525
   #undef BED_MAXTEMP

+ 37
- 3
Marlin/example_configurations/makibox/Configuration.h Zobrazit soubor

1
-#ifndef CONFIGURATION_H
1
+#ifndef CONFIGURATION_H
2
 #define CONFIGURATION_H
2
 #define CONFIGURATION_H
3
 
3
 
4
 #include "boards.h"
4
 #include "boards.h"
127
 #define TEMP_SENSOR_0 1
127
 #define TEMP_SENSOR_0 1
128
 #define TEMP_SENSOR_1 0
128
 #define TEMP_SENSOR_1 0
129
 #define TEMP_SENSOR_2 0
129
 #define TEMP_SENSOR_2 0
130
+#define TEMP_SENSOR_3 0
130
 #define TEMP_SENSOR_BED 12
131
 #define TEMP_SENSOR_BED 12
131
 
132
 
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.
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
 #define HEATER_0_MINTEMP 5
145
 #define HEATER_0_MINTEMP 5
145
 #define HEATER_1_MINTEMP 5
146
 #define HEATER_1_MINTEMP 5
146
 #define HEATER_2_MINTEMP 5
147
 #define HEATER_2_MINTEMP 5
148
+#define HEATER_3_MINTEMP 5
147
 #define BED_MINTEMP 5
149
 #define BED_MINTEMP 5
148
 
150
 
149
 // When temperature exceeds max temp, your heater will be switched off.
151
 // When temperature exceeds max temp, your heater will be switched off.
152
 #define HEATER_0_MAXTEMP 275
154
 #define HEATER_0_MAXTEMP 275
153
 #define HEATER_1_MAXTEMP 275
155
 #define HEATER_1_MAXTEMP 275
154
 #define HEATER_2_MAXTEMP 275
156
 #define HEATER_2_MAXTEMP 275
157
+#define HEATER_3_MAXTEMP 275
155
 #define BED_MAXTEMP 150
158
 #define BED_MAXTEMP 150
156
 
159
 
157
 // If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
160
 // If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
352
 #define INVERT_X_DIR false    // for Mendel set to false, for Orca set to true
355
 #define INVERT_X_DIR false    // for Mendel set to false, for Orca set to true
353
 #define INVERT_Y_DIR false    // for Mendel set to true, for Orca set to false
356
 #define INVERT_Y_DIR false    // for Mendel set to true, for Orca set to false
354
 #define INVERT_Z_DIR false    // for Mendel set to false, for Orca set to true
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
 #define INVERT_E2_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
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
 // ENDSTOP SETTINGS:
363
 // ENDSTOP SETTINGS:
360
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
364
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
561
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
565
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
562
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
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
 // The MaKr3d Makr-Panel with graphic controller and SD support
572
 // The MaKr3d Makr-Panel with graphic controller and SD support
565
 // http://reprap.org/wiki/MaKr3d_MaKrPanel
573
 // http://reprap.org/wiki/MaKr3d_MaKrPanel
566
 //#define MAKRPANEL
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
 // The RepRapDiscount Smart Controller (white PCB)
582
 // The RepRapDiscount Smart Controller (white PCB)
569
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
583
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
570
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER
584
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER
598
  #define DEFAULT_LCD_CONTRAST 17
612
  #define DEFAULT_LCD_CONTRAST 17
599
 #endif
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
 #if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
635
 #if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
602
  #define DOGLCD
636
  #define DOGLCD
603
  #define U8GLIB_ST7920
637
  #define U8GLIB_ST7920

+ 17
- 0
Marlin/example_configurations/makibox/Configuration_adv.h Zobrazit soubor

78
 #define EXTRUDER_0_AUTO_FAN_PIN   -1
78
 #define EXTRUDER_0_AUTO_FAN_PIN   -1
79
 #define EXTRUDER_1_AUTO_FAN_PIN   -1
79
 #define EXTRUDER_1_AUTO_FAN_PIN   -1
80
 #define EXTRUDER_2_AUTO_FAN_PIN   -1
80
 #define EXTRUDER_2_AUTO_FAN_PIN   -1
81
+#define EXTRUDER_3_AUTO_FAN_PIN   -1
81
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
82
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
82
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
83
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
83
 
84
 
282
 //=============================Additional Features===========================
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
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
291
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
286
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
292
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
287
 
293
 
469
   #define THERMISTORHEATER_2 TEMP_SENSOR_2
475
   #define THERMISTORHEATER_2 TEMP_SENSOR_2
470
   #define HEATER_2_USES_THERMISTOR
476
   #define HEATER_2_USES_THERMISTOR
471
 #endif
477
 #endif
478
+#if TEMP_SENSOR_3 > 0
479
+  #define THERMISTORHEATER_3 TEMP_SENSOR_3
480
+  #define HEATER_3_USES_THERMISTOR
481
+#endif
472
 #if TEMP_SENSOR_BED > 0
482
 #if TEMP_SENSOR_BED > 0
473
   #define THERMISTORBED TEMP_SENSOR_BED
483
   #define THERMISTORBED TEMP_SENSOR_BED
474
   #define BED_USES_THERMISTOR
484
   #define BED_USES_THERMISTOR
482
 #if TEMP_SENSOR_2 == -1
492
 #if TEMP_SENSOR_2 == -1
483
   #define HEATER_2_USES_AD595
493
   #define HEATER_2_USES_AD595
484
 #endif
494
 #endif
495
+#if TEMP_SENSOR_3 == -1
496
+  #define HEATER_3_USES_AD595
497
+#endif
485
 #if TEMP_SENSOR_BED == -1
498
 #if TEMP_SENSOR_BED == -1
486
   #define BED_USES_AD595
499
   #define BED_USES_AD595
487
 #endif
500
 #endif
500
   #undef HEATER_2_MINTEMP
513
   #undef HEATER_2_MINTEMP
501
   #undef HEATER_2_MAXTEMP
514
   #undef HEATER_2_MAXTEMP
502
 #endif
515
 #endif
516
+#if TEMP_SENSOR_3 == 0
517
+  #undef HEATER_3_MINTEMP
518
+  #undef HEATER_3_MAXTEMP
519
+#endif
503
 #if TEMP_SENSOR_BED == 0
520
 #if TEMP_SENSOR_BED == 0
504
   #undef BED_MINTEMP
521
   #undef BED_MINTEMP
505
   #undef BED_MAXTEMP
522
   #undef BED_MAXTEMP

+ 38
- 4
Marlin/example_configurations/tvrrug/Round2/Configuration.h Zobrazit soubor

1
-#ifndef CONFIGURATION_H
1
+#ifndef CONFIGURATION_H
2
 #define CONFIGURATION_H
2
 #define CONFIGURATION_H
3
 
3
 
4
 #include "boards.h"
4
 #include "boards.h"
126
 #define TEMP_SENSOR_0 5
126
 #define TEMP_SENSOR_0 5
127
 #define TEMP_SENSOR_1 0
127
 #define TEMP_SENSOR_1 0
128
 #define TEMP_SENSOR_2 0
128
 #define TEMP_SENSOR_2 0
129
+#define TEMP_SENSOR_3 0
129
 #define TEMP_SENSOR_BED 5
130
 #define TEMP_SENSOR_BED 5
130
 
131
 
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.
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
 #define HEATER_0_MINTEMP 5
144
 #define HEATER_0_MINTEMP 5
144
 #define HEATER_1_MINTEMP 5
145
 #define HEATER_1_MINTEMP 5
145
 #define HEATER_2_MINTEMP 5
146
 #define HEATER_2_MINTEMP 5
147
+#define HEATER_3_MINTEMP 5
146
 #define BED_MINTEMP 5
148
 #define BED_MINTEMP 5
147
 
149
 
148
 // When temperature exceeds max temp, your heater will be switched off.
150
 // When temperature exceeds max temp, your heater will be switched off.
151
 #define HEATER_0_MAXTEMP 275
153
 #define HEATER_0_MAXTEMP 275
152
 #define HEATER_1_MAXTEMP 275
154
 #define HEATER_1_MAXTEMP 275
153
 #define HEATER_2_MAXTEMP 275
155
 #define HEATER_2_MAXTEMP 275
156
+#define HEATER_3_MAXTEMP 275
154
 #define BED_MAXTEMP 150
157
 #define BED_MAXTEMP 150
155
 
158
 
156
 #define CONFIG_STEPPERS_TOSHIBA	1
159
 #define CONFIG_STEPPERS_TOSHIBA	1
353
 #define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
356
 #define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled
354
 
357
 
355
 #define INVERT_X_DIR false    // for Mendel set to false, for Orca set to true
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
 #define INVERT_E0_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
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
 #define INVERT_E2_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
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
 // ENDSTOP SETTINGS:
366
 // ENDSTOP SETTINGS:
363
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
367
 // Sets direction of endstops when homing; 1=MAX, -1=MIN
574
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
578
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
575
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
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
 // The MaKr3d Makr-Panel with graphic controller and SD support
585
 // The MaKr3d Makr-Panel with graphic controller and SD support
578
 // http://reprap.org/wiki/MaKr3d_MaKrPanel
586
 // http://reprap.org/wiki/MaKr3d_MaKrPanel
579
 //#define MAKRPANEL
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
 // The RepRapDiscount Smart Controller (white PCB)
595
 // The RepRapDiscount Smart Controller (white PCB)
582
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
596
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
583
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER
597
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER
611
  #define DEFAULT_LCD_CONTRAST 17
625
  #define DEFAULT_LCD_CONTRAST 17
612
 #endif
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
 #if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
648
 #if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
615
  #define DOGLCD
649
  #define DOGLCD
616
  #define U8GLIB_ST7920
650
  #define U8GLIB_ST7920

+ 17
- 0
Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h Zobrazit soubor

78
 #define EXTRUDER_0_AUTO_FAN_PIN   -1
78
 #define EXTRUDER_0_AUTO_FAN_PIN   -1
79
 #define EXTRUDER_1_AUTO_FAN_PIN   -1
79
 #define EXTRUDER_1_AUTO_FAN_PIN   -1
80
 #define EXTRUDER_2_AUTO_FAN_PIN   -1
80
 #define EXTRUDER_2_AUTO_FAN_PIN   -1
81
+#define EXTRUDER_3_AUTO_FAN_PIN   -1
81
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
82
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
82
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
83
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
83
 
84
 
283
 //=============================Additional Features===========================
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
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
292
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
287
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
293
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
288
 
294
 
472
   #define THERMISTORHEATER_2 TEMP_SENSOR_2
478
   #define THERMISTORHEATER_2 TEMP_SENSOR_2
473
   #define HEATER_2_USES_THERMISTOR
479
   #define HEATER_2_USES_THERMISTOR
474
 #endif
480
 #endif
481
+#if TEMP_SENSOR_3 > 0
482
+  #define THERMISTORHEATER_3 TEMP_SENSOR_3
483
+  #define HEATER_3_USES_THERMISTOR
484
+#endif
475
 #if TEMP_SENSOR_BED > 0
485
 #if TEMP_SENSOR_BED > 0
476
   #define THERMISTORBED TEMP_SENSOR_BED
486
   #define THERMISTORBED TEMP_SENSOR_BED
477
   #define BED_USES_THERMISTOR
487
   #define BED_USES_THERMISTOR
485
 #if TEMP_SENSOR_2 == -1
495
 #if TEMP_SENSOR_2 == -1
486
   #define HEATER_2_USES_AD595
496
   #define HEATER_2_USES_AD595
487
 #endif
497
 #endif
498
+#if TEMP_SENSOR_3 == -1
499
+  #define HEATER_3_USES_AD595
500
+#endif
488
 #if TEMP_SENSOR_BED == -1
501
 #if TEMP_SENSOR_BED == -1
489
   #define BED_USES_AD595
502
   #define BED_USES_AD595
490
 #endif
503
 #endif
503
   #undef HEATER_2_MINTEMP
516
   #undef HEATER_2_MINTEMP
504
   #undef HEATER_2_MAXTEMP
517
   #undef HEATER_2_MAXTEMP
505
 #endif
518
 #endif
519
+#if TEMP_SENSOR_3 == 0
520
+  #undef HEATER_3_MINTEMP
521
+  #undef HEATER_3_MAXTEMP
522
+#endif
506
 #if TEMP_SENSOR_BED == 0
523
 #if TEMP_SENSOR_BED == 0
507
   #undef BED_MINTEMP
524
   #undef BED_MINTEMP
508
   #undef BED_MAXTEMP
525
   #undef BED_MAXTEMP

+ 3
- 0
Marlin/fastio.h Zobrazit soubor

83
 /// check if pin is an timer wrapper
83
 /// check if pin is an timer wrapper
84
 #define GET_TIMER(IO)  _GET_TIMER(IO)
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
 	ports and functions
90
 	ports and functions
88
 
91
 

+ 39
- 0
Marlin/language.h Zobrazit soubor

121
 #define MSG_UNKNOWN_COMMAND                 "Unknown command: \""
121
 #define MSG_UNKNOWN_COMMAND                 "Unknown command: \""
122
 #define MSG_ACTIVE_EXTRUDER                 "Active Extruder: "
122
 #define MSG_ACTIVE_EXTRUDER                 "Active Extruder: "
123
 #define MSG_INVALID_EXTRUDER                "Invalid extruder"
123
 #define MSG_INVALID_EXTRUDER                "Invalid extruder"
124
+#define MSG_INVALID_SOLENOID                "Invalid solenoid"
124
 #define MSG_X_MIN                           "x_min: "
125
 #define MSG_X_MIN                           "x_min: "
125
 #define MSG_X_MAX                           "x_max: "
126
 #define MSG_X_MAX                           "x_max: "
126
 #define MSG_Y_MIN                           "y_min: "
127
 #define MSG_Y_MIN                           "y_min: "
159
 
160
 
160
 #define MSG_ERR_EEPROM_WRITE                "Error writing to EEPROM!"
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
 // LCD Menu Messages
200
 // LCD Menu Messages
163
 
201
 
164
 // Add your own character. Reference: https://github.com/MarlinFirmware/Marlin/pull/1434 photos
202
 // Add your own character. Reference: https://github.com/MarlinFirmware/Marlin/pull/1434 photos
223
 */
261
 */
224
 
262
 
225
 #include LANGUAGE_INCLUDE
263
 #include LANGUAGE_INCLUDE
264
+#include "language_en.h"
226
 
265
 
227
 #endif //__LANGUAGE_H
266
 #endif //__LANGUAGE_H

+ 298
- 6
Marlin/language_en.h Zobrazit soubor

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

+ 38
- 38
Marlin/language_fi.h Zobrazit soubor

17
 #define MSG_AUTO_HOME                       "Aja referenssiin"
17
 #define MSG_AUTO_HOME                       "Aja referenssiin"
18
 #define MSG_SET_HOME_OFFSETS                "Set home offsets"
18
 #define MSG_SET_HOME_OFFSETS                "Set home offsets"
19
 #define MSG_SET_ORIGIN                      "Aseta origo"
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
 #define MSG_SWITCH_PS_OFF                   "Virta pois"
32
 #define MSG_SWITCH_PS_OFF                   "Virta pois"
33
 #define MSG_EXTRUDE                         "Pursota"
33
 #define MSG_EXTRUDE                         "Pursota"
34
-#define MSG_RETRACT                         "Veda takaisin"
34
+#define MSG_RETRACT                         "Ved" STR_ae " takaisin"
35
 #define MSG_MOVE_AXIS                       "Liikuta akseleita"
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
 #define MSG_MOVE_E                          "Extruder"
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
 #define MSG_SPEED                           "Nopeus"
43
 #define MSG_SPEED                           "Nopeus"
44
 #define MSG_NOZZLE                          "Suutin"
44
 #define MSG_NOZZLE                          "Suutin"
45
 #define MSG_BED                             "Alusta"
45
 #define MSG_BED                             "Alusta"
46
 #define MSG_FAN_SPEED                       "Tuul. nopeus"
46
 #define MSG_FAN_SPEED                       "Tuul. nopeus"
47
 #define MSG_FLOW                            "Virtaus"
47
 #define MSG_FLOW                            "Virtaus"
48
 #define MSG_CONTROL                         "Kontrolli"
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
 #define MSG_AUTOTEMP                        "Autotemp"
52
 #define MSG_AUTOTEMP                        "Autotemp"
53
 #define MSG_ON                              "On "
53
 #define MSG_ON                              "On "
54
 #define MSG_OFF                             "Off"
54
 #define MSG_OFF                             "Off"
73
 #define MSG_YSTEPS                          "Ysteps/mm"
73
 #define MSG_YSTEPS                          "Ysteps/mm"
74
 #define MSG_ZSTEPS                          "Zsteps/mm"
74
 #define MSG_ZSTEPS                          "Zsteps/mm"
75
 #define MSG_ESTEPS                          "Esteps/mm"
75
 #define MSG_ESTEPS                          "Esteps/mm"
76
-#define MSG_TEMPERATURE                     "Lampotila"
76
+#define MSG_TEMPERATURE                     "L" STR_ae "mp" STR_oe "tila"
77
 #define MSG_MOTION                          "Liike"
77
 #define MSG_MOTION                          "Liike"
78
 #define MSG_VOLUMETRIC                      "Filament"
78
 #define MSG_VOLUMETRIC                      "Filament"
79
-#define MSG_VOLUMETRIC_ENABLED		        "E in mm3"
79
+#define MSG_VOLUMETRIC_ENABLED              "E in mm3"
80
 #define MSG_FILAMENT_SIZE_EXTRUDER_0        "Fil. Dia. 1"
80
 #define MSG_FILAMENT_SIZE_EXTRUDER_0        "Fil. Dia. 1"
81
 #define MSG_FILAMENT_SIZE_EXTRUDER_1        "Fil. Dia. 2"
81
 #define MSG_FILAMENT_SIZE_EXTRUDER_1        "Fil. Dia. 2"
82
 #define MSG_FILAMENT_SIZE_EXTRUDER_2        "Fil. Dia. 3"
82
 #define MSG_FILAMENT_SIZE_EXTRUDER_2        "Fil. Dia. 3"
83
-#define MSG_CONTRAST                        "LCD contrast"
83
+#define MSG_CONTRAST                        "LCD kontrasti"
84
 #define MSG_STORE_EPROM                     "Tallenna muistiin"
84
 #define MSG_STORE_EPROM                     "Tallenna muistiin"
85
 #define MSG_LOAD_EPROM                      "Lataa muistista"
85
 #define MSG_LOAD_EPROM                      "Lataa muistista"
86
 #define MSG_RESTORE_FAILSAFE                "Palauta oletus"
86
 #define MSG_RESTORE_FAILSAFE                "Palauta oletus"
87
-#define MSG_REFRESH                         "Paivita"
87
+#define MSG_REFRESH                         "P" STR_ae "ivit" STR_ae ""
88
 #define MSG_WATCH                           "Seuraa"
88
 #define MSG_WATCH                           "Seuraa"
89
 #define MSG_PREPARE                         "Valmistele"
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
 #define MSG_RESUME_PRINT                    "Jatka tulostusta"
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
 #define MSG_CARD_MENU                       "Korttivalikko"
94
 #define MSG_CARD_MENU                       "Korttivalikko"
95
 #define MSG_NO_CARD                         "Ei korttia"
95
 #define MSG_NO_CARD                         "Ei korttia"
96
 #define MSG_DWELL                           "Nukkumassa..."
96
 #define MSG_DWELL                           "Nukkumassa..."
100
 #define MSG_NO_MOVE                         "Ei liiketta."
100
 #define MSG_NO_MOVE                         "Ei liiketta."
101
 #define MSG_KILLED                          "KILLED. "
101
 #define MSG_KILLED                          "KILLED. "
102
 #define MSG_STOPPED                         "STOPPED. "
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
 #define MSG_CONTROL_RETRACT_ZLIFT           "Z mm"
106
 #define MSG_CONTROL_RETRACT_ZLIFT           "Z mm"
107
 #define MSG_CONTROL_RETRACT_RECOVER         "UnRet +mm"
107
 #define MSG_CONTROL_RETRACT_RECOVER         "UnRet +mm"
108
 #define MSG_CONTROL_RETRACT_RECOVER_SWAP    "Va. UnRet +mm"
108
 #define MSG_CONTROL_RETRACT_RECOVER_SWAP    "Va. UnRet +mm"
120
 #define MSG_ENDSTOP_ABORT                   "Endstop abort"
120
 #define MSG_ENDSTOP_ABORT                   "Endstop abort"
121
 
121
 
122
 #ifdef DELTA_CALIBRATION_MENU
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
 #endif // DELTA_CALIBRATION_MENU
128
 #endif // DELTA_CALIBRATION_MENU
129
 
129
 
130
-#endif // LANGUAGE_FI_H
130
+#endif // LANGUAGE_FI_H

+ 15
- 15
Marlin/language_ru.h Zobrazit soubor

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

+ 5
- 1
Marlin/pins.h Zobrazit soubor

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

+ 2
- 0
Marlin/pins_3DRAG.h Zobrazit soubor

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

+ 8
- 0
Marlin/pins_AZTEEG_X3.h Zobrazit soubor

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

+ 9
- 5
Marlin/pins_AZTEEG_X3_PRO.h Zobrazit soubor

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

+ 11
- 0
Marlin/pins_BAM_DICE_DUE.h Zobrazit soubor

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 Zobrazit soubor

87
 
87
 
88
 // Cheaptronic v1.0 does not use this port
88
 // Cheaptronic v1.0 does not use this port
89
 #define SDCARDDETECT -1
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 Zobrazit soubor

74
   #define BLEN_B           1
74
   #define BLEN_B           1
75
   #define BLEN_A           0
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
 #endif // RA_CONTROL_PANEL
77
 #endif // RA_CONTROL_PANEL
84
 
78
 
85
 #ifdef RA_DISCO
79
 #ifdef RA_DISCO

+ 3
- 0
Marlin/pins_HEPHESTOS.h Zobrazit soubor

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

+ 0
- 6
Marlin/pins_MEGATRONICS.h Zobrazit soubor

83
 
83
 
84
   #define SDCARDDETECT -1   // Ramps does not use this port
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
 #endif // ULTRA_LCD && NEWPANEL
86
 #endif // ULTRA_LCD && NEWPANEL

+ 0
- 6
Marlin/pins_MEGATRONICS_1.h Zobrazit soubor

80
 #define BLEN_A 0
80
 #define BLEN_A 0
81
 
81
 
82
 #define SDCARDDETECT -1  // Megatronics does not use this port
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 Zobrazit soubor

95
 #define BLEN_A 0
95
 #define BLEN_A 0
96
 
96
 
97
 #define SDCARDDETECT -1  // Megatronics does not use this port
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 Zobrazit soubor

8
 
8
 
9
 #define LARGE_FLASH        true
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
 #define X_STEP_PIN         58
25
 #define X_STEP_PIN         58
12
 #define X_DIR_PIN          57
26
 #define X_DIR_PIN          57
13
 #define X_ENABLE_PIN       59
27
 #define X_ENABLE_PIN       59
81
 #define BLEN_A 0
95
 #define BLEN_A 0
82
 
96
 
83
 #define SDCARDDETECT -1	// Megatronics does not use this port
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 Zobrazit soubor

116
 
116
 
117
     #define SDCARDDETECT 81    // Ramps does not use this port
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
   #else //!NEWPANEL - old style panel with shift register
119
   #else //!NEWPANEL - old style panel with shift register
125
     //arduino pin witch triggers an piezzo beeper
120
     //arduino pin witch triggers an piezzo beeper
126
     #define BEEPER 33    No Beeper added
121
     #define BEEPER 33    No Beeper added
138
     #define LCD_PINS_D6 27
133
     #define LCD_PINS_D6 27
139
     #define LCD_PINS_D7 29
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
     //bits in the shift register that carry the buttons for:
136
     //bits in the shift register that carry the buttons for:
148
     // left up center down right red
137
     // left up center down right red
149
     #define BL_LE 7
138
     #define BL_LE 7

+ 31
- 33
Marlin/pins_RAMPS_13.h Zobrazit soubor

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

+ 4
- 0
Marlin/pins_RUMBA.h Zobrazit soubor

6
   #error Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
6
   #error Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
7
 #endif
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
 #define X_STEP_PIN         17
13
 #define X_STEP_PIN         17
10
 #define X_DIR_PIN          16
14
 #define X_DIR_PIN          16
11
 #define X_ENABLE_PIN       48
15
 #define X_ENABLE_PIN       48

+ 3
- 0
Marlin/pins_WITBOX.h Zobrazit soubor

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

+ 10
- 2
Marlin/planner.cpp Zobrazit soubor

629
     block->direction_bits |= (1<<Y_AXIS); 
629
     block->direction_bits |= (1<<Y_AXIS); 
630
   }
630
   }
631
 #else
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
   if ((target[X_AXIS]-position[X_AXIS]) + (target[Y_AXIS]-position[Y_AXIS]) < 0)
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
   if ((target[X_AXIS]-position[X_AXIS]) - (target[Y_AXIS]-position[Y_AXIS]) < 0)
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
 #endif
648
 #endif
641
   if (target[Z_AXIS] < position[Z_AXIS])
649
   if (target[Z_AXIS] < position[Z_AXIS])

+ 84
- 95
Marlin/stepper.cpp Zobrazit soubor

43
 //===========================================================================
43
 //===========================================================================
44
 //=============================private variables ============================
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
 // Variables used by The Stepper Driver Interrupt
48
 // Variables used by The Stepper Driver Interrupt
49
 static unsigned char out_bits;        // The next stepping-bits to be output
49
 static unsigned char out_bits;        // The next stepping-bits to be output
187
      SERIAL_ECHOPAIR(" Z:",(float)endstops_trigsteps[Z_AXIS]/axis_steps_per_unit[Z_AXIS]);
187
      SERIAL_ECHOPAIR(" Z:",(float)endstops_trigsteps[Z_AXIS]/axis_steps_per_unit[Z_AXIS]);
188
      LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "Z");
188
      LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "Z");
189
    }
189
    }
190
-   SERIAL_ECHOLN("");
190
+   SERIAL_EOL;
191
    endstop_x_hit=false;
191
    endstop_x_hit=false;
192
    endstop_y_hit=false;
192
    endstop_y_hit=false;
193
    endstop_z_hit=false;
193
    endstop_z_hit=false;
399
       count_direction[Y_AXIS]=1;
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
         #endif
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
     if ((out_bits & (1<<Z_AXIS)) != 0) {   // -direction
482
     if ((out_bits & (1<<Z_AXIS)) != 0) {   // -direction
960
 
959
 
961
   //Initialize Step Pins
960
   //Initialize Step Pins
962
   #if defined(X_STEP_PIN) && (X_STEP_PIN > -1)
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
     disable_x();
963
     disable_x();
966
   #endif
964
   #endif
967
   #if defined(X2_STEP_PIN) && (X2_STEP_PIN > -1)
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
     disable_x();
967
     disable_x();
971
   #endif
968
   #endif
972
   #if defined(Y_STEP_PIN) && (Y_STEP_PIN > -1)
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
     #if defined(Y_DUAL_STEPPER_DRIVERS) && defined(Y2_STEP_PIN) && (Y2_STEP_PIN > -1)
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
     #endif
973
     #endif
979
     disable_y();
974
     disable_y();
980
   #endif
975
   #endif
981
   #if defined(Z_STEP_PIN) && (Z_STEP_PIN > -1)
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
     #if defined(Z_DUAL_STEPPER_DRIVERS) && defined(Z2_STEP_PIN) && (Z2_STEP_PIN > -1)
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
     #endif
980
     #endif
988
     disable_z();
981
     disable_z();
989
   #endif
982
   #endif
990
   #if defined(E0_STEP_PIN) && (E0_STEP_PIN > -1)
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
     disable_e0();
985
     disable_e0();
994
   #endif
986
   #endif
995
   #if defined(E1_STEP_PIN) && (E1_STEP_PIN > -1)
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
     disable_e1();
989
     disable_e1();
999
   #endif
990
   #endif
1000
   #if defined(E2_STEP_PIN) && (E2_STEP_PIN > -1)
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
     disable_e2();
993
     disable_e2();
1004
   #endif
994
   #endif
1005
   #if defined(E3_STEP_PIN) && (E3_STEP_PIN > -1)
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
     disable_e3();
997
     disable_e3();
1009
   #endif
998
   #endif
1010
 
999
 

+ 921
- 1281
Marlin/temperature.cpp
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 39
- 72
Marlin/temperature.h Zobrazit soubor

85
 //inline so that there is no performance decrease.
85
 //inline so that there is no performance decrease.
86
 //deg=degreeCelsius
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
 #ifdef SHOW_TEMP_ADC_VALUES
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
 #endif
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
 #define degHotend0() degHotend(0)
108
 #define degHotend0() degHotend(0)
139
 #define degTargetHotend0() degTargetHotend(0)
109
 #define degTargetHotend0() degTargetHotend(0)
141
 #define isHeatingHotend0() isHeatingHotend(0)
111
 #define isHeatingHotend0() isHeatingHotend(0)
142
 #define isCoolingHotend0() isCoolingHotend(0)
112
 #define isCoolingHotend0() isCoolingHotend(0)
143
 #if EXTRUDERS > 1
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
 #else
119
 #else
150
-#define setTargetHotend1(_celsius) do{}while(0)
120
+  #define setTargetHotend1(_celsius) do{}while(0)
151
 #endif
121
 #endif
152
 #if EXTRUDERS > 2
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
 #else
128
 #else
159
-#define setTargetHotend2(_celsius) do{}while(0)
129
+  #define setTargetHotend2(_celsius) do{}while(0)
160
 #endif
130
 #endif
161
 #if EXTRUDERS > 3
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
 #else
137
 #else
168
-#define setTargetHotend3(_celsius) do{}while(0)
138
+  #define setTargetHotend3(_celsius) do{}while(0)
169
 #endif
139
 #endif
170
 #if EXTRUDERS > 4
140
 #if EXTRUDERS > 4
171
-#error Invalid number of extruders
141
+  #error Invalid number of extruders
172
 #endif
142
 #endif
173
 
143
 
174
-
175
-
176
 int getHeaterPower(int heater);
144
 int getHeaterPower(int heater);
177
 void disable_heater();
145
 void disable_heater();
178
 void setWatch();
146
 void setWatch();
189
 #endif
157
 #endif
190
 #endif
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
 void PID_autotune(float temp, int extruder, int ncycles);
170
 void PID_autotune(float temp, int extruder, int ncycles);

+ 23
- 0
Marlin/thermistortables.h Zobrazit soubor

1095
 };
1095
 };
1096
 #endif
1096
 #endif
1097
 
1097
 
1098
+#if (THERMISTORHEATER_0 == 999) || (THERMISTORHEATER_1 == 999) || (THERMISTORHEATER_2 == 999) || (THERMISTORHEATER_3 == 999) || (THERMISTORBED == 999) //User defined table
1099
+  // Dummy Thermistor table.. It will ALWAYS read 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
 #define _TT_NAME(_N) temptable_ ## _N
1121
 #define _TT_NAME(_N) temptable_ ## _N
1099
 #define TT_NAME(_N) _TT_NAME(_N)
1122
 #define TT_NAME(_N) _TT_NAME(_N)
1100
 
1123
 

+ 859
- 907
Marlin/ultralcd.cpp
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 2
- 1
Marlin/ultralcd.h Zobrazit soubor

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

+ 26
- 41
Marlin/ultralcd_implementation_hitachi_HD44780.h Zobrazit soubor

123
   #define LCD_CLICKED (buttons&(B_MI|B_ST))
123
   #define LCD_CLICKED (buttons&(B_MI|B_ST))
124
 #endif
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
 #endif //ULTIPANEL
126
 #endif //ULTIPANEL
138
 
127
 
139
 ////////////////////////////////////
128
 ////////////////////////////////////
636
     {
625
     {
637
         lcd.print(c);
626
         lcd.print(c);
638
         pstr++;
627
         pstr++;
639
-        n--;
628
+        if ((pgm_read_byte(pstr) & 0xc0) != 0x80) n--;
640
     }
629
     }
641
     while(n--)
630
     while(n--)
642
         lcd.print(' ');
631
         lcd.print(' ');
648
     char c;
637
     char c;
649
     //Use all characters in narrow LCDs
638
     //Use all characters in narrow LCDs
650
   #if LCD_WIDTH < 20
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
     #else
641
     #else
653
-      uint8_t n = LCD_WIDTH - 1 - 2 - strlen(data);
642
+      uint8_t n = LCD_WIDTH - 1 - 2 - lcd_strlen(data);
654
   #endif
643
   #endif
655
     lcd.setCursor(0, row);
644
     lcd.setCursor(0, row);
656
     lcd.print(pre_char);
645
     lcd.print(pre_char);
658
     {
647
     {
659
         lcd.print(c);
648
         lcd.print(c);
660
         pstr++;
649
         pstr++;
661
-        n--;
650
+        if ((pgm_read_byte(pstr) & 0xc0) != 0x80) n--;
662
     }
651
     }
663
     lcd.print(':');
652
     lcd.print(':');
664
     while(n--)
653
     while(n--)
670
     char c;
659
     char c;
671
     //Use all characters in narrow LCDs
660
     //Use all characters in narrow LCDs
672
   #if LCD_WIDTH < 20
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
     #else
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
   #endif
665
   #endif
677
     lcd.setCursor(0, row);
666
     lcd.setCursor(0, row);
678
     lcd.print(pre_char);
667
     lcd.print(pre_char);
680
     {
669
     {
681
         lcd.print(c);
670
         lcd.print(c);
682
         pstr++;
671
         pstr++;
683
-        n--;
672
+        if ((pgm_read_byte(pstr) & 0xc0) != 0x80) n--;
684
     }
673
     }
685
     lcd.print(':');
674
     lcd.print(':');
686
     while(n--)
675
     while(n--)
733
     lcd_printPGM(pstr);
722
     lcd_printPGM(pstr);
734
     lcd.print(':');
723
     lcd.print(':');
735
    #if LCD_WIDTH < 20
724
    #if LCD_WIDTH < 20
736
-      lcd.setCursor(LCD_WIDTH - strlen(value), 1);
725
+      lcd.setCursor(LCD_WIDTH - lcd_strlen(value), 1);
737
     #else
726
     #else
738
-      lcd.setCursor(LCD_WIDTH -1 - strlen(value), 1);
727
+      lcd.setCursor(LCD_WIDTH -1 - lcd_strlen(value), 1);
739
    #endif
728
    #endif
740
     lcd.print(value);
729
     lcd.print(value);
741
 }
730
 }
832
 
821
 
833
 static void lcd_implementation_quick_feedback()
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
     SET_OUTPUT(BEEPER);
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
     #else
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
       WRITE(BEEPER,HIGH);
840
       WRITE(BEEPER,HIGH);
855
-      delayMicroseconds(1000000 / LCD_FEEDBACK_FREQUENCY_HZ / 2);
841
+      delayMicroseconds(delay);
856
       WRITE(BEEPER,LOW);
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
 #ifdef LCD_HAS_STATUS_INDICATORS
848
 #ifdef LCD_HAS_STATUS_INDICATORS

+ 3
- 6
Marlin/ultralcd_st7920_u8glib_rrd.h Zobrazit soubor

47
   {
47
   {
48
     case U8G_DEV_MSG_INIT:
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
         ST7920_CS();
54
         ST7920_CS();
58
         u8g_Delay(120);                 //initial delay for boot up
55
         u8g_Delay(120);                 //initial delay for boot up

Loading…
Zrušit
Uložit