mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 10:03:34 +08:00
param: refactor BlockParam classes
- make the selected parameter a template argument. This enables type-checking at compile-time. - move things to src/platforms. This provides consistent includes with ModuleBase - add ModuleParams base class (replaces Block & SuperBlock) - drop the Block* prefix from the class names
This commit is contained in:
@@ -96,6 +96,8 @@ void Block::updateParams()
|
||||
param->update();
|
||||
param = param->getSibling();
|
||||
}
|
||||
|
||||
updateParamsSubclass();
|
||||
}
|
||||
|
||||
void Block::updateSubscriptions()
|
||||
|
||||
@@ -84,6 +84,8 @@ public:
|
||||
|
||||
protected:
|
||||
|
||||
virtual void updateParamsSubclass() {}
|
||||
|
||||
SuperBlock *getParent() { return _parent; }
|
||||
List<uORB::SubscriptionNode *> &getSubscriptions() { return _subscriptions; }
|
||||
List<uORB::PublicationNode *> &getPublications() { return _publications; }
|
||||
|
||||
Reference in New Issue
Block a user