PID poll in batch ??
Posted: Tue Jan 08, 2019 8:40 am
PID polls are requiring 125ms +/- 5ms each poll and really making for a clunky routine when fetching one after another. ISO 9141 on 1998 Toyota.
Can anything be done to fetch multiple variables in one poll?
stampTime = millis();
obd.readPID(PID_THROTTLE, throttle);
throttleTime = millis() - stampTime;
stampTime = millis();
obd.readPID(PID_RPM, rpm);
rpmTime = millis() - stampTime;
stampTime = millis();
obd.readPID(PID_COOLANT_TEMP, coolant);
coolantTime = millis() - stampTime;
stampTime = millis();
obd.readPID(PID_SPEED, speed);
speedTime = millis() - stampTime;
Can anything be done to fetch multiple variables in one poll?
stampTime = millis();
obd.readPID(PID_THROTTLE, throttle);
throttleTime = millis() - stampTime;
stampTime = millis();
obd.readPID(PID_RPM, rpm);
rpmTime = millis() - stampTime;
stampTime = millis();
obd.readPID(PID_COOLANT_TEMP, coolant);
coolantTime = millis() - stampTime;
stampTime = millis();
obd.readPID(PID_SPEED, speed);
speedTime = millis() - stampTime;