summaryrefslogtreecommitdiff
path: root/rotord/src/rotor.h
diff options
context:
space:
mode:
Diffstat (limited to 'rotord/src/rotor.h')
-rwxr-xr-xrotord/src/rotor.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/rotord/src/rotor.h b/rotord/src/rotor.h
index 937a884..1f345d1 100755
--- a/rotord/src/rotor.h
+++ b/rotord/src/rotor.h
@@ -123,6 +123,9 @@ namespace Rotor {
class Parameter: public Signal_input{
public:
virtual ~Parameter(){};
+ void init(const float &_val){
+ value=_val;
+ }
Parameter(const string &_type,const string &_desc,const string &_title,float _value,float _min,float _max,Node* _connect): Signal_input(_desc,_title,_connect),value(_value),min(_min),max(_max),type(_type){};
float value,min,max;
float get(const Time_spec& time);
@@ -182,6 +185,11 @@ namespace Rotor {
attributes[a.first]->init(find_setting(settings,a.first,""));
}
}
+ for (auto p: parameters){
+ if (find_setting(settings,p.first,"")!="") {
+ parameters[p.first]->init(find_setting(settings,p.first,0));
+ }
+ }
}
void update(const Time_spec &time){
for (auto p: parameters){