Dev OtarcikCan

This commit is contained in:
2023-01-06 12:46:35 -05:00
parent 4cfabfb2ad
commit f1da647f35
11 changed files with 813 additions and 24 deletions
+23
View File
@@ -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;
}