Skip to content

Commit 8ab93be

Browse files
committed
Fixed issue #2: "peak-to-peak amplitude for relay is 2*oStep"
1 parent 0e304fb commit 8ab93be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

PID_AutoTune_v0/PID_AutoTune_v0.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ void PID_ATune::FinishUp()
126126
{
127127
*output = outputStart;
128128
//we can generate tuning parameters!
129-
Ku = 4*oStep/((absMax-absMin)*3.14159);
129+
Ku = 4*(2*oStep)/((absMax-absMin)*3.14159);
130130
Pu = (double)(peak1-peak2) / 1000;
131131
}
132132

0 commit comments

Comments
 (0)