bkubicek преди 11 години
родител
ревизия
2fb2a0a119
променени са 11 файла, в които са добавени 989 реда и са изтрити 767 реда
  1. 29
    0
      Marlin/BlinkM.cpp
  2. 14
    0
      Marlin/BlinkM.h
  3. 12
    6
      Marlin/Configuration.h
  4. 19
    0
      Marlin/Configuration_adv.h
  5. 7
    2
      Marlin/Marlin.h
  6. 93
    7
      Marlin/Marlin_main.cpp
  7. 7
    0
      Marlin/pins.h
  8. 32
    0
      Marlin/stepper.cpp
  9. 14
    0
      Marlin/temperature.h
  10. 1
    2
      Marlin/ultralcd.cpp
  11. 761
    750
      Marlin/ultralcd_implementation_hitachi_HD44780.h

+ 29
- 0
Marlin/BlinkM.cpp Целия файл

1
+/*
2
+  BlinkM.cpp - Library for controlling a BlinkM over i2c
3
+  Created by Tim Koster, August 21 2013.
4
+*/
5
+#include "Marlin.h"
6
+#ifdef BLINKM
7
+
8
+#if (ARDUINO >= 100)
9
+  # include "Arduino.h"
10
+#else
11
+  # include "WProgram.h"
12
+#endif
13
+
14
+#include "BlinkM.h"
15
+
16
+void SendColors(byte red, byte grn, byte blu)
17
+{
18
+  Wire.begin(); 
19
+  Wire.beginTransmission(0x09);
20
+  Wire.write('o');                    //to disable ongoing script, only needs to be used once
21
+  Wire.write('n');
22
+  Wire.write(red);
23
+  Wire.write(grn);
24
+  Wire.write(blu);
25
+  Wire.endTransmission();
26
+}
27
+
28
+#endif //BLINKM
29
+

+ 14
- 0
Marlin/BlinkM.h Целия файл

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

+ 12
- 6
Marlin/Configuration.h Целия файл

309
   #define X_PROBE_OFFSET_FROM_EXTRUDER -25
309
   #define X_PROBE_OFFSET_FROM_EXTRUDER -25
310
   #define Y_PROBE_OFFSET_FROM_EXTRUDER -29
310
   #define Y_PROBE_OFFSET_FROM_EXTRUDER -29
311
   #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35
311
   #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35
312
-  
312
+
313
+  #define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z before homing (G28) for Probe Clearance.
314
+                                        // Be sure you have this distance over your Z_MAX_POS in case
315
+    
313
   #define XY_TRAVEL_SPEED 8000         // X and Y axis travel speed between probes, in mm/min
316
   #define XY_TRAVEL_SPEED 8000         // X and Y axis travel speed between probes, in mm/min
314
   
317
   
315
   #define Z_RAISE_BEFORE_PROBING 15    //How much the extruder will be raised before traveling to the first probing point.
318
   #define Z_RAISE_BEFORE_PROBING 15    //How much the extruder will be raised before traveling to the first probing point.
330
 #define Y_MAX_POS 205
333
 #define Y_MAX_POS 205
331
 #define Y_MIN_POS 0
334
 #define Y_MIN_POS 0
332
 #define Z_MAX_POS 200
335
 #define Z_MAX_POS 200
333
-
334
-#ifndef ENABLE_AUTO_BED_LEVELING
335
 #define Z_MIN_POS 0
336
 #define Z_MIN_POS 0
336
-#else
337
-#define Z_MIN_POS (-1*Z_PROBE_OFFSET_FROM_EXTRUDER)  //With Auto Bed Leveling, the Z_MIN MUST have the same distance as Z_PROBE
338
-#endif
339
 
337
 
340
 #define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
338
 #define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
341
 #define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
339
 #define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
542
 // Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
540
 // Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
543
 //#define FAST_PWM_FAN
541
 //#define FAST_PWM_FAN
544
 
542
 
543
+// Temperature status leds that display the hotend and bet temperature.
544
+// If alle hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
545
+// Otherwise the RED led is on. There is 1C hysteresis.
546
+//#define TEMP_STAT_LEDS
547
+
545
 // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
548
 // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
546
 // which is not ass annoying as with the hardware PWM. On the other hand, if this frequency
549
 // which is not ass annoying as with the hardware PWM. On the other hand, if this frequency
547
 // is too low, you should also increment SOFT_PWM_SCALE.
550
 // is too low, you should also increment SOFT_PWM_SCALE.
563
 // Support for the BariCUDA Paste Extruder.
566
 // Support for the BariCUDA Paste Extruder.
564
 //#define BARICUDA
567
 //#define BARICUDA
565
 
568
 
569
+//define BlinkM/CyzRgb Support
570
+//#define BLINKM
571
+
566
 /*********************************************************************\
572
 /*********************************************************************\
567
 * R/C SERVO support
573
 * R/C SERVO support
568
 * Sponsored by TrinityLabs, Reworked by codexmas
574
 * Sponsored by TrinityLabs, Reworked by codexmas

+ 19
- 0
Marlin/Configuration_adv.h Целия файл

40
   #define AUTOTEMP_OLDWEIGHT 0.98
40
   #define AUTOTEMP_OLDWEIGHT 0.98
41
 #endif
41
 #endif
42
 
42
 
43
+//Show Temperature ADC value
44
+//The M105 command return, besides traditional information, the ADC value read from temperature sensors.
45
+//#define SHOW_TEMP_ADC_VALUES
46
+
43
 //  extruder run-out prevention. 
47
 //  extruder run-out prevention. 
44
 //if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded
48
 //if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded
45
 //#define EXTRUDER_RUNOUT_PREVENT  
49
 //#define EXTRUDER_RUNOUT_PREVENT  
146
   #define EXTRUDERS 1
150
   #define EXTRUDERS 1
147
 #endif
151
 #endif
148
 
152
 
153
+// Same again but for Y Axis.
154
+//#define Y_DUAL_STEPPER_DRIVERS
155
+
156
+// Define if the two Y drives need to rotate in opposite directions
157
+#define INVERT_Y2_VS_Y_DIR true
158
+
159
+#ifdef Y_DUAL_STEPPER_DRIVERS
160
+  #undef EXTRUDERS
161
+  #define EXTRUDERS 1
162
+#endif
163
+
164
+#ifdef Z_DUAL_STEPPER_DRIVERS && Y_DUAL_STEPPER_DRIVERS
165
+  #error "You cannot have dual drivers for both Y and Z"
166
+#endif 
167
+
149
 // Enable this for dual x-carriage printers. 
168
 // Enable this for dual x-carriage printers. 
150
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
169
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
151
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
170
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage

+ 7
- 2
Marlin/Marlin.h Целия файл

109
 #endif
109
 #endif
110
 
110
 
111
 #if defined(Y_ENABLE_PIN) && Y_ENABLE_PIN > -1
111
 #if defined(Y_ENABLE_PIN) && Y_ENABLE_PIN > -1
112
-  #define  enable_y() WRITE(Y_ENABLE_PIN, Y_ENABLE_ON)
113
-  #define disable_y() WRITE(Y_ENABLE_PIN,!Y_ENABLE_ON)
112
+  #ifdef Y_DUAL_STEPPER_DRIVERS
113
+    #define  enable_y() { WRITE(Y_ENABLE_PIN, Y_ENABLE_ON); WRITE(Y2_ENABLE_PIN,  Y_ENABLE_ON); }
114
+    #define disable_y() { WRITE(Y_ENABLE_PIN,!Y_ENABLE_ON); WRITE(Y2_ENABLE_PIN, !Y_ENABLE_ON); }
115
+  #else
116
+    #define  enable_y() WRITE(Y_ENABLE_PIN, Y_ENABLE_ON)
117
+    #define disable_y() WRITE(Y_ENABLE_PIN,!Y_ENABLE_ON)
118
+  #endif
114
 #else
119
 #else
115
   #define enable_y() ;
120
   #define enable_y() ;
116
   #define disable_y() ;
121
   #define disable_y() ;

+ 93
- 7
Marlin/Marlin_main.cpp Целия файл

44
 #include "language.h"
44
 #include "language.h"
45
 #include "pins_arduino.h"
45
 #include "pins_arduino.h"
46
 
46
 
47
+#ifdef BLINKM
48
+#include "BlinkM.h"
49
+#include "Wire.h" 
50
+#endif
51
+
47
 #if NUM_SERVOS > 0
52
 #if NUM_SERVOS > 0
48
 #include "Servo.h"
53
 #include "Servo.h"
49
 #endif
54
 #endif
118
 // M128 - EtoP Open (BariCUDA EtoP = electricity to air pressure transducer by jmil)
123
 // M128 - EtoP Open (BariCUDA EtoP = electricity to air pressure transducer by jmil)
119
 // M129 - EtoP Closed (BariCUDA EtoP = electricity to air pressure transducer by jmil)
124
 // M129 - EtoP Closed (BariCUDA EtoP = electricity to air pressure transducer by jmil)
120
 // M140 - Set bed target temp
125
 // M140 - Set bed target temp
126
+// M150 - Set BlinkM Colour Output R: Red<0-255> U(!): Green<0-255> B: Blue<0-255> over i2c, G for green does not work.
121
 // M190 - Sxxx Wait for bed current temp to reach target temp. Waits only when heating
127
 // M190 - Sxxx Wait for bed current temp to reach target temp. Waits only when heating
122
 //        Rxxx Wait for bed current temp to reach target temp. Waits when heating and cooling
128
 //        Rxxx Wait for bed current temp to reach target temp. Waits when heating and cooling
123
 // M200 - Set filament diameter
129
 // M200 - Set filament diameter
935
       axis_home_dir = x_home_dir(active_extruder);
941
       axis_home_dir = x_home_dir(active_extruder);
936
 #endif
942
 #endif
937
 
943
 
944
+    current_position[axis] = 0;
945
+    plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
946
+	
938
     // Engage Servo endstop if enabled
947
     // Engage Servo endstop if enabled
939
     #ifdef SERVO_ENDSTOPS
948
     #ifdef SERVO_ENDSTOPS
940
-#if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
941
-    if (axis==Z_AXIS) engage_z_probe();
942
-	else
943
-#endif
949
+      #if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
950
+        if (axis==Z_AXIS) {
951
+          #if defined (Z_RAISE_BEFORE_HOMING) && (Z_RAISE_BEFORE_HOMING > 0)
952
+            destination[axis] = Z_RAISE_BEFORE_HOMING * axis_home_dir * (-1);    // Set destination away from bed
953
+            feedrate = max_feedrate[axis];
954
+            plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate, active_extruder);
955
+            st_synchronize();
956
+          #endif
957
+          engage_z_probe();
958
+        }
959
+	    else
960
+      #endif
944
       if (servo_endstops[axis] > -1) {
961
       if (servo_endstops[axis] > -1) {
945
         servos[servo_endstops[axis]].write(servo_endstop_angles[axis * 2]);
962
         servos[servo_endstops[axis]].write(servo_endstop_angles[axis * 2]);
946
       }
963
       }
947
     #endif
964
     #endif
948
 
965
 
949
-    current_position[axis] = 0;
950
-    plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
951
     destination[axis] = 1.5 * max_length(axis) * axis_home_dir;
966
     destination[axis] = 1.5 * max_length(axis) * axis_home_dir;
952
     feedrate = homing_feedrate[axis];
967
     feedrate = homing_feedrate[axis];
953
     plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder);
968
     plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder);
1213
           current_position[Z_AXIS]=code_value()+add_homeing[2];
1228
           current_position[Z_AXIS]=code_value()+add_homeing[2];
1214
         }
1229
         }
1215
       }
1230
       }
1231
+      #ifdef ENABLE_AUTO_BED_LEVELING
1232
+         current_position[Z_AXIS] -= Z_PROBE_OFFSET_FROM_EXTRUDER;  //Add Z_Probe offset (the distance is negative)
1233
+      #endif
1216
       plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
1234
       plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
1217
 #endif // else DELTA
1235
 #endif // else DELTA
1218
 
1236
 
1607
         SERIAL_PROTOCOLPGM(" B@:");
1625
         SERIAL_PROTOCOLPGM(" B@:");
1608
         SERIAL_PROTOCOL(getHeaterPower(-1));
1626
         SERIAL_PROTOCOL(getHeaterPower(-1));
1609
 
1627
 
1628
+        #ifdef SHOW_TEMP_ADC_VALUES
1629
+          #if defined(TEMP_BED_PIN) && TEMP_BED_PIN > -1
1630
+            SERIAL_PROTOCOLPGM("    ADC B:");
1631
+            SERIAL_PROTOCOL_F(degBed(),1);
1632
+            SERIAL_PROTOCOLPGM("C->");
1633
+            SERIAL_PROTOCOL_F(rawBedTemp()/OVERSAMPLENR,0);
1634
+          #endif
1635
+          for (int8_t cur_extruder = 0; cur_extruder < EXTRUDERS; ++cur_extruder) {
1636
+            SERIAL_PROTOCOLPGM("  T");
1637
+            SERIAL_PROTOCOL(cur_extruder);
1638
+            SERIAL_PROTOCOLPGM(":");
1639
+            SERIAL_PROTOCOL_F(degHotend(cur_extruder),1);
1640
+            SERIAL_PROTOCOLPGM("C->");
1641
+            SERIAL_PROTOCOL_F(rawHotendTemp(cur_extruder)/OVERSAMPLENR,0);
1642
+          }
1643
+        #endif
1644
+		
1610
         SERIAL_PROTOCOLLN("");
1645
         SERIAL_PROTOCOLLN("");
1611
       return;
1646
       return;
1612
       break;
1647
       break;
1943
       #endif
1978
       #endif
1944
       break;
1979
       break;
1945
       //TODO: update for all axis, use for loop
1980
       //TODO: update for all axis, use for loop
1981
+    #ifdef BLINKM  
1982
+    case 150: // M150
1983
+      {
1984
+        byte red;
1985
+        byte grn;
1986
+        byte blu;
1987
+        
1988
+        if(code_seen('R')) red = code_value();
1989
+        if(code_seen('U')) grn = code_value();
1990
+        if(code_seen('B')) blu = code_value();
1991
+        
1992
+        SendColors(red,grn,blu);        
1993
+      }
1994
+      break;
1995
+    #endif //BLINKM
1946
     case 201: // M201
1996
     case 201: // M201
1947
       for(int8_t i=0; i < NUM_AXIS; i++)
1997
       for(int8_t i=0; i < NUM_AXIS; i++)
1948
       {
1998
       {
2925
 }
2975
 }
2926
 #endif
2976
 #endif
2927
 
2977
 
2978
+#ifdef TEMP_STAT_LEDS
2979
+static bool blue_led = false;
2980
+static bool red_led = false;
2981
+static uint32_t stat_update = 0;
2982
+
2983
+void handle_status_leds(void) {
2984
+  float max_temp = 0.0;
2985
+  if(millis() > stat_update) {
2986
+    stat_update += 500; // Update every 0.5s
2987
+    for (int8_t cur_extruder = 0; cur_extruder < EXTRUDERS; ++cur_extruder) {
2988
+       max_temp = max(max_temp, degHotend(cur_extruder));
2989
+       max_temp = max(max_temp, degTargetHotend(cur_extruder));
2990
+    }
2991
+    #if defined(TEMP_BED_PIN) && TEMP_BED_PIN > -1
2992
+      max_temp = max(max_temp, degTargetBed());
2993
+      max_temp = max(max_temp, degBed());
2994
+    #endif
2995
+    if((max_temp > 55.0) && (red_led == false)) {
2996
+      digitalWrite(STAT_LED_RED, 1);
2997
+      digitalWrite(STAT_LED_BLUE, 0);
2998
+      red_led = true;
2999
+      blue_led = false;
3000
+    }
3001
+    if((max_temp < 54.0) && (blue_led == false)) {
3002
+      digitalWrite(STAT_LED_RED, 0);
3003
+      digitalWrite(STAT_LED_BLUE, 1);
3004
+      red_led = false;
3005
+      blue_led = true;
3006
+    }
3007
+  }
3008
+}
3009
+#endif
3010
+
2928
 void manage_inactivity()
3011
 void manage_inactivity()
2929
 {
3012
 {
2930
   if( (millis() - previous_millis_cmd) >  max_inactive_time )
3013
   if( (millis() - previous_millis_cmd) >  max_inactive_time )
2978
       memcpy(destination,current_position,sizeof(destination));
3061
       memcpy(destination,current_position,sizeof(destination));
2979
       prepare_move(); 
3062
       prepare_move(); 
2980
     }
3063
     }
2981
-  #endif  
3064
+  #endif
3065
+  #ifdef TEMP_STAT_LEDS
3066
+      handle_status_leds();
3067
+  #endif
2982
   check_axes_activity();
3068
   check_axes_activity();
2983
 }
3069
 }
2984
 
3070
 

+ 7
- 0
Marlin/pins.h Целия файл

544
     #endif
544
     #endif
545
   #endif
545
   #endif
546
 
546
 
547
+  #ifdef TEMP_STAT_LEDS
548
+    #if MOTHERBOARD == 67
549
+      #define STAT_LED_RED       6
550
+      #define STAT_LED_BLUE     11
551
+    #endif
552
+  #endif
553
+  
547
   #ifdef ULTRA_LCD
554
   #ifdef ULTRA_LCD
548
 
555
 
549
     #ifdef NEWPANEL
556
     #ifdef NEWPANEL

+ 32
- 0
Marlin/stepper.cpp Целия файл

383
     }
383
     }
384
     if((out_bits & (1<<Y_AXIS))!=0){
384
     if((out_bits & (1<<Y_AXIS))!=0){
385
       WRITE(Y_DIR_PIN, INVERT_Y_DIR);
385
       WRITE(Y_DIR_PIN, INVERT_Y_DIR);
386
+	  
387
+	  #ifdef Y_DUAL_STEPPER_DRIVERS
388
+	    WRITE(Y2_DIR_PIN, !(INVERT_Y_DIR == INVERT_Y2_VS_Y_DIR));
389
+	  #endif
390
+	  
386
       count_direction[Y_AXIS]=-1;
391
       count_direction[Y_AXIS]=-1;
387
     }
392
     }
388
     else{
393
     else{
389
       WRITE(Y_DIR_PIN, !INVERT_Y_DIR);
394
       WRITE(Y_DIR_PIN, !INVERT_Y_DIR);
395
+	  
396
+	  #ifdef Y_DUAL_STEPPER_DRIVERS
397
+	    WRITE(Y2_DIR_PIN, (INVERT_Y_DIR == INVERT_Y2_VS_Y_DIR));
398
+	  #endif
399
+	  
390
       count_direction[Y_AXIS]=1;
400
       count_direction[Y_AXIS]=1;
391
     }
401
     }
392
 
402
 
582
         counter_y += current_block->steps_y;
592
         counter_y += current_block->steps_y;
583
         if (counter_y > 0) {
593
         if (counter_y > 0) {
584
           WRITE(Y_STEP_PIN, !INVERT_Y_STEP_PIN);
594
           WRITE(Y_STEP_PIN, !INVERT_Y_STEP_PIN);
595
+		  
596
+		  #ifdef Y_DUAL_STEPPER_DRIVERS
597
+			WRITE(Y2_STEP_PIN, !INVERT_Y_STEP_PIN);
598
+		  #endif
599
+		  
585
           counter_y -= current_block->step_event_count;
600
           counter_y -= current_block->step_event_count;
586
           count_position[Y_AXIS]+=count_direction[Y_AXIS];
601
           count_position[Y_AXIS]+=count_direction[Y_AXIS];
587
           WRITE(Y_STEP_PIN, INVERT_Y_STEP_PIN);
602
           WRITE(Y_STEP_PIN, INVERT_Y_STEP_PIN);
603
+		  
604
+		  #ifdef Y_DUAL_STEPPER_DRIVERS
605
+			WRITE(Y2_STEP_PIN, INVERT_Y_STEP_PIN);
606
+		  #endif
588
         }
607
         }
589
 
608
 
590
       counter_z += current_block->steps_z;
609
       counter_z += current_block->steps_z;
756
   #endif
775
   #endif
757
   #if defined(Y_DIR_PIN) && Y_DIR_PIN > -1
776
   #if defined(Y_DIR_PIN) && Y_DIR_PIN > -1
758
     SET_OUTPUT(Y_DIR_PIN);
777
     SET_OUTPUT(Y_DIR_PIN);
778
+		
779
+	#if defined(Y_DUAL_STEPPER_DRIVERS) && defined(Y2_DIR_PIN) && (Y2_DIR_PIN > -1)
780
+	  SET_OUTPUT(Y2_DIR_PIN);
781
+	#endif
759
   #endif
782
   #endif
760
   #if defined(Z_DIR_PIN) && Z_DIR_PIN > -1
783
   #if defined(Z_DIR_PIN) && Z_DIR_PIN > -1
761
     SET_OUTPUT(Z_DIR_PIN);
784
     SET_OUTPUT(Z_DIR_PIN);
787
   #if defined(Y_ENABLE_PIN) && Y_ENABLE_PIN > -1
810
   #if defined(Y_ENABLE_PIN) && Y_ENABLE_PIN > -1
788
     SET_OUTPUT(Y_ENABLE_PIN);
811
     SET_OUTPUT(Y_ENABLE_PIN);
789
     if(!Y_ENABLE_ON) WRITE(Y_ENABLE_PIN,HIGH);
812
     if(!Y_ENABLE_ON) WRITE(Y_ENABLE_PIN,HIGH);
813
+	
814
+	#if defined(Y_DUAL_STEPPER_DRIVERS) && defined(Y2_ENABLE_PIN) && (Y2_ENABLE_PIN > -1)
815
+	  SET_OUTPUT(Y2_ENABLE_PIN);
816
+	  if(!Y_ENABLE_ON) WRITE(Y2_ENABLE_PIN,HIGH);
817
+	#endif
790
   #endif
818
   #endif
791
   #if defined(Z_ENABLE_PIN) && Z_ENABLE_PIN > -1
819
   #if defined(Z_ENABLE_PIN) && Z_ENABLE_PIN > -1
792
     SET_OUTPUT(Z_ENABLE_PIN);
820
     SET_OUTPUT(Z_ENABLE_PIN);
869
   #if defined(Y_STEP_PIN) && (Y_STEP_PIN > -1)
897
   #if defined(Y_STEP_PIN) && (Y_STEP_PIN > -1)
870
     SET_OUTPUT(Y_STEP_PIN);
898
     SET_OUTPUT(Y_STEP_PIN);
871
     WRITE(Y_STEP_PIN,INVERT_Y_STEP_PIN);
899
     WRITE(Y_STEP_PIN,INVERT_Y_STEP_PIN);
900
+    #if defined(Y_DUAL_STEPPER_DRIVERS) && defined(Y2_STEP_PIN) && (Y2_STEP_PIN > -1)
901
+      SET_OUTPUT(Y2_STEP_PIN);
902
+      WRITE(Y2_STEP_PIN,INVERT_Y_STEP_PIN);
903
+    #endif
872
     disable_y();
904
     disable_y();
873
   #endif
905
   #endif
874
   #if defined(Z_STEP_PIN) && (Z_STEP_PIN > -1)
906
   #if defined(Z_STEP_PIN) && (Z_STEP_PIN > -1)

+ 14
- 0
Marlin/temperature.h Целия файл

35
 // do not use these routines and variables outside of temperature.cpp
35
 // do not use these routines and variables outside of temperature.cpp
36
 extern int target_temperature[EXTRUDERS];  
36
 extern int target_temperature[EXTRUDERS];  
37
 extern float current_temperature[EXTRUDERS];
37
 extern float current_temperature[EXTRUDERS];
38
+#ifdef SHOW_TEMP_ADC_VALUES
39
+  extern int current_temperature_raw[EXTRUDERS];
40
+  extern int current_temperature_bed_raw;
41
+#endif
38
 extern int target_temperature_bed;
42
 extern int target_temperature_bed;
39
 extern float current_temperature_bed;
43
 extern float current_temperature_bed;
40
 #ifdef TEMP_SENSOR_1_AS_REDUNDANT
44
 #ifdef TEMP_SENSOR_1_AS_REDUNDANT
66
   return current_temperature[extruder];
70
   return current_temperature[extruder];
67
 };
71
 };
68
 
72
 
73
+#ifdef SHOW_TEMP_ADC_VALUES
74
+  FORCE_INLINE float rawHotendTemp(uint8_t extruder) {  
75
+    return current_temperature_raw[extruder];
76
+  };
77
+
78
+  FORCE_INLINE float rawBedTemp() {  
79
+    return current_temperature_bed_raw;
80
+  };
81
+#endif
82
+
69
 FORCE_INLINE float degBed() {
83
 FORCE_INLINE float degBed() {
70
   return current_temperature_bed;
84
   return current_temperature_bed;
71
 };
85
 };

+ 1
- 2
Marlin/ultralcd.cpp Целия файл

104
     if (encoderPosition > 0x8000) encoderPosition = 0; \
104
     if (encoderPosition > 0x8000) encoderPosition = 0; \
105
     if (encoderPosition / ENCODER_STEPS_PER_MENU_ITEM < currentMenuViewOffset) currentMenuViewOffset = encoderPosition / ENCODER_STEPS_PER_MENU_ITEM;\
105
     if (encoderPosition / ENCODER_STEPS_PER_MENU_ITEM < currentMenuViewOffset) currentMenuViewOffset = encoderPosition / ENCODER_STEPS_PER_MENU_ITEM;\
106
     uint8_t _lineNr = currentMenuViewOffset, _menuItemNr; \
106
     uint8_t _lineNr = currentMenuViewOffset, _menuItemNr; \
107
+    bool wasClicked = LCD_CLICKED;\
107
     for(uint8_t _drawLineNr = 0; _drawLineNr < LCD_HEIGHT; _drawLineNr++, _lineNr++) { \
108
     for(uint8_t _drawLineNr = 0; _drawLineNr < LCD_HEIGHT; _drawLineNr++, _lineNr++) { \
108
         _menuItemNr = 0;
109
         _menuItemNr = 0;
109
 #define MENU_ITEM(type, label, args...) do { \
110
 #define MENU_ITEM(type, label, args...) do { \
142
 uint32_t blocking_enc;
143
 uint32_t blocking_enc;
143
 uint8_t lastEncoderBits;
144
 uint8_t lastEncoderBits;
144
 uint32_t encoderPosition;
145
 uint32_t encoderPosition;
145
-bool wasClicked;
146
 #if (SDCARDDETECT > 0)
146
 #if (SDCARDDETECT > 0)
147
 bool lcd_oldcardstatus;
147
 bool lcd_oldcardstatus;
148
 #endif
148
 #endif
1042
     
1042
     
1043
     if (lcd_next_update_millis < millis())
1043
     if (lcd_next_update_millis < millis())
1044
     {
1044
     {
1045
-      wasClicked = LCD_CLICKED;
1046
 #ifdef ULTIPANEL
1045
 #ifdef ULTIPANEL
1047
 		#ifdef REPRAPWORLD_KEYPAD
1046
 		#ifdef REPRAPWORLD_KEYPAD
1048
         	if (REPRAPWORLD_KEYPAD_MOVE_Z_UP) {
1047
         	if (REPRAPWORLD_KEYPAD_MOVE_Z_UP) {

+ 761
- 750
Marlin/ultralcd_implementation_hitachi_HD44780.h
Файловите разлики са ограничени, защото са твърде много
Целия файл


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