PID poll in batch ??

Discussion about software developed by Freematics, including Freematics Builder and Freematics Emulator GUI
Post Reply
TheMonkey
Posts: 3
Joined: Sat Dec 15, 2018 9:35 pm

PID poll in batch ??

Post by TheMonkey »

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;
aboaboit
Posts: 23
Joined: Mon Mar 26, 2018 4:55 am

Re: PID poll in batch ??

Post by aboaboit »

Good thing I increased the minimum cycle time in datalogger from the default 100ms to 250ms.
I'm going to try to raise it further.
Post Reply