Added driver name defines
This commit is contained in:
@@ -36,13 +36,22 @@
|
||||
#include <can_drv.h>
|
||||
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
static const char* cMHS_DRIVERNAME = NULL;
|
||||
#elif defined(Q_OS_LINUX)
|
||||
// Linux-spezifischer Code (z.B. /proc Filesystem, D-Bus)
|
||||
static const char* cMHS_DRIVERNAME = "libmhstcan.so";
|
||||
#endif
|
||||
|
||||
//const char* CBCDLL_LIN = "libmhstcan.so";
|
||||
//const char* CBCDLL_WIN = "mhstcan.dll";
|
||||
|
||||
/**
|
||||
* @brief Destruktor. Entlädt den CAN-Bus Treiber wieder.
|
||||
*/
|
||||
|
||||
BCDriverTinyCan::~BCDriverTinyCan()
|
||||
{
|
||||
|
||||
resetDriver();
|
||||
}
|
||||
|
||||
@@ -72,7 +81,7 @@ BCDriver::DriverStateResult BCDriverTinyCan::loadDriver()
|
||||
{
|
||||
qDebug() << " -- Hier!";
|
||||
//if( ::LoadDriver( NULL ) < 0 )
|
||||
if( ::LoadDriver( "libmhstcan.so" ) < 0 )
|
||||
if( ::LoadDriver( cMHS_DRIVERNAME ) < 0 )
|
||||
return std::unexpected(QString("Driver Error: 'LoadDriver'"));
|
||||
_driverState = DriverState::Loaded;
|
||||
return _driverState;
|
||||
|
||||
@@ -55,8 +55,6 @@ private:
|
||||
BCDriver::DriverStateResult setConsoleSlaveMode();
|
||||
|
||||
|
||||
//const char* CBCDLL_LIN = "libmhstcan.so";
|
||||
//const char* CBCDLL_WIN = "mhstcan.dll";
|
||||
|
||||
static constexpr int cRetries = 5;
|
||||
static constexpr int cTimeOuts = 20;
|
||||
|
||||
@@ -27,12 +27,14 @@ sudo apt purge modemmanager
|
||||
|
||||
// ---
|
||||
|
||||
$ sudo chgrp pi /opt
|
||||
$ sudo chmod -R 775 /opt
|
||||
$ cd /opt
|
||||
$ mv /home/pi/tiny_can_raspberry_790.tar.gz .
|
||||
$ tar -xzvf tiny_can_raspberry_790.tar.gz
|
||||
$ rm tiny_can_raspberry_790.tar.gz
|
||||
https://github.com/MHS-Elektronik/OBD-Display
|
||||
|
||||
sudo chgrp pi /opt
|
||||
sudo chmod -R 775 /opt
|
||||
cd /opt
|
||||
mv /home/pi/tiny_can_raspberry_790.tar.gz .
|
||||
tar -xzvf tiny_can_raspberry_790.tar.gz
|
||||
rm tiny_can_raspberry_790.tar.gz
|
||||
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
BIN
doc/~WRL0643.tmp
BIN
doc/~WRL0643.tmp
Binary file not shown.
Reference in New Issue
Block a user