mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-27 22:08:02 +00:00
Shift m before compare to 0
This commit is contained in:
parent
9f69fbe5ee
commit
48d1bd29cb
@ -1191,9 +1191,8 @@ void Temperature::manage_heater() {
|
||||
#define SCAN_THERMISTOR_TABLE(TBL,LEN) do{ \
|
||||
uint8_t l = 0, r = LEN, m; \
|
||||
for (;;) { \
|
||||
m = l + r; \
|
||||
m = (l + r) >> 1; \
|
||||
if (!m) return short(pgm_read_word(&TBL[0][1])); \
|
||||
m >>= 1; \
|
||||
if (m == l || m == r) return short(pgm_read_word(&TBL[LEN-1][1])); \
|
||||
short v00 = pgm_read_word(&TBL[m-1][0]), \
|
||||
v10 = pgm_read_word(&TBL[m-0][0]); \
|
||||
|
Loading…
Reference in New Issue
Block a user