fix HAS_MULTIP_6675 null condition & compiler warning
In temperature.h if HAS_MULTI_6675 does not have a 1 after it. HAS_MULTI_6675 is defined as NUL In temperature.cpp when Thermocouple is open the max6675_temp value is meant to have a TMAX * 4 so I added the pair of parentheses so the compiler would stop throwing a waring message about the statement being a binary statement.
This commit is contained in:
parent
e71c2b78c4
commit
72d680b915
2 changed files with 2 additions and 2 deletions
|
|
@ -2328,7 +2328,7 @@ void Temperature::disable_all_heaters() {
|
|||
#endif
|
||||
|
||||
// Thermocouple open
|
||||
max6675_temp = 4 * MAX6675_SEL(HEATER_0_MAX6675_TMAX, HEATER_1_MAX6675_TMAX);
|
||||
max6675_temp = 4 * (MAX6675_SEL(HEATER_0_MAX6675_TMAX, HEATER_1_MAX6675_TMAX));
|
||||
}
|
||||
else
|
||||
max6675_temp >>= MAX6675_DISCARD_BITS;
|
||||
|
|
|
|||
|
|
@ -811,7 +811,7 @@ class Temperature {
|
|||
#if HAS_MAX6675
|
||||
#define COUNT_6675 1 + BOTH(HEATER_0_USES_MAX6675, HEATER_1_USES_MAX6675)
|
||||
#if COUNT_6675 > 1
|
||||
#define HAS_MULTI_6675
|
||||
#define HAS_MULTI_6675 1
|
||||
#define READ_MAX6675(N) read_max6675(N)
|
||||
#else
|
||||
#define READ_MAX6675(N) read_max6675()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue