Revert using fastMap on the analog input for now

This commit is contained in:
Josh Stewart 2013-12-29 13:03:55 +11:00
parent 03cbef0837
commit 789395e874
2 changed files with 8 additions and 7 deletions

View File

@ -95,7 +95,7 @@ void sendValues(int length)
response[11] = 0x00; //Air Correction (%)
response[12] = 0x00; //Warmup enrichment (%)
response[13] = (currentStatus.RPM / 100); //rpm / 100
response[14] = currentStatus.PW / 100; //Pulsewidth 1 divided by 10 (in ms)
response[14] = (currentStatus.PW / 100); //Pulsewidth 1 divided by 10 (in ms)
response[15] = 0x00; //acceleration enrichment (ms)
response[16] = 0x00; //Barometer correction (%)
response[17] = 0x00; //Total GammaE (%)

View File

@ -194,16 +194,17 @@ void loop()
currentStatus.hasSync = false;
}
//***SET STATUSES***
//-----------------------------------------------------------------------------------------------------
currentStatus.MAP = map(analogRead(pinMAP), 0, 1023, 0, 100); //Get the current MAP value
//currentStatus.TPS = map(analogRead(pinTPS), 0, 1023, 255, 0); //Get the current TPS value
currentStatus.TPS = map(analogRead(pinTPS), 0, 1023, 100, 0); //Get the current TPS value
currentStatus.O2 = map(analogRead(pinO2), 0, 1023, 117, 358); //Get the current O2 value. Calibration is from AFR values 7.35 to 22.4, then multiplied by 16 (<< 4). This is the correct calibration for an Innovate Wideband 0v - 5V unit
//Always check for sync
//Main loop runs within this clause
if (currentStatus.hasSync)
{
//***SET STATUSES***
//-----------------------------------------------------------------------------------------------------
currentStatus.MAP = fastMap(analogRead(pinMAP), 0, 1023, 0, 100); //Get the current MAP value
currentStatus.TPS = fastMap(analogRead(pinTPS), 0, 1023, 0, 100); //Get the current TPS value
currentStatus.O2 = fastMap(analogRead(pinO2), 0, 1023, 117, 358); //Get the current O2 value. Calibration is from AFR values 7.35 to 22.4, then multiplied by 16 (<< 4). This is the correct calibration for an Innovate Wideband 0v - 5V unit
if(currentStatus.RPM > 0) //Check if the engine is turning at all
{
//If it is, check is we're running or cranking