Commit af34bb7f authored by Alexander Ryndin's avatar Alexander Ryndin
Browse files

fixed exception during generation (math assignment issue)

parent db0053cd
......@@ -10,7 +10,7 @@ component PID {
out Q control;
implementation Math {
static B isPrevErrorSpecified = false;
static B isPrevErrorSpecified = 0;
static Q prevError = 0.0;
static Q acc = 0.0;
acc = paramDecayCoefficient * acc + error;
......@@ -20,6 +20,6 @@ component PID {
end
control = paramP * error + paramI * acc + paramD * drv;
prevError = error;
isPrevErrorSpecified = true;
isPrevErrorSpecified = 0;
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment