Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Case "1D Oxygen sensors present" in Descriptor01 (calculateStringForData()) #2

Open
hellensoloviy opened this issue Jun 1, 2017 · 1 comment

Comments

@hellensoloviy
Copy link
Contributor

Method calculateStringForData(data:) in Descriptor01 class have some problems. Case 1D is returning an empty string.

    func calculateStringForData(data : Data) -> String? {
        switch pid {
        case 0x03:
            return calculateFuelSystemStatus(data)
        case 0x12:
            return calculateSecondaryAirStatus(data)
        case 0x13:
            return calculateOxygenSensorsPresent(data)
        case 0x1C:
            return calculateDesignRequirements(data)
        case 0x1D:
            return "" 
        case 0x1E:
            return calculateAuxiliaryInputStatus(data)
        default:
            return nil
        }
    }

As this article says

1D Oxygen sensors present (in 4 banks)

And it is almost like case 0x13, but there 4 banks instead of 2.
And I can see a not used method calculateOxygenSensorsPresentB() in Descriptor01. This method is very similar to calculateOxygenSensorsPresent() which used for case 0x13.

I recommend to use of to delete calculateOxygenSensorsPresentB() method, and fix case 0x1D.

hellensoloviy added a commit that referenced this issue Jun 1, 2017
@mustundag
Copy link

Hi,
I am new to this library and I want to get exhoust emission DTC data from OBD2. Which code could I use to get emission data?
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants