Skip to content

Commit

Permalink
HAL_Linux: try to stop PWMs before shutting down due to SIGTERM
Browse files Browse the repository at this point in the history
  • Loading branch information
Williangalvani authored and tridge committed Sep 14, 2021
1 parent 6cb4e6b commit 38e8020
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libraries/AP_HAL_Linux/HAL_Linux_Class.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 38e8020

Please sign in to comment.