mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-01 04:54:07 +08:00
Control lib: Add option to store parameters
This commit is contained in:
parent
1f66c26a62
commit
597bfc340a
@ -97,6 +97,11 @@ void BlockParam<T>::update() {
|
||||
if (_handle != PARAM_INVALID) param_get(_handle, &_val);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void BlockParam<T>::commit() {
|
||||
if (_handle != PARAM_INVALID) param_set(_handle, &_val);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
BlockParam<T>::~BlockParam() {};
|
||||
|
||||
|
||||
@ -79,6 +79,7 @@ public:
|
||||
BlockParam(Block *block, const char *name,
|
||||
bool parent_prefix = true);
|
||||
T get();
|
||||
void commit();
|
||||
void set(T val);
|
||||
void update();
|
||||
virtual ~BlockParam();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user