heater.c: fix on/off when BANG_BANG is used.
This commit is contained in:
parent
8d91312991
commit
f455f6f709
2
heater.c
2
heater.c
|
|
@ -429,7 +429,7 @@ void heater_set(heater_t index, uint8_t value) {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (value >= 8)
|
if (value >= ((BANG_BANG_ON + BANG_BANG_OFF) / 2))
|
||||||
*(heaters[index].heater_port) |= MASK(heaters[index].heater_pin);
|
*(heaters[index].heater_port) |= MASK(heaters[index].heater_pin);
|
||||||
else
|
else
|
||||||
*(heaters[index].heater_port) &= ~MASK(heaters[index].heater_pin);
|
*(heaters[index].heater_port) &= ~MASK(heaters[index].heater_pin);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue