From 653e2741293f53be8bbd6fcc4bcab64a43874377 Mon Sep 17 00:00:00 2001 From: Ranjan Kumar Sahu Date: Mon, 23 May 2022 18:33:49 +0530 Subject: [PATCH 1/2] Update project.pbxproj Updated the Version number from 6.0.1 to 7.0.0 --- Example/openxcframework.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Example/openxcframework.xcodeproj/project.pbxproj b/Example/openxcframework.xcodeproj/project.pbxproj index 43f5ca5..da0cbdf 100644 --- a/Example/openxcframework.xcodeproj/project.pbxproj +++ b/Example/openxcframework.xcodeproj/project.pbxproj @@ -695,7 +695,7 @@ INFOPLIST_FILE = openxcframework/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MARKETING_VERSION = 6.0.1; + MARKETING_VERSION = 7.0.0; MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = com.ford.openxcranjan; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -720,7 +720,7 @@ INFOPLIST_FILE = openxcframework/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MARKETING_VERSION = 6.0.1; + MARKETING_VERSION = 7.0.0; MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = com.ford.openxcranjan; PRODUCT_NAME = "$(TARGET_NAME)"; From 2bd0e84d209b95f5f97c54e99ad3ff00897c34c9 Mon Sep 17 00:00:00 2001 From: Ranjan Kumar Sahu Date: Mon, 11 Jul 2022 18:38:50 +0530 Subject: [PATCH 2/2] changes made for stitch messages --- .../openxcframework.xcodeproj/project.pbxproj | 4 +- openxcframework/VehicleManager.swift | 56 +++++++++++-------- 2 files changed, 34 insertions(+), 26 deletions(-) diff --git a/Example/openxcframework.xcodeproj/project.pbxproj b/Example/openxcframework.xcodeproj/project.pbxproj index da0cbdf..25a1279 100644 --- a/Example/openxcframework.xcodeproj/project.pbxproj +++ b/Example/openxcframework.xcodeproj/project.pbxproj @@ -741,7 +741,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = G9RCZGP4B3; FRAMEWORK_SEARCH_PATHS = ( "$(SDKROOT)/Developer/Library/Frameworks", "$(inherited)", @@ -772,7 +772,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = G9RCZGP4B3; FRAMEWORK_SEARCH_PATHS = ( "$(SDKROOT)/Developer/Library/Frameworks", "$(inherited)", diff --git a/openxcframework/VehicleManager.swift b/openxcframework/VehicleManager.swift index 5bb3155..d94a397 100755 --- a/openxcframework/VehicleManager.swift +++ b/openxcframework/VehicleManager.swift @@ -864,16 +864,20 @@ open class VehicleManager: NSObject { } fileprivate func protobufDignosticMessage(msg : Openxc_VehicleMessage){ - print("DiagnosticResponse>>>>\(msg)") + // print("DiagnosticResponse>>>>\(msg)") // build diag response message // if let frame = (msg.diagnosticStitchResponse.frame){ // print(frame) -// self.protobufMultiFrameDignosticMessage(msg: msg) +// self.protobufMultiFrameDignosticMessage(msg: msg) // // // }else{ // + if msg.diagnosticResponse.totalSize != 0 { + self.protobufMultiFrameDignosticMessage(msg: msg) + // return + }else{ let rsp : VehicleDiagnosticResponse = VehicleDiagnosticResponse() //if let timestamp = msg.timestamp{ rsp.timeStamp = Int(truncatingIfNeeded:msg.timestamp) @@ -891,7 +895,8 @@ open class VehicleManager: NSObject { rsp.value = Int(truncating: msg.diagnosticResponse.value.numericValue as NSNumber) print(msg.diagnosticResponse.value as Any) } - + + if rsp.value != 0 { rsp.success = true//msg.diagnosticResponse.success } @@ -929,41 +934,44 @@ open class VehicleManager: NSObject { act.performAction(["vehiclemessage":rsp] as NSDictionary) } -//} +} } - /* fileprivate func protobufMultiFrameDignosticMessage(msg : Openxc.VehicleMessage){ + fileprivate func protobufMultiFrameDignosticMessage(msg : Openxc_VehicleMessage){ print("DiagnosticResponse>>>>\(msg)") // build diag response message - let rsp : VehicleDiagnosticResponse = VehicleDiagnosticResponse() - if let timestamp = msg.timestamp{ - rsp.timeStamp = Int(truncatingIfNeeded:timestamp) - } - let frame = Int(msg.diagnosticStitchResponse.frame) + let rsp : VehicleDiagnosticResponse = VehicleDiagnosticResponse() + //if let timestamp = msg.timestamp{ + rsp.timeStamp = Int(truncatingIfNeeded:msg.timestamp) + // let rsp : VehicleDiagnosticResponse = VehicleDiagnosticResponse() + //if let timestamp = msg.timestamp{ + rsp.timeStamp = Int(truncatingIfNeeded:msg.timestamp) + // } + let frame = Int(msg.diagnosticResponse.frame) if (frame != -1) { - if let payloadX = String(data: msg.diagnosticStitchResponse.payload, encoding: .utf8) { + if let payloadX = String(data: msg.diagnosticResponse.payload, encoding: .utf8) { multiFramePayload = payloadX return } } //var payload : String = "" - if let payloadX = String(data: msg.diagnosticStitchResponse.payload, encoding: .utf8) { + if let payloadX = String(data: msg.diagnosticResponse.payload, encoding: .utf8) { rsp.payload = multiFramePayload + payloadX print("payload : \(rsp.payload)") } - rsp.bus = Int(msg.diagnosticStitchResponse.bus) - rsp.message_id = Int(msg.diagnosticStitchResponse.messageId) - rsp.mode = Int(msg.diagnosticStitchResponse.mode) - if msg.diagnosticStitchResponse.hasPid { - rsp.pid = Int(msg.diagnosticStitchResponse.pid) - } - if let successValue = msg.diagnosticStitchResponse.success { - rsp.success = successValue //msg.diagnosticResponse.success - } - if msg.diagnosticStitchResponse.hasValue { - rsp.value = Int(truncating: msg.diagnosticStitchResponse.value as! NSNumber) + rsp.bus = Int(msg.diagnosticResponse.bus) + rsp.message_id = Int(msg.diagnosticResponse.messageID) + rsp.mode = Int(msg.diagnosticResponse.mode) + // if msg.diagnosticResponse.pid { + rsp.pid = Int(msg.diagnosticResponse.pid) + // } + //if let successValue = msg.diagnosticResponse.success { + rsp.success = msg.diagnosticResponse.success //msg.diagnosticResponse.success + // } + if msg.diagnosticResponse.hasValue { + rsp.value = Int(truncating: msg.diagnosticResponse.value as! NSNumber) print(msg.diagnosticResponse.value as Any) } @@ -1005,7 +1013,7 @@ open class VehicleManager: NSObject { act.performAction(["vehiclemessage":rsp] as NSDictionary) } - }*/ + } /*fileprivate func protobufCanMessage(msg : Openxc_VehicleMessage){ // build CAN response message