16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 01:59:19 +02:00

PoKeys: dodanie wartości maksymalnych dla wyjść PWM (mierniki) w celu łatwego kalibrowania. Słowo kluczowe "calibrateoutmaxvalues" z wartościami dla każdego z 7 wyjść. Wartość 0 oznacza brak odniesienia i starą metodę.

This commit is contained in:
firleju
2016-03-21 20:06:16 +01:00
parent cc203c2e35
commit 04e6fdfb60
3 changed files with 15 additions and 1 deletions

View File

@@ -288,6 +288,9 @@ void Console::ValueSet(int x, double y)
if (iMode == 4)
if (PoKeys55[0])
{
if (Global::fCalibrateOutMax[x] > 0)
x = x / Global::fCalibrateOutMax[x]; // sprowadzenie do <0,1> jeśli podana maksymalna wartość
PoKeys55[0]->PWM(
x, (((((Global::fCalibrateOut[x][5] * y) + Global::fCalibrateOut[x][4]) * y +
Global::fCalibrateOut[x][3]) * y + Global::fCalibrateOut[x][2]) * y +