You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <AP_Param/AP_Param.h>
|
|
|
|
|
|
|
|
/// Fast param access via pointer helper
|
|
|
|
class Parameter
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
// init to param by name
|
|
|
|
bool init(const char *name);
|
|
|
|
|
|
|
|
// init by token, to get the value of old params
|
|
|
|
bool init_by_info(uint16_t key, uint32_t group_element, enum ap_var_type type);
|
|
|
|
|
|
|
|
// setters and getters
|
|
|
|
bool set(float value);
|
|
|
|
bool set_and_save(float value);
|
|
|
|
bool get(float &value);
|
|
|
|
bool configured();
|
|
|
|
bool set_default(float value);
|
|
|
|
|
|
|
|
private:
|
|
|
|
enum ap_var_type vtype;
|
|
|
|
AP_Param *vp;
|
|
|
|
};
|
|
|
|
|