소스 검색

Merge branch 'Development' into marlin_configurator

Latest upstream changes
Scott Lahteine 10 년 전
부모
커밋
c7cdb176c8
7개의 변경된 파일1040개의 추가작업 그리고 1364개의 파일을 삭제
  1. 10
    10
      Marlin/Marlin_main.cpp
  2. 37
    0
      Marlin/language.h
  3. 34
    16
      Marlin/language_en.h
  4. 4
    0
      Marlin/pins_RAMPS_13.h
  5. 4
    0
      Marlin/pins_RUMBA.h
  6. 912
    1266
      Marlin/temperature.cpp
  7. 39
    72
      Marlin/temperature.h

+ 10
- 10
Marlin/Marlin_main.cpp 파일 보기

@@ -1734,16 +1734,6 @@ void process_commands()
1734 1734
                 SERIAL_ECHOLNPGM(MSG_POSITION_UNKNOWN);
1735 1735
                 break; // abort G29, since we don't know where we are
1736 1736
             }
1737
-            int left_probe_bed_position=LEFT_PROBE_BED_POSITION;
1738
-            int right_probe_bed_position=RIGHT_PROBE_BED_POSITION;
1739
-            int back_probe_bed_position=BACK_PROBE_BED_POSITION;
1740
-            int front_probe_bed_position=FRONT_PROBE_BED_POSITION;
1741
-            int auto_bed_leveling_grid_points=AUTO_BED_LEVELING_GRID_POINTS;
1742
-            if (code_seen('L')) left_probe_bed_position=(int)code_value();
1743
-            if (code_seen('R')) right_probe_bed_position=(int)code_value();
1744
-            if (code_seen('B')) back_probe_bed_position=(int)code_value();
1745
-            if (code_seen('F')) front_probe_bed_position=(int)code_value();
1746
-            if (code_seen('P')) auto_bed_leveling_grid_points=(int)code_value();
1747 1737
 
1748 1738
 #ifdef Z_PROBE_SLED
1749 1739
             dock_sled(false);
@@ -1764,6 +1754,16 @@ void process_commands()
1764 1754
             feedrate = homing_feedrate[Z_AXIS];
1765 1755
 #ifdef AUTO_BED_LEVELING_GRID
1766 1756
             // probe at the points of a lattice grid
1757
+            int left_probe_bed_position=LEFT_PROBE_BED_POSITION;
1758
+            int right_probe_bed_position=RIGHT_PROBE_BED_POSITION;
1759
+            int back_probe_bed_position=BACK_PROBE_BED_POSITION;
1760
+            int front_probe_bed_position=FRONT_PROBE_BED_POSITION;
1761
+            int auto_bed_leveling_grid_points=AUTO_BED_LEVELING_GRID_POINTS;
1762
+            if (code_seen('L')) left_probe_bed_position=(int)code_value();
1763
+            if (code_seen('R')) right_probe_bed_position=(int)code_value();
1764
+            if (code_seen('B')) back_probe_bed_position=(int)code_value();
1765
+            if (code_seen('F')) front_probe_bed_position=(int)code_value();
1766
+            if (code_seen('P')) auto_bed_leveling_grid_points=(int)code_value();
1767 1767
 
1768 1768
             int xGridSpacing = (right_probe_bed_position - left_probe_bed_position) / (auto_bed_leveling_grid_points-1);
1769 1769
             int yGridSpacing = (back_probe_bed_position - front_probe_bed_position) / (auto_bed_leveling_grid_points-1);

+ 37
- 0
Marlin/language.h 파일 보기

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

+ 34
- 16
Marlin/language_en.h 파일 보기

@@ -255,7 +255,7 @@
255 255
 #define MSG_VOLUMETRIC                      "Filament"
256 256
 #endif
257 257
 #ifndef MSG_VOLUMETRIC_ENABLED
258
-#define MSG_VOLUMETRIC_ENABLED		        "E in mm" STR_h3
258
+#define MSG_VOLUMETRIC_ENABLED              "E in mm" STR_h3
259 259
 #endif
260 260
 #ifndef MSG_FILAMENT_SIZE_EXTRUDER_0
261 261
 #define MSG_FILAMENT_SIZE_EXTRUDER_0        "Fil. Dia. 1"
@@ -383,23 +383,41 @@
383 383
 #ifndef MSG_ENDSTOP_ABORT
384 384
 #define MSG_ENDSTOP_ABORT                   "Endstop abort"
385 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
386 404
 
387 405
 #ifdef DELTA_CALIBRATION_MENU
388
-    #ifndef MSG_DELTA_CALIBRATE
389
-    #define MSG_DELTA_CALIBRATE             "Delta Calibration"
390
-    #endif
391
-    #ifndef MSG_DELTA_CALIBRATE_X
392
-    #define MSG_DELTA_CALIBRATE_X           "Calibrate X"
393
-    #endif
394
-    #ifndef MSG_DELTA_CALIBRATE_Y
395
-    #define MSG_DELTA_CALIBRATE_Y           "Calibrate Y"
396
-    #endif
397
-    #ifndef MSG_DELTA_CALIBRATE_Z
398
-    #define MSG_DELTA_CALIBRATE_Z           "Calibrate Z"
399
-    #endif
400
-    #ifndef MSG_DELTA_CALIBRATE_CENTER
401
-    #define MSG_DELTA_CALIBRATE_CENTER      "Calibrate Center"
402
-    #endif
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
403 421
 #endif // DELTA_CALIBRATION_MENU
404 422
 
405 423
 #endif // LANGUAGE_EN_H

+ 4
- 0
Marlin/pins_RAMPS_13.h 파일 보기

@@ -172,6 +172,10 @@
172 172
         #define SHIFT_OUT 40 // shift register
173 173
         #define SHIFT_CLK 44 // shift register
174 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
175 179
       #else
176 180
         #define BTN_EN1 37
177 181
         #define BTN_EN2 35

+ 4
- 0
Marlin/pins_RUMBA.h 파일 보기

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

+ 912
- 1266
Marlin/temperature.cpp
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


+ 39
- 72
Marlin/temperature.h 파일 보기

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

Loading…
취소
저장