diff --git a/src/platforms/px4_module_params.h b/src/platforms/px4_module_params.h index 724b5d6826..4ac5fd2a58 100644 --- a/src/platforms/px4_module_params.h +++ b/src/platforms/px4_module_params.h @@ -48,6 +48,15 @@ class ModuleParams : public ListNode 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);