mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
PoKeys: dodanie opcji wystawienia do log-a poszczególnych kroków obliczania wartości dla zdefiniowanego wyjścia calibrateout.
This commit is contained in:
@@ -294,15 +294,23 @@ void Console::ValueSet(int x, double y)
|
||||
} // nbmx: wal kulakowy
|
||||
else
|
||||
{
|
||||
if (Global::iCalibrateOutDebugInfo == x)
|
||||
WriteLog("CalibrateOutDebugInfo: oryginal=" + AnsiString(y), false);
|
||||
if (Global::fCalibrateOutMax[x] > 0)
|
||||
{
|
||||
y = Global::CutValueToRange(0, y, Global::fCalibrateOutMax[x]);
|
||||
if (Global::iCalibrateOutDebugInfo == x)
|
||||
WriteLog(" cutted=" + AnsiString(y),false);
|
||||
y = y / Global::fCalibrateOutMax[x]; // sprowadzenie do <0,1> jeśli podana maksymalna wartość
|
||||
if (Global::iCalibrateOutDebugInfo == x)
|
||||
WriteLog(" fraction=" + AnsiString(y),false);
|
||||
}
|
||||
double temp = (((((Global::fCalibrateOut[x][5] * y) + Global::fCalibrateOut[x][4]) * y +
|
||||
Global::fCalibrateOut[x][3]) * y + Global::fCalibrateOut[x][2]) * y +
|
||||
Global::fCalibrateOut[x][1]) * y +
|
||||
Global::fCalibrateOut[x][0]; // zakres <0;1>
|
||||
if (Global::iCalibrateOutDebugInfo == x)
|
||||
WriteLog(" calibrated=" + AnsiString(temp));
|
||||
PoKeys55[0]->PWM(x, temp);
|
||||
if (x == 6)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user