Add HAS_TEMP_SENSOR conditional

2.0.x
Scott Lahteine 7 years ago
parent 94f5204629
commit ffbf63e6af

@ -519,7 +519,7 @@ void idle(
gcode.host_keepalive(); gcode.host_keepalive();
#endif #endif
#if ENABLED(AUTO_REPORT_TEMPERATURES) && (HAS_TEMP_HOTEND || HAS_TEMP_BED) #if ENABLED(AUTO_REPORT_TEMPERATURES) && HAS_TEMP_SENSOR
thermalManager.auto_report_temperatures(); thermalManager.auto_report_temperatures();
#endif #endif

@ -391,7 +391,7 @@ void GcodeSuite::process_parsed_command() {
KEEPALIVE_STATE(NOT_BUSY); KEEPALIVE_STATE(NOT_BUSY);
return; // "ok" already printed return; // "ok" already printed
#if ENABLED(AUTO_REPORT_TEMPERATURES) && (HAS_TEMP_HOTEND || HAS_TEMP_BED) #if ENABLED(AUTO_REPORT_TEMPERATURES) && HAS_TEMP_SENSOR
case 155: M155(); break; // M155: Set temperature auto-report interval case 155: M155(); break; // M155: Set temperature auto-report interval
#endif #endif

@ -547,7 +547,7 @@ private:
static void M150(); static void M150();
#endif #endif
#if ENABLED(AUTO_REPORT_TEMPERATURES) && (HAS_TEMP_HOTEND || HAS_TEMP_BED) #if ENABLED(AUTO_REPORT_TEMPERATURES) && HAS_TEMP_SENSOR
static void M155(); static void M155();
#endif #endif

@ -37,7 +37,7 @@ void GcodeSuite::M105() {
const int16_t port = command_queue_port[cmd_queue_index_r]; const int16_t port = command_queue_port[cmd_queue_index_r];
#endif #endif
#if HAS_TEMP_HOTEND || HAS_TEMP_BED #if HAS_TEMP_SENSOR
SERIAL_PROTOCOLPGM_P(port, MSG_OK); SERIAL_PROTOCOLPGM_P(port, MSG_OK);
thermalManager.print_heaterstates( thermalManager.print_heaterstates(
#if NUM_SERIAL > 1 #if NUM_SERIAL > 1

@ -22,7 +22,7 @@
#include "../../inc/MarlinConfig.h" #include "../../inc/MarlinConfig.h"
#if ENABLED(AUTO_REPORT_TEMPERATURES) && (HAS_TEMP_HOTEND || HAS_TEMP_BED) #if ENABLED(AUTO_REPORT_TEMPERATURES) && HAS_TEMP_SENSOR
#include "../gcode.h" #include "../gcode.h"
#include "../../module/temperature.h" #include "../../module/temperature.h"
@ -37,4 +37,4 @@ void GcodeSuite::M155() {
} }
#endif // AUTO_REPORT_TEMPERATURES && (HAS_TEMP_HOTEND || HAS_TEMP_BED) #endif // AUTO_REPORT_TEMPERATURES && HAS_TEMP_SENSOR

@ -754,6 +754,7 @@
#define HAS_TEMP_4 (PIN_EXISTS(TEMP_4) && TEMP_SENSOR_4 != 0 && TEMP_SENSOR_4 > -2) #define HAS_TEMP_4 (PIN_EXISTS(TEMP_4) && TEMP_SENSOR_4 != 0 && TEMP_SENSOR_4 > -2)
#define HAS_TEMP_HOTEND (HAS_TEMP_0 || ENABLED(HEATER_0_USES_MAX6675)) #define HAS_TEMP_HOTEND (HAS_TEMP_0 || ENABLED(HEATER_0_USES_MAX6675))
#define HAS_TEMP_BED (PIN_EXISTS(TEMP_BED) && TEMP_SENSOR_BED != 0 && TEMP_SENSOR_BED > -2) #define HAS_TEMP_BED (PIN_EXISTS(TEMP_BED) && TEMP_SENSOR_BED != 0 && TEMP_SENSOR_BED > -2)
#define HAS_TEMP_SENSOR (HAS_TEMP_HOTEND || HAS_TEMP_BED)
// Heaters // Heaters
#define HAS_HEATER_0 (PIN_EXISTS(HEATER_0)) #define HAS_HEATER_0 (PIN_EXISTS(HEATER_0))
@ -816,6 +817,10 @@
#define HAS_DIGIPOTSS (PIN_EXISTS(DIGIPOTSS)) #define HAS_DIGIPOTSS (PIN_EXISTS(DIGIPOTSS))
#define HAS_MOTOR_CURRENT_PWM (PIN_EXISTS(MOTOR_CURRENT_PWM_XY) || PIN_EXISTS(MOTOR_CURRENT_PWM_Z) || PIN_EXISTS(MOTOR_CURRENT_PWM_E)) #define HAS_MOTOR_CURRENT_PWM (PIN_EXISTS(MOTOR_CURRENT_PWM_XY) || PIN_EXISTS(MOTOR_CURRENT_PWM_Z) || PIN_EXISTS(MOTOR_CURRENT_PWM_E))
#if !HAS_TEMP_SENSOR
#undef AUTO_REPORT_TEMPERATURES
#endif
/** /**
* This setting is also used by M109 when trying to calculate * This setting is also used by M109 when trying to calculate
* a ballpark safe margin to prevent wait-forever situation. * a ballpark safe margin to prevent wait-forever situation.

@ -417,7 +417,7 @@ uint8_t Temperature::soft_pwm_amount[HOTENDS],
// Report heater states every 2 seconds // Report heater states every 2 seconds
if (ELAPSED(ms, next_temp_ms)) { if (ELAPSED(ms, next_temp_ms)) {
#if HAS_TEMP_HOTEND || HAS_TEMP_BED #if HAS_TEMP_SENSOR
print_heaterstates(); print_heaterstates();
SERIAL_EOL(); SERIAL_EOL();
#endif #endif
@ -2144,7 +2144,7 @@ void Temperature::isr() {
ENABLE_TEMPERATURE_INTERRUPT(); //re-enable Temperature ISR ENABLE_TEMPERATURE_INTERRUPT(); //re-enable Temperature ISR
} }
#if HAS_TEMP_HOTEND || HAS_TEMP_BED #if HAS_TEMP_SENSOR
#include "../gcode/gcode.h" #include "../gcode/gcode.h"
@ -2251,4 +2251,4 @@ void Temperature::isr() {
#endif // AUTO_REPORT_TEMPERATURES #endif // AUTO_REPORT_TEMPERATURES
#endif // HAS_TEMP_HOTEND || HAS_TEMP_BED #endif // HAS_TEMP_SENSOR

@ -564,7 +564,7 @@ class Temperature {
#endif // HEATER_IDLE_HANDLER #endif // HEATER_IDLE_HANDLER
#if HAS_TEMP_HOTEND || HAS_TEMP_BED #if HAS_TEMP_SENSOR
static void print_heaterstates( static void print_heaterstates(
#if NUM_SERIAL > 1 #if NUM_SERIAL > 1
const int8_t port = -1 const int8_t port = -1

Loading…
Cancel
Save