HAL_ChibiOS: allow setting of armed pin

This commit is contained in:
Andrew Tridgell 2021-10-25 08:09:18 +11:00
parent c77dfae9a4
commit 7f2bcf927c
2 changed files with 13 additions and 0 deletions

View File

@ -719,3 +719,13 @@ void Util::last_crash_dump(ExpandingString &str) const
#endif
}
#endif
// set armed state
void Util::set_soft_armed(const bool b)
{
AP_HAL::Util::set_soft_armed(b);
#ifdef HAL_GPIO_PIN_nARMED
palWriteLine(HAL_GPIO_PIN_nARMED, !b);
#endif
}

View File

@ -96,6 +96,9 @@ public:
// returns true random values
bool get_true_random_vals(uint8_t* data, size_t size, uint32_t timeout_us) override;
// set armed state
void set_soft_armed(const bool b) override;
private:
#ifdef HAL_PWM_ALARM
struct ToneAlarmPwmGroup {