actual version libs withiout pip
git-svn-id: svn://db.shs.com.ru/libs@2 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -147,7 +147,7 @@ class BrickMathQuantize: public BrickMathBase {
|
||||
BrickMathQuantize(double step = 1.): BrickMathBase(2, 1) {setStep(step); type = "Quantize"; setName(type); inNames[1] = "Step";}
|
||||
enum Inputs {Input, Step};
|
||||
void setStep(double step) {inputs[Step] = step;}
|
||||
virtual bool tick_body(double time) {outputs[0] = round(inputs[Input] / inputs[Step]) * inputs[Step]; return true;}
|
||||
virtual bool tick_body(double time) {outputs[0] = piRound(inputs[Input] / inputs[Step]) * inputs[Step]; return true;}
|
||||
};
|
||||
ADD_NEW_TO_COLLECTION(Mathematic, BrickMathQuantize)
|
||||
|
||||
@@ -172,7 +172,7 @@ class BrickMathDelayTicks: public BrickMathBase {
|
||||
void setDelay(int ticks) {parameters[0].setValue(ticks); v.resize(ticks); v.assign(ticks, 0.);}
|
||||
virtual bool tick_body(double time);
|
||||
private:
|
||||
deque<double> v;
|
||||
PIDeque<double> v;
|
||||
};
|
||||
ADD_NEW_TO_COLLECTION(Mathematic, BrickMathDelayTicks)
|
||||
|
||||
@@ -184,7 +184,7 @@ class BrickMathDelaySeconds: public BrickMathBase {
|
||||
void setDelay(double secs) {parameters[0].setValue(secs);}
|
||||
virtual bool tick_body(double time);
|
||||
private:
|
||||
deque<double> v;
|
||||
PIDeque<double> v;
|
||||
uint t;
|
||||
};
|
||||
ADD_NEW_TO_COLLECTION(Mathematic, BrickMathDelaySeconds)
|
||||
|
||||
Reference in New Issue
Block a user