Commit 150b2533 authored by David Košenina's avatar David Košenina

speed up callibration

parent 382e052e
......@@ -22,7 +22,7 @@
"invertCh1": 0,
"framesPerCapture": 2,
"maxIterations": 64,
"exitPercentage": 0.024414,
"exitPercentage": 0.1,
"offsetMax": 200,
"offsetMin": -200,
"generatorReference": 0,
......
......@@ -2927,7 +2927,7 @@ void OsciloscopeManager::onCallibrateFrameCaptured(OsciloscopeFrame& frame, int
int gain = callibrate.gainSetPrevius;
callibrate.gainSetPrevius = callibrate.gainSet;
int delta = abs(gain - callibrate.gainSet) / 2;
delta = max(1, delta);
delta = max(1, (int)abs(callibrate.percentage - 100));
if(callibrate.percentage > 100.f)
{
callibrate.gainSet -= delta;
......@@ -2942,6 +2942,9 @@ void OsciloscopeManager::onCallibrateFrameCaptured(OsciloscopeFrame& frame, int
callibrate.debug << " percentage: ";
callibrate.debug << callibrate.percentage;
callibrate.debug << "\n";
callibrate.debug << " iteration: ";
callibrate.debug << callibrate.iteration;
callibrate.debug << "\n";
}
break;
case acGainVoltageChange:
......
Markdown is supported
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