Skip to content

Incorrect results when calling pid.calculatedResults #18

@Superredstone

Description

@Superredstone

My output:

410C189F 2 ((A*256)+B)/4
07:13:43.740  D  Engine RPM : 0.0
07:13:43.741  D  0.0 rpm

My code:

        for (i in 0..1000) {
            val pid = checkNotNull(PIDUtils.getPid(ObdModes.MODE_01, "0C"))
            val command = OBDCommand(pid).setIgnoreResult(false).run(streams.inputStream, streams.outputStream)

            Log.d(LOG_TAG, "${command.formattedResult} ${command.rawResult} ${pid.bytes} ${pid.formula}" )
            Log.d(LOG_TAG, "${pid.description} : ${pid.calculatedResult}")
            Log.d(LOG_TAG, command.formattedResult)
        }

For some reason i get correct bytes back to my phone but when i try to access those with pid.calculatedResults or command.formattedResult i always get 0.0.
This does not only apply for engine RPM, i also tested this on speed and fuel type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions