Enable WUE

This commit is contained in:
Josh Stewart 2015-01-19 09:10:01 +11:00
parent 05bb6483c8
commit 3c934962aa
3 changed files with 19 additions and 2 deletions

View File

@ -88,6 +88,13 @@ void command()
Serial.print(", ");
Serial.println(o2CalibrationTable[x]);
}
Serial.println("WUE");
for(int x=0; x<10; x++)
{
Serial.print(configPage2.wueBins[x]);
Serial.print(", ");
Serial.println(configPage1.wueValues[x]);
}
Serial.flush();
break;

View File

@ -3,7 +3,7 @@
byte correctionsTotal()
{
int sumCorrections = 100;
//sumCorrections = div((sumCorrections * correctionWUE()), 100).quot;
sumCorrections = div((sumCorrections * correctionWUE()), 100).quot;
sumCorrections = div((sumCorrections * correctionASE()), 100).quot;
//sumCorrections = div((sumCorrections * correctionAccel()), 100).quot;
sumCorrections = div((sumCorrections * correctionFloodClear()), 100).quot;
@ -13,7 +13,7 @@ byte correctionsTotal()
byte correctionWUE()
{
//Possibly reduce the frequency this runs at (Costs about 50 loops per second)
return 100 + table2D_getValue(WUETable, currentStatus.coolant);
return table2D_getValue(WUETable, currentStatus.coolant + CALIBRATION_TEMPERATURE_OFFSET);
}
byte correctionASE()

View File

@ -93,6 +93,16 @@ void setup()
WUETable.xSize = 10;
WUETable.values = configPage1.wueValues;
WUETable.axisX = configPage2.wueBins;
WUETable.axisX[0] = 0;
WUETable.axisX[1] = 11;
WUETable.axisX[2] = 22;
WUETable.axisX[3] = 33;
WUETable.axisX[4] = 44;
WUETable.axisX[5] = 56;
WUETable.axisX[6] = 67;
WUETable.axisX[7] = 78;
WUETable.axisX[8] = 94;
WUETable.axisX[9] = 111;
//Setup the calibration tables
loadCalibration();