6 changed files with 51 additions and 0 deletions
@ -0,0 +1,13 @@ |
|||||||
|
#include "UserParameters.h" |
||||||
|
|
||||||
|
// "USR" + 13 chars remaining for param name
|
||||||
|
const AP_Param::GroupInfo UserParameters::var_info[] = { |
||||||
|
|
||||||
|
// Put your parameters definition here
|
||||||
|
// Note the maximum length of parameter name is 13 chars
|
||||||
|
AP_GROUPINFO("_INT8", 0, UserParameters, _int8, 0), |
||||||
|
AP_GROUPINFO("_INT16", 1, UserParameters, _int16, 0), |
||||||
|
AP_GROUPINFO("_FLOAT", 2, UserParameters, _float, 0), |
||||||
|
|
||||||
|
AP_GROUPEND |
||||||
|
}; |
@ -0,0 +1,22 @@ |
|||||||
|
#pragma once |
||||||
|
|
||||||
|
#include <AP_Param/AP_Param.h> |
||||||
|
|
||||||
|
class UserParameters { |
||||||
|
|
||||||
|
public: |
||||||
|
UserParameters() {} |
||||||
|
static const struct AP_Param::GroupInfo var_info[]; |
||||||
|
|
||||||
|
// Put accessors to your parameter variables here
|
||||||
|
// UserCode usage example: g2.user_parameters.get_int8Param()
|
||||||
|
AP_Int8 get_int8Param() const { return _int8; } |
||||||
|
AP_Int16 get_int16Param() const { return _int16; } |
||||||
|
AP_Float get_floatParam() const { return _float; } |
||||||
|
|
||||||
|
private: |
||||||
|
// Put your parameter variable definitions here
|
||||||
|
AP_Int8 _int8; |
||||||
|
AP_Int16 _int16; |
||||||
|
AP_Float _float; |
||||||
|
}; |
Loading…
Reference in new issue