HAL_Linux: try to stop PWMs before shutting down due to SIGTERM

This commit is contained in:
Willian Galvani 2021-09-08 13:24:45 -03:00 committed by Andrew Tridgell
parent 6cb4e6b31d
commit 38e8020e4b

View File

@ -419,6 +419,8 @@ void HAL_Linux::run(int argc, char* const argv[], Callbacks* callbacks) const
callbacks->loop();
}
// At least try to stop all PWM before shutting down
rcout->force_safety_on();
rcin->teardown();
I2CDeviceManager::from(i2c_mgr)->teardown();
SPIDeviceManager::from(spi)->teardown();