Dev OtarcikCan
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
#include "PCANInterface.h"
|
||||
|
||||
CPCANInterface::CPCANInterface(QObject *parent) : QObject(parent)
|
||||
{
|
||||
}
|
||||
|
||||
int CPCANInterface::Init()
|
||||
{
|
||||
TPCANStatus Result;
|
||||
Result = CAN_Initialize(PCAN_USBBUS1, PCAN_BAUD_500K);
|
||||
|
||||
if(Result != PCAN_ERROR_OK)
|
||||
{
|
||||
// An error occurred, get a text describing the error and show it
|
||||
//
|
||||
char strMsg[256];
|
||||
CAN_GetErrorText(Result, 0, strMsg);
|
||||
qDebug("%s",strMsg);
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user