LTSupportAutomotive icon indicating copy to clipboard operation
LTSupportAutomotive copied to clipboard

Transmitting DTCs using Swift

Open Berkelos opened this issue 3 years ago • 1 comments

Hi,

I'm student from Czech Republic working right now on my thesis where I'm trying to use this library. Whole application is written in Swift with SwiftUI. Everything works fine but when I'm attempting to get DTCs whole communication fails. Here is the part of application that is causing the problems:

let dtcPids = [LTOBD2PID_STORED_DTC_03(),LTOBD2PID_PENDING_DTC_07(),LTOBD2PID_PERMANENT_DTC_0A()] self._obd2Adapter?.transmitMultipleCommands(dtcPids, completionHandler: { _ in self.dtcS = dtcPids[0].troubleCodes self.dtcP = dtcPids[1].troubleCodes self.dtcPer = dtcPids[2].troubleCodes })

I was also watching Demo application but didn't find solution.

Berkelos avatar May 14 '21 19:05 Berkelos

Try this `odb2Adapter?.transmitMultipleCommands([rpm], responseHandler: { commands in

            })`

jorgeflorescarlos avatar Sep 15 '22 14:09 jorgeflorescarlos