Skip to content

Commit

Permalink
Devel2.2.2 (#77)
Browse files Browse the repository at this point in the history
* correct/suppress lossless bool method
* back to C++11, boost 1.59 still
* throttleDelay simplified
  • Loading branch information
meeludwig authored Nov 22, 2023
1 parent 936b7b7 commit d14e7f0
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 27 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#
#
cmake_minimum_required( VERSION 3.0 )
project( CanModuleProject LANGUAGES C CXX VERSION 2.2.1 )
project( CanModuleProject LANGUAGES C CXX VERSION 2.2.2 )
message(STATUS "[${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE}]: CanModule version= ${PROJECT_VERSION}" )

cmake_policy(SET CMP0054 NEW)
Expand Down
1 change: 0 additions & 1 deletion CanInterfaceImplementations/anagate/AnaCanScan.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ class AnaCanScan: public CanModule::CCanAccess
virtual ~AnaCanScan();

virtual int createBus(const std::string name, const std::string parameters);
virtual int createBus(const std::string name, const std::string parameters, bool lossless );
virtual int createBus(const std::string name, const std::string parameters, float factor );
virtual bool sendMessage(short cobID, unsigned char len, unsigned char *message, bool rtr = false);
virtual bool sendMessage(CanMessage *);
Expand Down
24 changes: 1 addition & 23 deletions CanInterfaceImplementations/pkcan/pkcan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,16 +220,9 @@ DWORD WINAPI PKCanScan::CanScanControlThread(LPVOID pCanScan)
* -2: could not create the thread
* -3: sth else went wrong
*/
int PKCanScan::createBus(const std::string name, const std::string parameters, bool lossless )
{
m_lossless = lossless;
m_losslessFactor = 1.0;
return( createBus( name, parameters) );
}
int PKCanScan::createBus(const std::string name, const std::string parameters, float factor )
{
m_lossless = true;
m_losslessFactor = factor;
m_sendThrottleDelay = (int) factor;
return( createBus( name, parameters) );
}
int PKCanScan::createBus(const std::string name, const std::string parameters )
Expand Down Expand Up @@ -459,22 +452,7 @@ bool PKCanScan::m_configureCanboard(const std::string name,const std::string par
ret = false;
counter--;
}

/** fixed data rate, non plug-and-play
* static TPCANStatus Initialize(
* TPCANHandle Channel,
* TPCANBaudrate Btr0Btr1,
* TPCANType HwType,
* UInt32 IOPort,
* UInt16 Interrupt);
*/
// TPCANStatus tpcanStatus = CAN_Initialize(m_canObjHandler, m_baudRate,256,3); // one param missing ?
// return tpcanStatus;

m_sendThrottleDelay = (int) m_losslessFactor;
MLOGPK(TRC, this) << "the frame sending delay is " << m_sendThrottleDelay << " us";


return ret;
}

Expand Down
3 changes: 1 addition & 2 deletions CanInterfaceImplementations/systec/STCanScan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ STCanScan::~STCanScan()
*/
int STCanScan::createBus(const std::string name, const std::string parameters, float factor )
{
m_losslessFactor = factor;
m_sendThrottleDelay = (int) factor;
return( createBus( name, parameters) );
}
int STCanScan::createBus(const std::string name,const std::string parameters)
Expand Down Expand Up @@ -347,7 +347,6 @@ int STCanScan::configureCanBoard(const std::string name,const std::string parame
m_baudRate = baudRate;
m_CanParameters.m_lBaudRate = vendorBaudRate2UserBaudRate( baudRate );

m_sendThrottleDelay = (int) m_losslessFactor;
MLOGST(TRC, this) << "the frame sending delay is " << m_sendThrottleDelay << " us";

return openCanPort( createInitializationParameters( m_baudRate ) );
Expand Down

0 comments on commit d14e7f0

Please sign in to comment.