mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-29 11:40:28 +08:00
fix(uavcan): block firmware update while armed and arming while updating (#28089)
* feat: track Node updates * feat: prevent arming while updating * fix: used make format * fix: added dedup logic & use dynamic list * fix: cleaned up arming_blocker * feat: add circuit breaker for arming_blocker * chore: used make format * fix: fix some formating issues * chore: make format again * fix: implemented requested changes
This commit is contained in:
11 files changed
+136
-1
No files matched your search
@@ -144,6 +144,16 @@ public:
|
||||
|
||||
bool empty() const { return getHead() == nullptr; }
|
||||
|
||||
template<typename Predicate>
|
||||
T find(Predicate pred) const
|
||||
{
|
||||
for (auto n = getHead(); n != nullptr; n = n->getSibling()) {
|
||||
if (pred(n)) { return n; }
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
size_t size() const
|
||||
{
|
||||
size_t sz = 0;
|
||||
|
||||
Reference in new issue
Block a user