Преглед на файлове

First attempt at refactoring of original servo code. Only adding servo support as a start to keep things simple.

Gord Christmas преди 12 години
родител
ревизия
dc59f07d24
променени са 4 файла, в които са добавени 395 реда и са изтрити 307 реда
  1. 39
    22
      Marlin/Configuration.h
  2. 252
    192
      Marlin/Marlin_main.cpp
  3. 16
    10
      Marlin/Servo.h
  4. 88
    83
      Marlin/pins.h

+ 39
- 22
Marlin/Configuration.h Целия файл

@@ -2,7 +2,7 @@
2 2
 #define CONFIGURATION_H
3 3
 
4 4
 // This configurtion file contains the basic settings.
5
-// Advanced settings can be found in Configuration_adv.h 
5
+// Advanced settings can be found in Configuration_adv.h
6 6
 // BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
7 7
 
8 8
 //User specified version info of this build to display in [Pronterface, etc] terminal window during startup.
@@ -78,7 +78,7 @@
78 78
 // 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup)
79 79
 // 10 is 100k RS thermistor 198-961 (4.7k pullup)
80 80
 //
81
-//    1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k 
81
+//    1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k
82 82
 //                          (but gives greater accuracy and more stable PID)
83 83
 // 51 is 100k thermistor - EPCOS (1k pullup)
84 84
 // 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
@@ -95,7 +95,7 @@
95 95
 #define TEMP_WINDOW     1       // (degC) Window around target to start the recidency timer x degC early.
96 96
 
97 97
 // The minimal temperature defines the temperature below which the heater will not be enabled It is used
98
-// to check that the wiring to the thermistor is not broken. 
98
+// to check that the wiring to the thermistor is not broken.
99 99
 // Otherwise this would lead to the heater being powered on all the time.
100 100
 #define HEATER_0_MINTEMP 5
101 101
 #define HEATER_1_MINTEMP 5
@@ -121,7 +121,7 @@
121 121
 #define BANG_MAX 256 // limits current to nozzle while in bang-bang mode; 256=full current
122 122
 #define PID_MAX 256 // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 256=full current
123 123
 #ifdef PIDTEMP
124
-  //#define PID_DEBUG // Sends debug data to the serial port. 
124
+  //#define PID_DEBUG // Sends debug data to the serial port.
125 125
   //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
126 126
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
127 127
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
@@ -132,15 +132,15 @@
132 132
 // If you are using a preconfigured hotend then you can use one of the value sets by uncommenting it
133 133
 // Ultimaker
134 134
     #define  DEFAULT_Kp 22.2
135
-    #define  DEFAULT_Ki 1.08  
136
-    #define  DEFAULT_Kd 114  
135
+    #define  DEFAULT_Ki 1.08
136
+    #define  DEFAULT_Kd 114
137 137
 
138 138
 // Makergear
139 139
 //    #define  DEFAULT_Kp 7.0
140
-//    #define  DEFAULT_Ki 0.1  
141
-//    #define  DEFAULT_Kd 12  
140
+//    #define  DEFAULT_Ki 0.1
141
+//    #define  DEFAULT_Kd 12
142 142
 
143
-// Mendel Parts V9 on 12V    
143
+// Mendel Parts V9 on 12V
144 144
 //    #define  DEFAULT_Kp 63.0
145 145
 //    #define  DEFAULT_Ki 2.25
146 146
 //    #define  DEFAULT_Kd 440
@@ -149,11 +149,11 @@
149 149
 // Bed Temperature Control
150 150
 // Select PID or bang-bang with PIDTEMPBED.  If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
151 151
 //
152
-// uncomment this to enable PID on the bed.   It uses the same ferquency PWM as the extruder. 
152
+// uncomment this to enable PID on the bed.   It uses the same ferquency PWM as the extruder.
153 153
 // If your PID_dT above is the default, and correct for your hardware/configuration, that means 7.689Hz,
154 154
 // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
155
-// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. 
156
-// If your configuration is significantly different than this and you don't understand the issues involved, you proabaly 
155
+// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
156
+// If your configuration is significantly different than this and you don't understand the issues involved, you proabaly
157 157
 // shouldn't use bed PID until someone else verifies your hardware works.
158 158
 // If this is enabled, find your own PID constants below.
159 159
 //#define PIDTEMPBED
@@ -223,9 +223,9 @@
223 223
 #endif
224 224
 
225 225
 // The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
226
-const bool X_ENDSTOPS_INVERTING = true; // set to true to invert the logic of the endstops. 
227
-const bool Y_ENDSTOPS_INVERTING = true; // set to true to invert the logic of the endstops. 
228
-const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of the endstops. 
226
+const bool X_ENDSTOPS_INVERTING = true; // set to true to invert the logic of the endstops.
227
+const bool Y_ENDSTOPS_INVERTING = true; // set to true to invert the logic of the endstops.
228
+const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of the endstops.
229 229
 //#define DISABLE_MAX_ENDSTOPS
230 230
 
231 231
 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
@@ -280,13 +280,13 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
280 280
 #define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
281 281
 #define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0}  // set the homing speeds (mm/min)
282 282
 
283
-// default settings 
283
+// default settings
284 284
 
285 285
 #define DEFAULT_AXIS_STEPS_PER_UNIT   {78.7402,78.7402,200.0*8/3,760*1.1}  // default steps per unit for ultimaker
286 286
 #define DEFAULT_MAX_FEEDRATE          {500, 500, 5, 25}    // (mm/sec)
287 287
 #define DEFAULT_MAX_ACCELERATION      {9000,9000,100,10000}    // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for skeinforge 40+, for older versions raise them a lot.
288 288
 
289
-#define DEFAULT_ACCELERATION          3000    // X, Y, Z and E max acceleration in mm/s^2 for printing moves 
289
+#define DEFAULT_ACCELERATION          3000    // X, Y, Z and E max acceleration in mm/s^2 for printing moves
290 290
 #define DEFAULT_RETRACT_ACCELERATION  3000   // X, Y, Z and E max acceleration in mm/s^2 for r retracts
291 291
 
292 292
 // Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -307,7 +307,7 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
307 307
 // EEPROM
308 308
 // the microcontroller can store settings in the EEPROM, e.g. max velocity...
309 309
 // M500 - stores paramters in EEPROM
310
-// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).  
310
+// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
311 311
 // M502 - reverts to the default "factory settings".  You still need to store them in EEPROM afterwards if you want to.
312 312
 //define this to enable eeprom support
313 313
 //#define EEPROM_SETTINGS
@@ -353,7 +353,7 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
353 353
 #if defined(ULTIMAKERCONTROLLER) || defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL)
354 354
  #define ULTIPANEL
355 355
  #define NEWPANEL
356
-#endif 
356
+#endif
357 357
 
358 358
 #if defined(REPRAPWORLD_KEYPAD)
359 359
   #define NEWPANEL
@@ -361,7 +361,7 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
361 361
 #endif
362 362
 
363 363
 // Preheat Constants
364
-#define PLA_PREHEAT_HOTEND_TEMP 180 
364
+#define PLA_PREHEAT_HOTEND_TEMP 180
365 365
 #define PLA_PREHEAT_HPB_TEMP 70
366 366
 #define PLA_PREHEAT_FAN_SPEED 255		// Insert Value between 0 and 255
367 367
 
@@ -381,7 +381,7 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
381 381
 		#define LCD_WIDTH 20
382 382
 		#define LCD_HEIGHT 4
383 383
 	#endif
384
-#else //no panel but just lcd 
384
+#else //no panel but just lcd
385 385
   #ifdef ULTRA_LCD
386 386
 	#ifdef DOGLCD	// Change number of lines to match the 128x64 graphics display
387 387
 		#define LCD_WIDTH 20
@@ -389,7 +389,7 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
389 389
 	#else
390 390
 		#define LCD_WIDTH 16
391 391
 		#define LCD_HEIGHT 2
392
-	#endif    
392
+	#endif
393 393
   #endif
394 394
 #endif
395 395
 
@@ -406,6 +406,23 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
406 406
 // Support for the BariCUDA Paste Extruder.
407 407
 //#define BARICUDA
408 408
 
409
+/*********************************************************************\
410
+*
411
+* R/C SERVO support
412
+*
413
+* Sponsored by TrinityLabs, Reworked by codexmas
414
+*
415
+**********************************************************************/
416
+
417
+// Number of servos
418
+//
419
+// If you select a configuration below, this will receive a default value and does not need to be set manually
420
+// set it manually if you have more servos than extruders and wish to manually control some
421
+// leaving it undefined or defining as 0 will disable the servo subsystem
422
+// If unsure, leave commented / disabled
423
+//
424
+// #define NUM_SERVOS 3
425
+
409 426
 #include "Configuration_adv.h"
410 427
 #include "thermistortables.h"
411 428
 

+ 252
- 192
Marlin/Marlin_main.cpp
Файловите разлики са ограничени, защото са твърде много
Целия файл


+ 16
- 10
Marlin/Servo.h Целия файл

@@ -59,28 +59,34 @@
59 59
 // Say which 16 bit timers can be used and in what order
60 60
 #if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
61 61
 #define _useTimer5
62
-#define _useTimer1
62
+//#define _useTimer1
63 63
 #define _useTimer3
64 64
 #define _useTimer4
65
-typedef enum { _timer5, _timer1, _timer3, _timer4, _Nbr_16timers } timer16_Sequence_t ;
65
+//typedef enum { _timer5, _timer1, _timer3, _timer4, _Nbr_16timers } timer16_Sequence_t ;
66
+typedef enum { _timer5, _timer3, _timer4, _Nbr_16timers } timer16_Sequence_t ;
66 67
 
67 68
 #elif defined(__AVR_ATmega32U4__)
68
-#define _useTimer1
69
-typedef enum { _timer1, _Nbr_16timers } timer16_Sequence_t ;
69
+//#define _useTimer1
70
+#define _useTimer3
71
+//typedef enum { _timer1, _Nbr_16timers } timer16_Sequence_t ;
72
+typedef enum { _timer3, _Nbr_16timers } timer16_Sequence_t ;
70 73
 
71 74
 #elif defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)
72 75
 #define _useTimer3
73
-#define _useTimer1
74
-typedef enum { _timer3, _timer1, _Nbr_16timers } timer16_Sequence_t ;
76
+//#define _useTimer1
77
+//typedef enum { _timer3, _timer1, _Nbr_16timers } timer16_Sequence_t ;
78
+typedef enum { _timer3, _Nbr_16timers } timer16_Sequence_t ;
75 79
 
76 80
 #elif defined(__AVR_ATmega128__) ||defined(__AVR_ATmega1281__)||defined(__AVR_ATmega2561__)
77 81
 #define _useTimer3
78
-#define _useTimer1
79
-typedef enum { _timer3, _timer1, _Nbr_16timers } timer16_Sequence_t ;
82
+//#define _useTimer1
83
+//typedef enum { _timer3, _timer1, _Nbr_16timers } timer16_Sequence_t ;
84
+typedef enum { _timer3, _Nbr_16timers } timer16_Sequence_t ;
80 85
 
81 86
 #else  // everything else
82
-#define _useTimer1
83
-typedef enum { _timer1, _Nbr_16timers } timer16_Sequence_t ;
87
+//#define _useTimer1
88
+//typedef enum { _timer1, _Nbr_16timers } timer16_Sequence_t ;
89
+typedef enum { _Nbr_16timers } timer16_Sequence_t ;
84 90
 #endif
85 91
 
86 92
 #define Servo_VERSION           2      // software version of this library

+ 88
- 83
Marlin/pins.h Целия файл

@@ -248,14 +248,14 @@
248 248
     #define E0_STEP_PIN      28
249 249
     #define E0_DIR_PIN       27
250 250
     #define E0_ENABLE_PIN    24
251
-    
251
+
252 252
     #define TEMP_0_PIN      2
253 253
     #define TEMP_1_PIN      -1
254 254
     #define TEMP_2_PIN      -1
255 255
     #define TEMP_BED_PIN        1   // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
256
-     
256
+
257 257
     #define HEATER_0_PIN    4
258
-    #define HEATER_1_PIN    -1   
258
+    #define HEATER_1_PIN    -1
259 259
     #define HEATER_2_PIN    -1
260 260
     #define HEATER_BED_PIN      3  // (bed)
261 261
 
@@ -272,25 +272,25 @@
272 272
     //our RS485 pins
273 273
     //#define TX_ENABLE_PIN       12
274 274
     //#define RX_ENABLE_PIN       13
275
-    
276
-    #define BEEPER -1	
277
-	#define SDCARDDETECT -1 		
275
+
276
+    #define BEEPER -1
277
+	#define SDCARDDETECT -1
278 278
     #define SUICIDE_PIN -1						//has to be defined; otherwise Power_off doesn't work
279
-	
279
+
280 280
     #define KILL_PIN -1
281
-	//Pins for 4bit LCD Support 
282
-    #define LCD_PINS_RS 18 
281
+	//Pins for 4bit LCD Support
282
+    #define LCD_PINS_RS 18
283 283
     #define LCD_PINS_ENABLE 17
284 284
     #define LCD_PINS_D4 16
285
-    #define LCD_PINS_D5 15 
285
+    #define LCD_PINS_D5 15
286 286
     #define LCD_PINS_D6 13
287 287
     #define LCD_PINS_D7 14
288
-    
288
+
289 289
      //buttons are directly attached
290 290
     #define BTN_EN1 11
291 291
     #define BTN_EN2 10
292 292
     #define BTN_ENC 12  //the click
293
-    
293
+
294 294
     #define BLEN_C 2
295 295
     #define BLEN_B 1
296 296
     #define BLEN_A 0
@@ -376,13 +376,18 @@
376 376
 #else
377 377
 #define HEATER_1_PIN       9    // EXTRUDER 2 (FAN On Sprinter)
378 378
 #endif
379
-#define HEATER_2_PIN       -1   
379
+#define HEATER_2_PIN       -1
380 380
 #define TEMP_0_PIN         13   // ANALOG NUMBERING
381 381
 #define TEMP_1_PIN         15   // ANALOG NUMBERING
382 382
 #define TEMP_2_PIN         -1   // ANALOG NUMBERING
383 383
 #define HEATER_BED_PIN     8    // BED
384 384
 #define TEMP_BED_PIN       14   // ANALOG NUMBERING
385 385
 
386
+#define SERVO0_PIN         11
387
+#define SERVO1_PIN         6
388
+#define SERVO2_PIN         5
389
+#define SERVO3_PIN         4
390
+
386 391
 #ifdef ULTRA_LCD
387 392
 
388 393
   #ifdef NEWPANEL
@@ -396,13 +401,13 @@
396 401
     #define BLEN_B 1
397 402
     #define BLEN_C 2
398 403
 
399
-    #define LCD_PINS_RS 16 
404
+    #define LCD_PINS_RS 16
400 405
     #define LCD_PINS_ENABLE 17
401 406
     #define LCD_PINS_D4 23
402
-    #define LCD_PINS_D5 25 
407
+    #define LCD_PINS_D5 25
403 408
     #define LCD_PINS_D6 27
404 409
     #define LCD_PINS_D7 29
405
-    
410
+
406 411
     #ifdef REPRAP_DISCOUNT_SMART_CONTROLLER
407 412
       #define BEEPER 37
408 413
 
@@ -455,21 +460,21 @@
455 460
     //#define SHIFT_LD 42
456 461
     //#define SHIFT_OUT 40
457 462
     //#define SHIFT_EN 17
458
-    
459
-    #define LCD_PINS_RS 16 
463
+
464
+    #define LCD_PINS_RS 16
460 465
     #define LCD_PINS_ENABLE 17
461 466
     #define LCD_PINS_D4 23
462
-    #define LCD_PINS_D5 25 
467
+    #define LCD_PINS_D5 25
463 468
     #define LCD_PINS_D6 27
464 469
     #define LCD_PINS_D7 29
465
-    
470
+
466 471
     //encoder rotation values
467 472
     #define encrot0 0
468 473
     #define encrot1 2
469 474
     #define encrot2 3
470 475
     #define encrot3 1
471 476
 
472
-    
477
+
473 478
     //bits in the shift register that carry the buttons for:
474 479
     // left up center down right red
475 480
     #define BL_LE 7
@@ -481,7 +486,7 @@
481 486
 
482 487
     #define BLEN_B 1
483 488
     #define BLEN_A 0
484
-  #endif 
489
+  #endif
485 490
 #endif //ULTRA_LCD
486 491
 
487 492
 #else // RAMPS_V_1_1 or RAMPS_V_1_2 as default (MOTHERBOARD == 3)
@@ -526,15 +531,15 @@
526 531
 #define HEATER_1_PIN        -1
527 532
 #define HEATER_2_PIN        -1
528 533
 #define TEMP_0_PIN          2    // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
529
-#define TEMP_1_PIN          -1   
530
-#define TEMP_2_PIN          -1   
534
+#define TEMP_1_PIN          -1
535
+#define TEMP_2_PIN          -1
531 536
 #define TEMP_BED_PIN        1    // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
532 537
 #endif// MOTHERBOARD == 33 || MOTHERBOARD == 34
533 538
 
534
-// SPI for Max6675 Thermocouple 
539
+// SPI for Max6675 Thermocouple
535 540
 
536 541
 #ifndef SDSUPPORT
537
-// these pins are defined in the SD library if building with SD support  
542
+// these pins are defined in the SD library if building with SD support
538 543
   #define MAX_SCK_PIN          52
539 544
   #define MAX_MISO_PIN         50
540 545
   #define MAX_MOSI_PIN         51
@@ -586,8 +591,8 @@
586 591
 #define HEATER_1_PIN        -1
587 592
 #define HEATER_2_PIN        -1
588 593
 #define TEMP_0_PIN          0    // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
589
-#define TEMP_1_PIN          -1    
590
-#define TEMP_2_PIN          -1    
594
+#define TEMP_1_PIN          -1
595
+#define TEMP_2_PIN          -1
591 596
 #define HEATER_BED_PIN      -1
592 597
 #define TEMP_BED_PIN        -1
593 598
 
@@ -650,14 +655,14 @@
650 655
     #define PS_ON_PIN       -1    //changed @ rkoeppl 20110410
651 656
     #define KILL_PIN        -1    //changed @ drakelive 20120830
652 657
     //our pin for debugging.
653
-    
658
+
654 659
     #define DEBUG_PIN        0
655
-    
660
+
656 661
     //our RS485 pins
657 662
     #define TX_ENABLE_PIN	12
658 663
     #define RX_ENABLE_PIN	13
659 664
 
660
-    
665
+
661 666
 #endif
662 667
 
663 668
 /****************************************************************************************
@@ -673,7 +678,7 @@
673 678
 #if MOTHERBOARD == 62 || MOTHERBOARD == 63 || MOTHERBOARD == 64
674 679
 #undef MOTHERBOARD
675 680
 #define MOTHERBOARD 6
676
-#define SANGUINOLOLU_V_1_2 
681
+#define SANGUINOLOLU_V_1_2
677 682
 #endif
678 683
 #if MOTHERBOARD == 6
679 684
 #define KNOWN_BOARD 1
@@ -700,7 +705,7 @@
700 705
 
701 706
 #define LED_PIN            -1
702 707
 
703
-#define FAN_PIN            -1 
708
+#define FAN_PIN            -1
704 709
 #if FAN_PIN == 12 || FAN_PIN ==13
705 710
 #define FAN_SOFT_PWM
706 711
 #endif
@@ -779,21 +784,21 @@
779 784
      #define BTN_ENC 16  //the switch
780 785
      //not connected to a pin
781 786
      #define SDCARDDETECT -1
782
-     
787
+
783 788
      //from the same bit in the RAMPS Newpanel define
784 789
      //encoder rotation values
785 790
      #define encrot0 0
786 791
      #define encrot1 2
787 792
      #define encrot2 3
788 793
      #define encrot3 1
789
-     
794
+
790 795
      #define BLEN_C 2
791 796
      #define BLEN_B 1
792 797
      #define BLEN_A 0
793
-     
798
+
794 799
    #endif //Newpanel
795 800
  #endif //Ultipanel
796
- 
801
+
797 802
 #endif
798 803
 
799 804
 
@@ -823,17 +828,17 @@
823 828
 #define Y_MAX_PIN 28
824 829
 #define Y_ENABLE_PIN 29
825 830
 
826
-#define Z_STEP_PIN 37 
831
+#define Z_STEP_PIN 37
827 832
 #define Z_DIR_PIN 39
828 833
 #define Z_MIN_PIN 30
829 834
 #define Z_MAX_PIN 32
830 835
 #define Z_ENABLE_PIN 35
831 836
 
832
-#define HEATER_BED_PIN 4 
833
-#define TEMP_BED_PIN 10  
837
+#define HEATER_BED_PIN 4
838
+#define TEMP_BED_PIN 10
834 839
 
835 840
 #define HEATER_0_PIN  2
836
-#define TEMP_0_PIN 8   
841
+#define TEMP_0_PIN 8
837 842
 
838 843
 #define HEATER_1_PIN 3
839 844
 #define TEMP_1_PIN 9
@@ -863,24 +868,24 @@
863 868
   //arduino pin witch triggers an piezzo beeper
864 869
     #define BEEPER 18
865 870
 
866
-    #define LCD_PINS_RS 20 
871
+    #define LCD_PINS_RS 20
867 872
     #define LCD_PINS_ENABLE 17
868 873
     #define LCD_PINS_D4 16
869
-    #define LCD_PINS_D5 21 
874
+    #define LCD_PINS_D5 21
870 875
     #define LCD_PINS_D6 5
871 876
     #define LCD_PINS_D7 6
872
-    
877
+
873 878
     //buttons are directly attached
874 879
     #define BTN_EN1 40
875 880
     #define BTN_EN2 42
876 881
     #define BTN_ENC 19  //the click
877
-    
882
+
878 883
     #define BLEN_C 2
879 884
     #define BLEN_B 1
880 885
     #define BLEN_A 0
881
-    
886
+
882 887
     #define SDCARDDETECT 38
883
-    
888
+
884 889
       //encoder rotation values
885 890
     #define encrot0 0
886 891
     #define encrot1 2
@@ -895,14 +900,14 @@
895 900
     #define SHIFT_LD 42
896 901
     #define SHIFT_OUT 40
897 902
     #define SHIFT_EN 17
898
-    
899
-    #define LCD_PINS_RS 16 
903
+
904
+    #define LCD_PINS_RS 16
900 905
     #define LCD_PINS_ENABLE 5
901 906
     #define LCD_PINS_D4 6
902
-    #define LCD_PINS_D5 21 
907
+    #define LCD_PINS_D5 21
903 908
     #define LCD_PINS_D6 20
904 909
     #define LCD_PINS_D7 19
905
-    
910
+
906 911
     //encoder rotation values
907 912
     #ifndef ULTIMAKERCONTROLLER
908 913
      #define encrot0 0
@@ -929,7 +934,7 @@
929 934
 
930 935
     #define BLEN_B 1
931 936
     #define BLEN_A 0
932
-  #endif 
937
+  #endif
933 938
 #endif //ULTRA_LCD
934 939
 
935 940
 #endif
@@ -960,17 +965,17 @@
960 965
 #define Y_MAX_PIN 16
961 966
 #define Y_ENABLE_PIN 29
962 967
 
963
-#define Z_STEP_PIN 37 
968
+#define Z_STEP_PIN 37
964 969
 #define Z_DIR_PIN 39
965 970
 #define Z_MIN_PIN 19
966 971
 #define Z_MAX_PIN 18
967 972
 #define Z_ENABLE_PIN 35
968 973
 
969
-#define HEATER_BED_PIN -1 
970
-#define TEMP_BED_PIN -1  
974
+#define HEATER_BED_PIN -1
975
+#define TEMP_BED_PIN -1
971 976
 
972 977
 #define HEATER_0_PIN  2
973
-#define TEMP_0_PIN 8   
978
+#define TEMP_0_PIN 8
974 979
 
975 980
 #define HEATER_1_PIN 1
976 981
 #define TEMP_1_PIN 1
@@ -994,10 +999,10 @@
994 999
 #define KILL_PIN           -1
995 1000
 #define SUICIDE_PIN        -1  //PIN that has to be turned on right after start, to keep power flowing.
996 1001
 
997
-#define LCD_PINS_RS 24 
1002
+#define LCD_PINS_RS 24
998 1003
 #define LCD_PINS_ENABLE 22
999 1004
 #define LCD_PINS_D4 36
1000
-#define LCD_PINS_D5 34 
1005
+#define LCD_PINS_D5 34
1001 1006
 #define LCD_PINS_D6 32
1002 1007
 #define LCD_PINS_D7 30
1003 1008
 
@@ -1019,17 +1024,17 @@
1019 1024
 #define X_DIR_PIN          16
1020 1025
 #define X_ENABLE_PIN       48
1021 1026
 #define X_MIN_PIN          37
1022
-#define X_MAX_PIN          36 
1027
+#define X_MAX_PIN          36
1023 1028
 
1024 1029
 #define Y_STEP_PIN         54
1025
-#define Y_DIR_PIN          47 
1030
+#define Y_DIR_PIN          47
1026 1031
 #define Y_ENABLE_PIN       55
1027 1032
 #define Y_MIN_PIN          35
1028
-#define Y_MAX_PIN          34 
1033
+#define Y_MAX_PIN          34
1029 1034
 
1030
-#define Z_STEP_PIN         57 
1035
+#define Z_STEP_PIN         57
1031 1036
 #define Z_DIR_PIN          56
1032
-#define Z_ENABLE_PIN       62 
1037
+#define Z_ENABLE_PIN       62
1033 1038
 #define Z_MIN_PIN          33
1034 1039
 #define Z_MAX_PIN          32
1035 1040
 
@@ -1047,7 +1052,7 @@
1047 1052
 
1048 1053
 #define LED_PIN            13
1049 1054
 
1050
-#define FAN_PIN            7 
1055
+#define FAN_PIN            7
1051 1056
 //additional FAN1 PIN (e.g. useful for electronics fan or light on/off) on PIN 8
1052 1057
 
1053 1058
 #define PS_ON_PIN          45
@@ -1069,10 +1074,10 @@
1069 1074
 #define SDSS               53
1070 1075
 #define SDCARDDETECT       49
1071 1076
 #define BEEPER             44
1072
-#define LCD_PINS_RS        19 
1077
+#define LCD_PINS_RS        19
1073 1078
 #define LCD_PINS_ENABLE    42
1074 1079
 #define LCD_PINS_D4        18
1075
-#define LCD_PINS_D5        38 
1080
+#define LCD_PINS_D5        38
1076 1081
 #define LCD_PINS_D6        41
1077 1082
 #define LCD_PINS_D7        40
1078 1083
 #define BTN_EN1            11
@@ -1256,7 +1261,7 @@
1256 1261
 
1257 1262
 #define LED_PIN            -1
1258 1263
 
1259
-#define FAN_PIN            -1 
1264
+#define FAN_PIN            -1
1260 1265
 
1261 1266
 #define PS_ON_PIN         14
1262 1267
 #define KILL_PIN           -1
@@ -1295,7 +1300,7 @@
1295 1300
 *       MISO (D 6) PB6  7|        |34  PA6 (AI 6 / D25)
1296 1301
 *        SCK (D 7) PB7  8|        |33  PA7 (AI 7 / D24)
1297 1302
 *                  RST  9|        |32  AREF
1298
-*                  VCC 10|        |31  GND 
1303
+*                  VCC 10|        |31  GND
1299 1304
 *                  GND 11|        |30  AVCC
1300 1305
 *                XTAL2 12|        |29  PC7 (D 23)
1301 1306
 *                XTAL1 13|        |28  PC6 (D 22)
@@ -1352,7 +1357,7 @@
1352 1357
 #define KILL_PIN           -1
1353 1358
 
1354 1359
 #define HEATER_0_PIN       4
1355
-#define HEATER_1_PIN       -1 // 12 
1360
+#define HEATER_1_PIN       -1 // 12
1356 1361
 #define HEATER_2_PIN       -1 // 13
1357 1362
 #define TEMP_0_PIN          0 //D27   // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
1358 1363
 #define TEMP_1_PIN         -1 // 1
@@ -1414,11 +1419,11 @@
1414 1419
 #define KILL_PIN           -1
1415 1420
 
1416 1421
 #define HEATER_0_PIN        3 /*DONE PWM on RIGHT connector */
1417
-#define HEATER_1_PIN       -1 
1422
+#define HEATER_1_PIN       -1
1418 1423
 #define HEATER_2_PIN       -1
1419
-#define HEATER_1_PIN       -1 
1424
+#define HEATER_1_PIN       -1
1420 1425
 #define HEATER_2_PIN       -1
1421
-#define TEMP_0_PIN          0 // ANALOG INPUT NUMBERING 
1426
+#define TEMP_0_PIN          0 // ANALOG INPUT NUMBERING
1422 1427
 #define TEMP_1_PIN          1 // ANALOG
1423 1428
 #define TEMP_2_PIN         -1 // 2
1424 1429
 #define HEATER_BED_PIN      4
@@ -1466,7 +1471,7 @@
1466 1471
 #define Z_MS2_PIN 67
1467 1472
 
1468 1473
 #define HEATER_BED_PIN 3
1469
-#define TEMP_BED_PIN 2 
1474
+#define TEMP_BED_PIN 2
1470 1475
 
1471 1476
 #define HEATER_0_PIN  9
1472 1477
 #define TEMP_0_PIN 0
@@ -1559,9 +1564,9 @@
1559 1564
 
1560 1565
 #define HEATER_0_PIN       9    // EXTRUDER 1
1561 1566
 #define HEATER_1_PIN       8    // EXTRUDER 2 (FAN On Sprinter)
1562
-#define HEATER_2_PIN       -1  
1567
+#define HEATER_2_PIN       -1
1563 1568
 
1564
-#if TEMP_SENSOR_0 == -1 
1569
+#if TEMP_SENSOR_0 == -1
1565 1570
 #define TEMP_0_PIN         8   // ANALOG NUMBERING
1566 1571
 #else
1567 1572
 #define TEMP_0_PIN         13   // ANALOG NUMBERING
@@ -1580,25 +1585,25 @@
1580 1585
 
1581 1586
   #ifdef NEWPANEL
1582 1587
   //arduino pin which triggers an piezzo beeper
1583
-    
1584
-    #define LCD_PINS_RS 16 
1588
+
1589
+    #define LCD_PINS_RS 16
1585 1590
     #define LCD_PINS_ENABLE 17
1586 1591
     #define LCD_PINS_D4 23
1587
-    #define LCD_PINS_D5 25 
1592
+    #define LCD_PINS_D5 25
1588 1593
     #define LCD_PINS_D6 27
1589 1594
     #define LCD_PINS_D7 29
1590
-    
1595
+
1591 1596
     //buttons are directly attached using AUX-2
1592 1597
     #define BTN_EN1 59
1593 1598
     #define BTN_EN2 64
1594 1599
     #define BTN_ENC 43  //the click
1595
-    
1600
+
1596 1601
     #define BLEN_C 2
1597 1602
     #define BLEN_B 1
1598 1603
     #define BLEN_A 0
1599
-    
1604
+
1600 1605
     #define SDCARDDETECT -1		// Ramps does not use this port
1601
-    
1606
+
1602 1607
       //encoder rotation values
1603 1608
     #define encrot0 0
1604 1609
     #define encrot1 2
@@ -1614,7 +1619,7 @@
1614 1619
 #endif
1615 1620
 
1616 1621
 //List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those!
1617
-#define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, HEATER_0_PIN, 
1622
+#define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, HEATER_0_PIN,
1618 1623
 #if EXTRUDERS > 1
1619 1624
   #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, HEATER_1_PIN,
1620 1625
 #else

Loading…
Отказ
Запис