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.
Method calculateStringForData(data:) in Descriptor01 class have some problems. Case 1D is returning an empty string.
As this article says
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 tocalculateOxygenSensorsPresent()which used forcase 0x13.I recommend to use of to delete
calculateOxygenSensorsPresentB()method, and fixcase 0x1D.