heater.c: fix on/off when BANG_BANG is used.

This commit is contained in:
Markus Hitter 2012-10-12 02:38:22 +02:00
parent 8d91312991
commit f455f6f709
1 changed files with 1 additions and 1 deletions

View File

@ -429,7 +429,7 @@ void heater_set(heater_t index, uint8_t value) {
#endif
}
else {
if (value >= 8)
if (value >= ((BANG_BANG_ON + BANG_BANG_OFF) / 2))
*(heaters[index].heater_port) |= MASK(heaters[index].heater_pin);
else
*(heaters[index].heater_port) &= ~MASK(heaters[index].heater_pin);