From e67f64eccb41cb346a50b7e5eb9e3a8cb819ab32 Mon Sep 17 00:00:00 2001 From: Michael Ludwig Date: Thu, 11 Jan 2024 10:49:41 +0100 Subject: [PATCH] Devel2.2.3 (#78) * trace stcan * debugging G3 --- CMakeLists.txt | 2 +- CanInterfaceImplementations/systec/STCanScan.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8abd209c..562e2313 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,7 +18,7 @@ # # cmake_minimum_required( VERSION 3.0 ) -project( CanModuleProject LANGUAGES C CXX VERSION 2.2.2 ) +project( CanModuleProject LANGUAGES C CXX VERSION 2.2.3 ) message(STATUS "[${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE}]: CanModule version= ${PROJECT_VERSION}" ) cmake_policy(SET CMP0054 NEW) diff --git a/CanInterfaceImplementations/systec/STCanScan.cpp b/CanInterfaceImplementations/systec/STCanScan.cpp index ac1499ad..1e6ee751 100644 --- a/CanInterfaceImplementations/systec/STCanScan.cpp +++ b/CanInterfaceImplementations/systec/STCanScan.cpp @@ -396,13 +396,15 @@ int STCanScan::openCanPort(tUcanInitCanParam initializationParameters) MLOGST(WRN,this) << "trying to open a can port which is in use, reuse handle, skipping UCanDeinitHardware"; } else { //Otherwise we create it. - MLOGST(TRC,this) << "init can port"; + MLOGST(TRC,this) << "init can port module number= " << m_moduleNumber << " calling UcanInitHardwareEx DEBUG0"; systecCallReturn = ::UcanInitHardwareEx(&canModuleHandle, m_moduleNumber, 0, 0); + MLOGST(INF,this) << "systecCallReturn= 0x" << std::hex << (unsigned int) systecCallReturn << std::dec << " after calling UcanInitHardwareEx DEBUG0"; if (systecCallReturn != USBCAN_SUCCESSFUL ) { MLOGST(ERR,this) << "UcanInitHardwareEx, return code = [ 0x" << std::hex << (int) systecCallReturn << std::dec << "]"; ::UcanDeinitHardware(canModuleHandle); return -1; } + MLOGST(ERR,this) << "UcanInitHardwareEx, seems OKreturn code = [ 0x" << std::hex << (int) systecCallReturn << std::dec << "]"; } setCanHandleInUse(m_moduleNumber,true); @@ -888,7 +890,5 @@ void STCanScan::getStatistics( CanStatistics & result ) /** as a consequence of this coding the CanModule::CanModule_bus_state::CANMODULE_NOSTATE; never occurs. fine with me. */ - - }