🎨 Define HAS_PREHEAT conditional

This commit is contained in:
Scott Lahteine
2021-10-27 21:15:58 -05:00
committed by Scott Lahteine
parent 1fd4258423
commit 84f9490149
55 changed files with 183 additions and 182 deletions

View File

@ -88,7 +88,7 @@ void GcodeSuite::M104_M109(const bool isM109) {
celsius_t temp = 0;
// Accept 'I' if temperature presets are defined
#if PREHEAT_COUNT
#if HAS_PREHEAT
got_temp = parser.seenval('I');
if (got_temp) {
const uint8_t index = parser.value_byte();

View File

@ -32,7 +32,7 @@
#include "../../module/planner.h"
#endif
#if PREHEAT_COUNT
#if HAS_PREHEAT
#include "../../lcd/marlinui.h"
#endif
@ -75,7 +75,7 @@ void GcodeSuite::M106() {
uint16_t speed = dspeed;
// Accept 'I' if temperature presets are defined
#if PREHEAT_COUNT
#if HAS_PREHEAT
const bool got_preset = parser.seenval('I');
if (got_preset) speed = ui.material_preset[_MIN(parser.value_byte(), PREHEAT_COUNT - 1)].fan_speed;
#else

View File

@ -63,7 +63,7 @@ void GcodeSuite::M140_M190(const bool isM190) {
celsius_t temp = 0;
// Accept 'I' if temperature presets are defined
#if PREHEAT_COUNT
#if HAS_PREHEAT
got_temp = parser.seenval('I');
if (got_temp) {
const uint8_t index = parser.value_byte();