AP_BoardConfig: make sure heater is left off if disabled

This commit is contained in:
Iampete1 2021-08-16 00:34:23 +01:00 committed by Andrew Tridgell
parent b1028035bc
commit 970d0ea2a3

View File

@ -35,7 +35,10 @@ void AP_BoardConfig::set_imu_temp(float current)
hal.util->set_imu_temp(current);
if (target == -1) {
// nothing to do
// nothing to do, make sure heater is left off
#if defined(HAL_HEATER_GPIO_PIN)
hal.gpio->write(HAL_HEATER_GPIO_PIN, false);
#endif
return;
}