stanleyhuangyc / Freematics

Official source code repository for Freematics
https://freematics.com
428 stars 347 forks source link

PID_FUEL_RAIL_PRESSURE formula incorrect #12

Open hayden-t opened 9 years ago

hayden-t commented 9 years ago

in obd.cpp should be:

    case PID_FUEL_RAIL_PRESSURE: // kPa
        result = (int32_t)getLargeValue(data) * 10; 

(and will need shuffling down to not interfere with the pid's that still need result = getLargeValue(data);)

problem though is that rail pressure in kpa is higher than int (16bit) and the COBD::normalizeData function will need adapting to return a 32bit int instead too.