Code cleanup
This commit is contained in:
parent
eeb1d04f9b
commit
74b6a23045
@ -5293,3 +5293,54 @@ Démarrage du logiciel Otarcik CAN le 2023-01-27 à 14:18:46
|
||||
2023-01-27 14:18:46 Dispositif [Module Parker] initialisé avec succès!
|
||||
2023-01-27 14:19:37 Déinitialisation du module PCAN USB ID 81
|
||||
2023-01-27 14:19:37 Module PCAN USB déinitialisé avec succès...
|
||||
|
||||
|
||||
********************************************************************
|
||||
Démarrage du logiciel Otarcik CAN le 2023-01-28 à 08:18:39
|
||||
********************************************************************
|
||||
2023-01-28 08:18:39 Démarrage du logiciel OtarcikCAN
|
||||
2023-01-28 08:18:39 Chargement de la configuration système...
|
||||
2023-01-28 08:18:39 Configuration système chargée avec succès!
|
||||
2023-01-28 08:18:39 Initialisation du dispositif [Module Parker]
|
||||
2023-01-28 08:18:39 Chargement de la base de données D:/Main/Dev/YULTek/Otarcik_CAN/IVT-S_all-variations_12082020.dbc
|
||||
2023-01-28 08:18:39 Base de données chargée avec succès. Flags: 0x0
|
||||
2023-01-28 08:18:39 Démarrage d'un module CAN...
|
||||
2023-01-28 08:18:39 Initialisation d'un module PCAN. Channel:81, Baudrate:28
|
||||
2023-01-28 08:18:39 Module PCAN USB initialisé avec succès
|
||||
2023-01-28 08:18:39 Dispositif [Module Parker] initialisé avec succès!
|
||||
2023-01-28 08:19:04 Déinitialisation du module PCAN USB ID 81
|
||||
2023-01-28 08:19:04 Module PCAN USB déinitialisé avec succès...
|
||||
|
||||
|
||||
********************************************************************
|
||||
Démarrage du logiciel Otarcik CAN le 2023-01-28 à 08:28:35
|
||||
********************************************************************
|
||||
2023-01-28 08:28:35 Démarrage du logiciel OtarcikCAN
|
||||
2023-01-28 08:28:35 Chargement de la configuration système...
|
||||
2023-01-28 08:28:35 Configuration système chargée avec succès!
|
||||
2023-01-28 08:28:35 Initialisation du dispositif [Module Parker]
|
||||
2023-01-28 08:28:35 Chargement de la base de données D:/Main/Dev/YULTek/Otarcik_CAN/IVT-S_all-variations_12082020.dbc
|
||||
2023-01-28 08:28:35 Base de données chargée avec succès. Flags: 0x0
|
||||
2023-01-28 08:28:35 Démarrage d'un module CAN...
|
||||
2023-01-28 08:28:35 Initialisation d'un module PCAN. Channel:81, Baudrate:28
|
||||
2023-01-28 08:28:35 Module PCAN USB initialisé avec succès
|
||||
2023-01-28 08:28:35 Dispositif [Module Parker] initialisé avec succès!
|
||||
2023-01-28 08:28:59 Déinitialisation du module PCAN USB ID 81
|
||||
2023-01-28 08:28:59 Module PCAN USB déinitialisé avec succès...
|
||||
|
||||
|
||||
********************************************************************
|
||||
Démarrage du logiciel Otarcik CAN le 2023-01-28 à 08:53:06
|
||||
********************************************************************
|
||||
2023-01-28 08:53:06 Démarrage du logiciel OtarcikCAN
|
||||
2023-01-28 08:53:06 Chargement de la configuration système...
|
||||
2023-01-28 08:53:06 Configuration système chargée avec succès!
|
||||
2023-01-28 08:53:06 Initialisation du dispositif [Module Parker]
|
||||
2023-01-28 08:53:06 Chargement de la base de données D:/Main/Dev/YULTek/Otarcik_CAN/IVT-S_all-variations_12082020.dbc
|
||||
2023-01-28 08:53:06 Base de données chargée avec succès. Flags: 0x0
|
||||
2023-01-28 08:53:06 Démarrage d'un module CAN...
|
||||
2023-01-28 08:53:06 Initialisation d'un module PCAN. Channel:81, Baudrate:28
|
||||
2023-01-28 08:53:06 Module PCAN USB initialisé avec succès
|
||||
2023-01-28 08:53:06 Dispositif [Module Parker] initialisé avec succès!
|
||||
2023-01-28 09:00:43 Déinitialisation du module PCAN USB ID 81
|
||||
2023-01-28 09:00:43 Module PCAN USB déinitialisé avec succès...
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -29,6 +29,7 @@ INCLUDEPATH += $$PWD/ \
|
||||
$$PWD/Sources/PCAN \
|
||||
$$PWD/Sources/KVASER\
|
||||
$$PWD/Sources/CANDatabase\
|
||||
$$PWD/Sources/CANBus\
|
||||
|
||||
SOURCES += Sources/main.cpp \
|
||||
Sources/MainWindow.cpp \
|
||||
@ -36,16 +37,17 @@ SOURCES += Sources/main.cpp \
|
||||
Sources/OtarcikCan.cpp \
|
||||
Sources/Gui/GeneralStatusPage.cpp \
|
||||
Sources/GeneralMessagesLogDispatcher.cpp \
|
||||
Sources/CANAnalyzer.cpp \
|
||||
Sources/CANMessage.cpp \
|
||||
Sources/Gui/CANViewerPage.cpp \
|
||||
Sources/CANDatabase/CANDatabase.cpp \
|
||||
Sources/CANDevice.cpp \
|
||||
Sources/CANSignal.cpp \
|
||||
Sources/SystemConfig.cpp \
|
||||
Sources/CANDeviceConfig.cpp \
|
||||
Sources/Gui/CANbusSettingsPage.cpp \
|
||||
Sources/Gui/LoggingSettingsPage.cpp
|
||||
Sources/Gui/LoggingSettingsPage.cpp \
|
||||
Sources/CANBus/CANAnalyzer.cpp \
|
||||
Sources/CANBus/CANDevice.cpp \
|
||||
Sources/CANBus/CANDeviceConfig.cpp \
|
||||
Sources/CANBus/CANMessage.cpp \
|
||||
Sources/CANBus/CANSignal.cpp \
|
||||
Sources/CANBus/CANDataLogger.cpp
|
||||
|
||||
HEADERS += Sources/MainWindow.h \
|
||||
Sources/PCANInterface.h \
|
||||
@ -55,16 +57,17 @@ HEADERS += Sources/MainWindow.h \
|
||||
Sources/defines.h \
|
||||
Sources/KVASER/kvaDbLib.h \
|
||||
Sources/PCAN/PCANBasic.h \
|
||||
Sources/CANAnalyzer.h \
|
||||
Sources/CANMessage.h \
|
||||
Sources/Gui/CANViewerPage.h \
|
||||
Sources/CANDatabase/CANDatabase.h \
|
||||
Sources/CANDevice.h \
|
||||
Sources/CANSignal.h \
|
||||
Sources/SystemConfig.h \
|
||||
Sources/CANDeviceConfig.h \
|
||||
Sources/Gui/CANbusSettingsPage.h \
|
||||
Sources/Gui/LoggingSettingsPage.h
|
||||
Sources/Gui/LoggingSettingsPage.h \
|
||||
Sources/CANBus/CANAnalyzer.h \
|
||||
Sources/CANBus/CANDevice.h \
|
||||
Sources/CANBus/CANDeviceConfig.h \
|
||||
Sources/CANBus/CANMessage.h \
|
||||
Sources/CANBus/CANSignal.h \
|
||||
Sources/CANBus/CANDataLogger.h
|
||||
|
||||
FORMS += Sources/Gui/MainWindow.ui \
|
||||
Sources/Gui/GeneralStatusPage.ui \
|
||||
|
||||
6
Otarcik_CAN/Sources/CANBus/CANDataLogger.cpp
Normal file
6
Otarcik_CAN/Sources/CANBus/CANDataLogger.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
#include "CANDataLogger.h"
|
||||
|
||||
CCANDataLogger::CCANDataLogger()
|
||||
{
|
||||
|
||||
}
|
||||
11
Otarcik_CAN/Sources/CANBus/CANDataLogger.h
Normal file
11
Otarcik_CAN/Sources/CANBus/CANDataLogger.h
Normal file
@ -0,0 +1,11 @@
|
||||
#ifndef CANDATALOGGER_H
|
||||
#define CANDATALOGGER_H
|
||||
|
||||
|
||||
class CCANDataLogger
|
||||
{
|
||||
public:
|
||||
CCANDataLogger();
|
||||
};
|
||||
|
||||
#endif // CANDATALOGGER_H
|
||||
@ -46,7 +46,7 @@ CCANDevice::~CCANDevice()
|
||||
|
||||
int CCANDevice::Init()
|
||||
{
|
||||
if(mDeviceConfigInfo.mCANDeviceID < 0 || mDeviceConfigInfo.mCANDeviceBaudrate < 0 || mDeviceConfigInfo.mDevicePollPeriod == 0 || mDeviceConfigInfo.mCANDeviceDatabaseFilename.isEmpty() || mDeviceConfigInfo.mDeviceName.isEmpty())
|
||||
if(mDeviceConfigInfo.mCANDeviceID < 0 || mDeviceConfigInfo.mCANDeviceBaudrate < 0 || mDeviceConfigInfo.mDevicePollPeriod == 0 || mDeviceConfigInfo.mCANDeviceDatabaseFilename.isEmpty() == true || mDeviceConfigInfo.mDeviceName.isEmpty() == true)
|
||||
{
|
||||
qDebug("CCANDevice: trying to initialize a CCANDevice with invalid parameters");
|
||||
return RET_GENERAL_ERROR;
|
||||
@ -96,9 +96,6 @@ int CCANDevice::NewMessageParsed()
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
QDataStream &operator<<(QDataStream &out, const CCANDevice &source)
|
||||
{
|
||||
out << source.mDeviceConfigInfo;
|
||||
@ -30,7 +30,7 @@ int CCANMessage::SetDataFromDriver(quint32 Channel, TPCANMsg CANMsg, TPCANTimest
|
||||
mCANMsgLength = (unsigned char)CANMsg.LEN;
|
||||
mCANMsgType = CANMsg.MSGTYPE;
|
||||
//mCANMsgData = QByteArray((const char*)&CANMsg.DATA);
|
||||
for(int i = 0; i < mCANMsgLength; i++)
|
||||
for(unsigned int i = 0; i < mCANMsgLength; i++)
|
||||
{
|
||||
mCANMsgData.append(CANMsg.DATA[i]);
|
||||
}
|
||||
@ -50,6 +50,7 @@ int CCANMessage::AddSignal(CCANSignal *NewSignal)
|
||||
}
|
||||
|
||||
mSignalsList.append(NewSignal);
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
int CCANMessage::UpdateValue(CCANMessage *NewDeviceMessage)
|
||||
@ -90,6 +91,7 @@ int CCANMessage::UpdateValue(CCANMessage *NewDeviceMessage)
|
||||
mSignalsList.at(i)->ComputeNewSignalValue(mCANRawDataIntel, mCANMsgLength);
|
||||
}
|
||||
|
||||
return RET_OK;
|
||||
|
||||
}
|
||||
|
||||
@ -29,18 +29,13 @@ int CCANSignal::ComputeNewSignalValue(quint64 NewValue, quint16 MessageSize)
|
||||
}
|
||||
else
|
||||
{
|
||||
//TODO: À faire!!!
|
||||
return RET_GENERAL_ERROR;
|
||||
}
|
||||
|
||||
// mRawValue >>= mStartBit;
|
||||
// quint64 mask = ((1 << mSignalSize)-1);
|
||||
// mRawValue &= mask;
|
||||
|
||||
|
||||
mPhysicalValue = ((signed) mRawValue * mValueFactor) + mValueOffset;
|
||||
// mPhysicalValue = (test * mValueFactor) + mValueOffset;
|
||||
//mPhysicalValue = test;
|
||||
|
||||
|
||||
return RET_OK;
|
||||
|
||||
}
|
||||
@ -109,7 +109,7 @@ int CCANViewerPage::UpdateCANTable(QList<CCANMessage *> *MsgList)
|
||||
for(int byte = 0; byte < MsgList->at(msg)->mCANMsgData.size();byte++)
|
||||
{
|
||||
// Data.append(QString("%1 ").arg((unsigned int)MsgList->at(msg)->mCANMsgData.at(byte),2,16));
|
||||
Data.append(QString().sprintf("%.2X ",(unsigned char)MsgList->at(msg)->mCANMsgData.at(byte)));
|
||||
Data.append(QString().asprintf("%.2X ",(unsigned char)MsgList->at(msg)->mCANMsgData.at(byte)));
|
||||
}
|
||||
ui->mCANDataTableWidget->item(row,5)->setText(Data);
|
||||
}
|
||||
@ -195,4 +195,6 @@ int CCANViewerPage::UpdateSignalsTable()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
@ -19,6 +19,7 @@ CGeneralStatusPage::~CGeneralStatusPage()
|
||||
|
||||
int CGeneralStatusPage::SetGeneralMsgText(QStringList Txt)
|
||||
{
|
||||
Q_UNUSED(Txt)
|
||||
/*if you're populating the text box programatically, is to use textEdit->setTextColor(QColor&).You can create the QColor object yourself, or use one of the predefined colours in the Qt namespace (Qt::black, Qt::red, etc). It will apply the specified colour to any text you add, until it is called again with a different one.*/
|
||||
|
||||
return RET_OK;
|
||||
|
||||
@ -80,7 +80,7 @@ QList<CCANMessage *> CPCANInterface::ReadCANFullBuffer(unsigned short Channel)
|
||||
TPCANMsg CANMsg;
|
||||
TPCANTimestamp CANTimeStamp;
|
||||
TPCANStatus stsResult;
|
||||
int cnt = 0;
|
||||
//int cnt = 0;
|
||||
|
||||
QList<CCANMessage *> MessagesList;
|
||||
MessagesList.clear();
|
||||
|
||||
Binary file not shown.
@ -7,7 +7,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
#include <memory>
|
||||
#include "../Sources/CANAnalyzer.h"
|
||||
#include "../Sources/CANBus/CANAnalyzer.h"
|
||||
#include <QtCore/qbytearray.h>
|
||||
#include <QtCore/qmetatype.h>
|
||||
#if !defined(Q_MOC_OUTPUT_REVISION)
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
#include <memory>
|
||||
#include "../Sources/CANDevice.h"
|
||||
#include "../Sources/CANBus/CANDevice.h"
|
||||
#include <QtCore/qbytearray.h>
|
||||
#include <QtCore/qmetatype.h>
|
||||
#if !defined(Q_MOC_OUTPUT_REVISION)
|
||||
|
||||
@ -4,23 +4,24 @@ debug/PCANInterface.o
|
||||
debug/OtarcikCan.o
|
||||
debug/GeneralStatusPage.o
|
||||
debug/GeneralMessagesLogDispatcher.o
|
||||
debug/CANAnalyzer.o
|
||||
debug/CANMessage.o
|
||||
debug/CANViewerPage.o
|
||||
debug/CANDatabase.o
|
||||
debug/CANDevice.o
|
||||
debug/CANSignal.o
|
||||
debug/SystemConfig.o
|
||||
debug/CANDeviceConfig.o
|
||||
debug/CANbusSettingsPage.o
|
||||
debug/LoggingSettingsPage.o
|
||||
debug/CANAnalyzer.o
|
||||
debug/CANDevice.o
|
||||
debug/CANDeviceConfig.o
|
||||
debug/CANMessage.o
|
||||
debug/CANSignal.o
|
||||
debug/CANDataLogger.o
|
||||
debug/moc_MainWindow.o
|
||||
debug/moc_PCANInterface.o
|
||||
debug/moc_OtarcikCan.o
|
||||
debug/moc_GeneralStatusPage.o
|
||||
debug/moc_CANAnalyzer.o
|
||||
debug/moc_CANViewerPage.o
|
||||
debug/moc_CANDatabase.o
|
||||
debug/moc_CANDevice.o
|
||||
debug/moc_CANbusSettingsPage.o
|
||||
debug/moc_LoggingSettingsPage.o
|
||||
debug/moc_CANAnalyzer.o
|
||||
debug/moc_CANDevice.o
|
||||
|
||||
@ -4,23 +4,24 @@ release/PCANInterface.o
|
||||
release/OtarcikCan.o
|
||||
release/GeneralStatusPage.o
|
||||
release/GeneralMessagesLogDispatcher.o
|
||||
release/CANAnalyzer.o
|
||||
release/CANMessage.o
|
||||
release/CANViewerPage.o
|
||||
release/CANDatabase.o
|
||||
release/CANDevice.o
|
||||
release/CANSignal.o
|
||||
release/SystemConfig.o
|
||||
release/CANDeviceConfig.o
|
||||
release/CANbusSettingsPage.o
|
||||
release/LoggingSettingsPage.o
|
||||
release/CANAnalyzer.o
|
||||
release/CANDevice.o
|
||||
release/CANDeviceConfig.o
|
||||
release/CANMessage.o
|
||||
release/CANSignal.o
|
||||
release/CANDataLogger.o
|
||||
release/moc_MainWindow.o
|
||||
release/moc_PCANInterface.o
|
||||
release/moc_OtarcikCan.o
|
||||
release/moc_GeneralStatusPage.o
|
||||
release/moc_CANAnalyzer.o
|
||||
release/moc_CANViewerPage.o
|
||||
release/moc_CANDatabase.o
|
||||
release/moc_CANDevice.o
|
||||
release/moc_CANbusSettingsPage.o
|
||||
release/moc_LoggingSettingsPage.o
|
||||
release/moc_CANAnalyzer.o
|
||||
release/moc_CANDevice.o
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user