Pārlūkot izejas kodu

Merge pull request #841 from Dim3nsioneer/Marlin_v1

Set flow rate (extrude-mutliplier) for each extruder individually
ErikZalm 10 gadus atpakaļ
vecāks
revīzija
084134d3c7
4 mainītis faili ar 72 papildinājumiem un 2 dzēšanām
  1. 2
    1
      Marlin/Marlin.h
  2. 23
    1
      Marlin/Marlin_main.cpp
  3. 40
    0
      Marlin/language.h
  4. 7
    0
      Marlin/ultralcd.cpp

+ 2
- 1
Marlin/Marlin.h Parādīt failu

@@ -203,7 +203,8 @@ void setPwmFrequency(uint8_t pin, int val);
203 203
 extern float homing_feedrate[];
204 204
 extern bool axis_relative_modes[];
205 205
 extern int feedmultiply;
206
-extern int extrudemultiply; // Sets extrude multiply factor (in percent)
206
+extern int extrudemultiply; // Sets extrude multiply factor (in percent) for all extruders
207
+extern int extruder_multiply[EXTRUDERS]; // sets extrude multiply factor (in percent) for each extruder individually
207 208
 extern float volumetric_multiplier[EXTRUDERS]; // reciprocal of cross-sectional area of filament (in square millimeters), stored this way to reduce computational burden in planner
208 209
 extern float current_position[NUM_AXIS] ;
209 210
 extern float add_homeing[3];

+ 23
- 1
Marlin/Marlin_main.cpp Parādīt failu

@@ -189,6 +189,14 @@ bool axis_relative_modes[] = AXIS_RELATIVE_MODES;
189 189
 int feedmultiply=100; //100->1 200->2
190 190
 int saved_feedmultiply;
191 191
 int extrudemultiply=100; //100->1 200->2
192
+int extruder_multiply[EXTRUDERS] = {100
193
+  #if EXTRUDERS > 1
194
+    , 100
195
+    #if EXTRUDERS > 2
196
+      , 100
197
+    #endif
198
+  #endif
199
+};
192 200
 float volumetric_multiplier[EXTRUDERS] = {1.0
193 201
   #if EXTRUDERS > 1
194 202
     , 1.0
@@ -2426,7 +2434,18 @@ void process_commands()
2426 2434
     {
2427 2435
       if(code_seen('S'))
2428 2436
       {
2429
-        extrudemultiply = code_value() ;
2437
+        int tmp_code = code_value();
2438
+        if (code_seen('T'))
2439
+        {
2440
+          if(setTargetedHotend(221)){
2441
+            break;
2442
+          }
2443
+          extruder_multiply[tmp_extruder] = tmp_code;
2444
+        }
2445
+        else
2446
+        {
2447
+          extrudemultiply = tmp_code ;
2448
+        }
2430 2449
       }
2431 2450
     }
2432 2451
     break;
@@ -3546,6 +3565,9 @@ bool setTargetedHotend(int code){
3546 3565
         case 218:
3547 3566
           SERIAL_ECHO(MSG_M218_INVALID_EXTRUDER);
3548 3567
           break;
3568
+        case 221:
3569
+          SERIAL_ECHO(MSG_M221_INVALID_EXTRUDER);
3570
+          break;
3549 3571
       }
3550 3572
       SERIAL_ECHOLN(tmp_extruder);
3551 3573
       return true;

+ 40
- 0
Marlin/language.h Parādīt failu

@@ -100,6 +100,9 @@
100 100
 	#define MSG_BED "Bed"
101 101
 	#define MSG_FAN_SPEED "Fan speed"
102 102
 	#define MSG_FLOW "Flow"
103
+	#define MSG_FLOW0 "Flow 0"
104
+	#define MSG_FLOW1 "Flow 1"
105
+	#define MSG_FLOW2 "Flow 2"
103 106
 	#define MSG_CONTROL "Control"
104 107
 	#define MSG_MIN " \002 Min"
105 108
 	#define MSG_MAX " \002 Max"
@@ -192,6 +195,7 @@
192 195
 	#define MSG_M105_INVALID_EXTRUDER "M105 Invalid extruder "
193 196
 	#define MSG_M200_INVALID_EXTRUDER "M200 Invalid extruder "
194 197
 	#define MSG_M218_INVALID_EXTRUDER "M218 Invalid extruder "
198
+	#define MSG_M221_INVALID_EXTRUDER "M221 Invalid extruder "
195 199
 	#define MSG_ERR_NO_THERMISTORS "No thermistors - no temperature"
196 200
 	#define MSG_M109_INVALID_EXTRUDER "M109 Invalid extruder "
197 201
 	#define MSG_HEATING "Heating..."
@@ -283,6 +287,9 @@
283 287
 	#define MSG_BED "Loze"
284 288
 	#define MSG_FAN_SPEED "Obroty wiatraka"
285 289
 	#define MSG_FLOW "Przeplyw"
290
+	#define MSG_FLOW0 "Przeplyw 0"
291
+	#define MSG_FLOW1 "Przeplyw 1"
292
+	#define MSG_FLOW2 "Przeplyw 2"
286 293
 	#define MSG_CONTROL "Kontrola"
287 294
 	#define MSG_MIN " \002 Min"
288 295
 	#define MSG_MAX " \002 Max"
@@ -378,6 +385,7 @@
378 385
 	#define MSG_M105_INVALID_EXTRUDER "M105 Niepoprawny ekstruder "
379 386
 	#define MSG_M200_INVALID_EXTRUDER "M200 Niepoprawny ekstruder "
380 387
 	#define MSG_M218_INVALID_EXTRUDER "M218 Niepoprawny ekstruder "
388
+	#define MSG_M221_INVALID_EXTRUDER "M221 Niepoprawny ekstruder "
381 389
 	#define MSG_ERR_NO_THERMISTORS "Brak termistorow - brak temperatury :("
382 390
 	#define MSG_M109_INVALID_EXTRUDER "M109 Niepoprawny ekstruder "
383 391
 	#define MSG_HEATING "Nagrzewanie ekstrudera..."
@@ -470,6 +478,9 @@
470 478
 	#define MSG_BED "Plateau"
471 479
 	#define MSG_FAN_SPEED "Vite. ventilateur"
472 480
 	#define MSG_FLOW "Flux"
481
+	#define MSG_FLOW0 "Flux 0"
482
+	#define MSG_FLOW1 "Flux 1"
483
+	#define MSG_FLOW2 "Flux 2"
473 484
 	#define MSG_CONTROL "Controler"
474 485
 	#define MSG_MIN " \002 Min"
475 486
 	#define MSG_MAX " \002 Max"
@@ -563,6 +574,7 @@
563 574
 	#define MSG_M105_INVALID_EXTRUDER "M105 Extruder invalide"
564 575
 	#define MSG_M200_INVALID_EXTRUDER "M200 Extruder invalide"
565 576
 	#define MSG_M218_INVALID_EXTRUDER "M218 Extruder invalide"
577
+	#define MSG_M221_INVALID_EXTRUDER "M221 Extruder invalide"
566 578
 	#define MSG_ERR_NO_THERMISTORS "Pas de thermistor, pas de temperature"
567 579
 	#define MSG_M109_INVALID_EXTRUDER "M109 Extruder invalide "
568 580
 	#define MSG_HEATING "En chauffe..."
@@ -654,6 +666,9 @@
654 666
 	#define MSG_BED              "Bett"
655 667
 	#define MSG_FAN_SPEED        "Lüftergeschw."
656 668
 	#define MSG_FLOW             "Fluss"
669
+	#define MSG_FLOW0            "Fluss 0"
670
+	#define MSG_FLOW1            "Fluss 1"
671
+	#define MSG_FLOW2            "Fluss 2"
657 672
 	#define MSG_CONTROL          "Einstellungen"
658 673
 	#define MSG_MIN              "\002 Min"
659 674
 	#define MSG_MAX              "\002 Max"
@@ -749,6 +764,7 @@
749 764
 	#define MSG_M105_INVALID_EXTRUDER "M105 Invalid extruder "
750 765
 	#define MSG_M200_INVALID_EXTRUDER "M200 Invalid extruder "
751 766
 	#define MSG_M218_INVALID_EXTRUDER "M218 Invalid extruder "
767
+	#define MSG_M221_INVALID_EXTRUDER "M221 Invalid extruder "
752 768
 	#define MSG_ERR_NO_THERMISTORS "No thermistors - no temp"
753 769
 	#define MSG_M109_INVALID_EXTRUDER "M109 Invalid extruder "
754 770
 	#define MSG_HEATING "Heating..."
@@ -839,6 +855,9 @@
839 855
 	#define MSG_BED "Base"
840 856
 	#define MSG_FAN_SPEED "Ventilador"
841 857
 	#define MSG_FLOW "Flujo"
858
+	#define MSG_FLOW0 "Flujo 0"
859
+	#define MSG_FLOW1 "Flujo 1"
860
+	#define MSG_FLOW2 "Flujo 2"
842 861
 	#define MSG_CONTROL "Control"
843 862
 	#define MSG_MIN "\002 Min"
844 863
 	#define MSG_MAX "\002 Max"
@@ -940,6 +959,7 @@
940 959
 	#define MSG_M105_INVALID_EXTRUDER "M105 Extrusor Invalido "
941 960
 	#define MSG_M200_INVALID_EXTRUDER "M200 Extrusor Invalido "
942 961
 	#define MSG_M218_INVALID_EXTRUDER "M218 Extrusor Invalido "
962
+	#define MSG_M221_INVALID_EXTRUDER "M221 Extrusor Invalido "
943 963
 	#define MSG_ERR_NO_THERMISTORS "No hay termistores - no temp"
944 964
 	#define MSG_M109_INVALID_EXTRUDER "M109 Extrusor Invalido "
945 965
 	#define MSG_HEATING "Calentando..."
@@ -1029,6 +1049,9 @@
1029 1049
 	#define MSG_BED								"\002 Кровать:"
1030 1050
 	#define MSG_FAN_SPEED						"Куллер:"
1031 1051
 	#define MSG_FLOW							"Поток:"
1052
+	#define MSG_FLOW0 " Поток0:"
1053
+	#define MSG_FLOW1 " Поток1:"
1054
+	#define MSG_FLOW2 " Поток2:"
1032 1055
 	#define MSG_CONTROL							"Настройки \003"
1033 1056
 	#define MSG_MIN								"\002 Минимум:"
1034 1057
 	#define MSG_MAX								"\002 Максимум:"
@@ -1122,6 +1145,7 @@
1122 1145
 	#define MSG_M105_INVALID_EXTRUDER			"M105 ошибка экструдера "
1123 1146
 	#define MSG_M200_INVALID_EXTRUDER			"M200 ошибка экструдера "
1124 1147
 	#define MSG_M218_INVALID_EXTRUDER			"M218 ошибка экструдера "
1148
+	#define MSG_M221_INVALID_EXTRUDER			"M221 ошибка экструдера "
1125 1149
 	#define MSG_ERR_NO_THERMISTORS				"Нет термистра - нет температуры"
1126 1150
 	#define MSG_M109_INVALID_EXTRUDER			"M109 ошибка экструдера "
1127 1151
 	#define MSG_HEATING							"Нагрев...  "
@@ -1210,6 +1234,9 @@
1210 1234
 	#define MSG_BED                  "Piatto"
1211 1235
 	#define MSG_FAN_SPEED            "Ventola"
1212 1236
 	#define MSG_FLOW                 "Flusso"
1237
+	#define MSG_FLOW0                "Flusso 0"
1238
+	#define MSG_FLOW1                "Flusso 1"
1239
+	#define MSG_FLOW2                "Flusso 2"
1213 1240
 	#define MSG_CONTROL              "Controllo"
1214 1241
 	#define MSG_MIN                  " \002 Min:"
1215 1242
 	#define MSG_MAX                  " \002 Max:"
@@ -1303,6 +1330,7 @@
1303 1330
 	#define MSG_M105_INVALID_EXTRUDER "M105 Estrusore non valido "
1304 1331
 	#define MSG_M200_INVALID_EXTRUDER "M200 Estrusore non valido "
1305 1332
 	#define MSG_M218_INVALID_EXTRUDER "M218 Estrusore non valido "
1333
+	#define MSG_M221_INVALID_EXTRUDER "M221 Estrusore non valido "
1306 1334
 	#define MSG_ERR_NO_THERMISTORS   "Nessun Termistore - nessuna temperatura"
1307 1335
 	#define MSG_M109_INVALID_EXTRUDER "M109 Estrusore non valido "
1308 1336
 	#define MSG_HEATING              "Riscaldamento..."
@@ -1395,6 +1423,9 @@
1395 1423
 	#define MSG_BED "\002Base:"
1396 1424
 	#define MSG_FAN_SPEED "Velocidade vento."
1397 1425
 	#define MSG_FLOW "Fluxo:"
1426
+	#define MSG_FLOW0 "Fluxo0:"
1427
+	#define MSG_FLOW1 "Fluxo1:"
1428
+	#define MSG_FLOW2 "Fluxo2:"
1398 1429
 	#define MSG_CONTROL "Controle \003"
1399 1430
 	#define MSG_MIN "\002 Min:"
1400 1431
 	#define MSG_MAX "\002 Max:"
@@ -1492,6 +1523,7 @@
1492 1523
 	#define MSG_M105_INVALID_EXTRUDER "M105 Extrusor inválido "
1493 1524
 	#define MSG_M200_INVALID_EXTRUDER "M200 Extrusor inválido "
1494 1525
 	#define MSG_M218_INVALID_EXTRUDER "M218 Extrusor inválido "
1526
+	#define MSG_M221_INVALID_EXTRUDER "M221 Extrusor inválido "
1495 1527
 	#define MSG_ERR_NO_THERMISTORS "Nao ha termistor - no temp"
1496 1528
 	#define MSG_M109_INVALID_EXTRUDER "M109 Extrusor inválido "
1497 1529
 	#define MSG_HEATING "Aquecendo..."
@@ -1583,6 +1615,9 @@
1583 1615
 	#define MSG_BED "Alusta"
1584 1616
 	#define MSG_FAN_SPEED "Tuul. nopeus"
1585 1617
 	#define MSG_FLOW "Virtaus"
1618
+	#define MSG_FLOW0 "Virtaus 0"
1619
+	#define MSG_FLOW1 "Virtaus 1"
1620
+	#define MSG_FLOW2 "Virtaus 2"
1586 1621
 	#define MSG_CONTROL "Kontrolli"
1587 1622
 	#define MSG_MIN " \002 Min"
1588 1623
 	#define MSG_MAX " \002 Max"
@@ -1675,6 +1710,7 @@
1675 1710
 	#define MSG_M105_INVALID_EXTRUDER "M105 Virheellinen suutin "
1676 1711
 	#define MSG_M200_INVALID_EXTRUDER "M200 Virheellinen suutin "
1677 1712
 	#define MSG_M218_INVALID_EXTRUDER "M218 Virheellinen suutin "
1713
+	#define MSG_M221_INVALID_EXTRUDER "M221 Virheellinen suutin "
1678 1714
 	#define MSG_ERR_NO_THERMISTORS "Ei termistoreja - ei lampotiloja"
1679 1715
 	#define MSG_M109_INVALID_EXTRUDER "M109 Virheellinen suutin "
1680 1716
 	#define MSG_HEATING "Lammitan..."
@@ -1766,6 +1802,9 @@
1766 1802
 	#define MSG_BED "Base"
1767 1803
 	#define MSG_FAN_SPEED "Ixoriador"
1768 1804
 	#define MSG_FLOW "Fluxo"
1805
+	#define MSG_FLOW0 "Fluxo 0"
1806
+	#define MSG_FLOW1 "Fluxo 1"
1807
+	#define MSG_FLOW2 "Fluxo 2"
1769 1808
 	#define MSG_CONTROL "Control"
1770 1809
 	#define MSG_MIN "\002 Min"
1771 1810
 	#define MSG_MAX "\002 Max"
@@ -1867,6 +1906,7 @@
1867 1906
 	#define MSG_M105_INVALID_EXTRUDER "M105 Extrusor Invalido "
1868 1907
 	#define MSG_M200_INVALID_EXTRUDER "M200 Extrusor Invalido "
1869 1908
 	#define MSG_M218_INVALID_EXTRUDER "M218 Extrusor Invalido "
1909
+	#define MSG_M221_INVALID_EXTRUDER "M221 Extrusor Invalido "
1870 1910
 	#define MSG_ERR_NO_THERMISTORS "No i hai termistores - no temp"
1871 1911
 	#define MSG_M109_INVALID_EXTRUDER "M109 Extrusor Invalido "
1872 1912
 	#define MSG_HEATING "Calentando..."

+ 7
- 0
Marlin/ultralcd.cpp Parādīt failu

@@ -414,6 +414,13 @@ static void lcd_tune_menu()
414 414
 #endif
415 415
     MENU_ITEM_EDIT(int3, MSG_FAN_SPEED, &fanSpeed, 0, 255);
416 416
     MENU_ITEM_EDIT(int3, MSG_FLOW, &extrudemultiply, 10, 999);
417
+    MENU_ITEM_EDIT(int3, MSG_FLOW0, &extruder_multiply[0], 10, 999);
418
+#if TEMP_SENSOR_1 != 0
419
+    MENU_ITEM_EDIT(int3, MSG_FLOW1, &extruder_multiply[1], 10, 999);
420
+#endif
421
+#if TEMP_SENSOR_2 != 0
422
+    MENU_ITEM_EDIT(int3, MSG_FLOW2, &extruder_multiply[2], 10, 999);
423
+#endif
417 424
 
418 425
 #ifdef BABYSTEPPING
419 426
     #ifdef BABYSTEP_XY

Notiek ielāde…
Atcelt
Saglabāt