mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-21 04:33:10 +08:00
ModuleParams: add setParent() method
This commit is contained in:
@@ -48,6 +48,15 @@ class ModuleParams : public ListNode<ModuleParams *>
|
||||
public:
|
||||
|
||||
ModuleParams(ModuleParams *parent)
|
||||
{
|
||||
setParent(parent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the parent module. This is typically not required, only in cases where
|
||||
* the parent cannot be set via constructor.
|
||||
*/
|
||||
void setParent(ModuleParams *parent)
|
||||
{
|
||||
if (parent) {
|
||||
parent->_children.add(this);
|
||||
|
||||
Reference in New Issue
Block a user