Clean up and use simplified conditionals
This commit is contained in:
parent
2a0300097d
commit
c47ca8db10
2 changed files with 6 additions and 7 deletions
|
|
@ -1814,11 +1814,10 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal
|
||||||
#error "TEMP_SENSOR_1 is required with TEMP_SENSOR_1_AS_REDUNDANT."
|
#error "TEMP_SENSOR_1 is required with TEMP_SENSOR_1_AS_REDUNDANT."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if MAX6675_IS_MAX31865 && (!defined(MAX31865_SENSOR_OHMS_0) || !defined(MAX31865_CALIBRATION_OHMS_0))
|
#if MAX6675_IS_MAX31865 && !(defined(MAX31865_SENSOR_OHMS_0) && defined(MAX31865_CALIBRATION_OHMS_0))
|
||||||
#error "MAX31865_SENSOR_OHMS_0 and MAX31865_CALIBRATION_OHMS_0 must be set in Configuration.h when using a MAX31865 temperature sensor on TEMP_SENSOR_0."
|
#error "MAX31865_SENSOR_OHMS_0 and MAX31865_CALIBRATION_OHMS_0 must be set in Configuration.h when using a MAX31865 temperature sensor on TEMP_SENSOR_0."
|
||||||
#endif
|
#endif
|
||||||
|
#if MAX6675_IS_MAX31865 && !(defined(MAX31865_SENSOR_OHMS_1) && defined(MAX31865_CALIBRATION_OHMS_1)) && TEMP_SENSOR_1 == -5
|
||||||
#if MAX6675_IS_MAX31865 && (!defined(MAX31865_SENSOR_OHMS_1) || !defined(MAX31865_CALIBRATION_OHMS_1)) && TEMP_SENSOR_1 == -5
|
|
||||||
#error "MAX31865_SENSOR_OHMS_1 and MAX31865_CALIBRATION_OHMS_1 must be set in Configuration.h when using a MAX31865 temperature sensor on TEMP_SENSOR_1."
|
#error "MAX31865_SENSOR_OHMS_1 and MAX31865_CALIBRATION_OHMS_1 must be set in Configuration.h when using a MAX31865 temperature sensor on TEMP_SENSOR_1."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2247,7 +2247,7 @@ void Temperature::disable_all_heaters() {
|
||||||
#define MAX6675_ERROR_MASK 7
|
#define MAX6675_ERROR_MASK 7
|
||||||
#define MAX6675_DISCARD_BITS 18
|
#define MAX6675_DISCARD_BITS 18
|
||||||
#define MAX6675_SPEED_BITS 3 // (_BV(SPR1)) // clock ÷ 64
|
#define MAX6675_SPEED_BITS 3 // (_BV(SPR1)) // clock ÷ 64
|
||||||
#elif ENABLED(MAX6675_IS_MAX31865)
|
#elif MAX6675_IS_MAX31865
|
||||||
static uint16_t max6675_temp = 2000; //from datasheet 16 bits D15-D0
|
static uint16_t max6675_temp = 2000; //from datasheet 16 bits D15-D0
|
||||||
#define MAX6675_ERROR_MASK 1 //D0 Bit not used
|
#define MAX6675_ERROR_MASK 1 //D0 Bit not used
|
||||||
#define MAX6675_DISCARD_BITS 1 //data is in D15-D1
|
#define MAX6675_DISCARD_BITS 1 //data is in D15-D1
|
||||||
|
|
@ -2325,9 +2325,9 @@ void Temperature::disable_all_heaters() {
|
||||||
WRITE_MAX6675(HIGH); // disable TT_MAX6675
|
WRITE_MAX6675(HIGH); // disable TT_MAX6675
|
||||||
|
|
||||||
uint8_t fault = 1;
|
uint8_t fault = 1;
|
||||||
#if (COUNT_6675 == 1 && ENABLED(MAX6675_IS_MAX31865))
|
#if COUNT_6675 == 1 && MAX6675_IS_MAX31865
|
||||||
fault = max31865_0.readFault();
|
fault = max31865_0.readFault();
|
||||||
#elif ENABLED(MAX6675_IS_MAX31865)
|
#elif MAX6675_IS_MAX31865
|
||||||
#if hindex == 0
|
#if hindex == 0
|
||||||
fault = max31865_0.readFault();
|
fault = max31865_0.readFault();
|
||||||
#elif hindex == 1
|
#elif hindex == 1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue