|
@@ -28,6 +28,13 @@
|
28
|
28
|
#include "../../module/motion.h"
|
29
|
29
|
#include "../../module/temperature.h"
|
30
|
30
|
|
|
31
|
+#if ENABLED(SINGLENOZZLE)
|
|
32
|
+ #define _ALT_P active_extruder
|
|
33
|
+ #define _CNT_P EXTRUDERS
|
|
34
|
+#else
|
|
35
|
+ #define _ALT_P MIN(active_extruder, FAN_COUNT - 1)
|
|
36
|
+ #define _CNT_P MIN(EXTRUDERS, FAN_COUNT)
|
|
37
|
+#endif
|
31
|
38
|
|
32
|
39
|
/**
|
33
|
40
|
* M106: Set Fan Speed
|
|
@@ -43,9 +50,9 @@
|
43
|
50
|
* 3-255 = Set the speed for use with T2
|
44
|
51
|
*/
|
45
|
52
|
void GcodeSuite::M106() {
|
46
|
|
- const uint8_t p = parser.byteval('P', MIN(active_extruder, FAN_COUNT - 1));
|
|
53
|
+ const uint8_t p = parser.byteval('P', _ALT_P);
|
47
|
54
|
|
48
|
|
- if (p < MIN(EXTRUDERS, FAN_COUNT)) {
|
|
55
|
+ if (p < _CNT_P) {
|
49
|
56
|
|
50
|
57
|
#if ENABLED(EXTRA_FAN_SPEED)
|
51
|
58
|
const uint16_t t = parser.intval('T');
|
|
@@ -63,7 +70,7 @@ void GcodeSuite::M106() {
|
63
|
70
|
* M107: Fan Off
|
64
|
71
|
*/
|
65
|
72
|
void GcodeSuite::M107() {
|
66
|
|
- const uint8_t p = parser.byteval('P', MIN(active_extruder, FAN_COUNT - 1));
|
|
73
|
+ const uint8_t p = parser.byteval('P', _ALT_P);
|
67
|
74
|
thermalManager.set_fan_speed(p, 0);
|
68
|
75
|
}
|
69
|
76
|
|