20 changed files with 1248 additions and 1511 deletions
@ -1,163 +1,137 @@ |
|||||
#ifndef HONALOWLEVELAPI_H |
#ifndef HONALOWLEVELAPI_H |
||||
#define HONALOWLEVELAPI_H |
#define HONALOWLEVELAPI_H |
||||
#include <QObject> |
#include <QObject> |
||||
|
#include <QMutex> |
||||
|
#include <QWaitCondition> |
||||
|
|
||||
#include "LowLevel/Setting/Setting.h" |
#include "LowLevel/Setting/Setting.h" |
||||
#include "LowLevel/HonaPacket.h" |
#include "LowLevel/HonaPacket.h" |
||||
#include "LowLevel/Setting/Setting.h" |
#include "LowLevel/Setting/Setting.h" |
||||
#include "HonaPacket.h" |
#include "HonaPacket.h" |
||||
#include "QWaitCondition" |
|
||||
#include "QMutex" |
|
||||
<<<<<<< HEAD |
|
||||
|
|
||||
|
|
||||
#include "include/LowLevel/HonaPacket.h" |
|
||||
#include "include/Wrapper/PlxWrapper.h" |
|
||||
|
|
||||
======= |
|
||||
#include "LowLevel/Exception/HonaAlreadyStartedException.h" |
#include "LowLevel/Exception/HonaAlreadyStartedException.h" |
||||
#include "LowLevel/Exception/HonaException.h" |
#include "LowLevel/Exception/HonaException.h" |
||||
#include "Wrapper/PlxWrapper.h" |
#include "Wrapper/PlxWrapper.h" |
||||
#include "LowLevel/Utils/Utils.h" |
#include "LowLevel/Utils/Utils.h" |
||||
>>>>>>> 64f6e7f618eb5a6f1f63a4c5f377b46f1e7bc126 |
|
||||
|
|
||||
class HonaLowLevelAPI : public QObject |
class HonaLowLevelAPI : public QObject |
||||
{ |
{ |
||||
Q_OBJECT |
Q_OBJECT |
||||
|
|
||||
private: |
private: |
||||
bool _hsruIsStarted = false; |
bool _hsruIsStarted = false; |
||||
bool _hiruIsStarted = false; |
bool _hiruIsStarted = false; |
||||
quint32 _hsruLoss; |
quint32 _hsruLoss; |
||||
HonaSettings _honaSetting; |
HonaSettings _honaSetting; |
||||
QWaitCondition _hsruReadDone, _hsruUpdateAck, _hsruStopEvent, _hiruReadDone0, _hiruCountDone, |
QWaitCondition _hsruReadDone, _hsruUpdateAck, _hsruStopEvent, _hiruReadDone0, _hiruCountDone, |
||||
_hiruUpdateAck1; |
_hiruUpdateAck1; |
||||
|
|
||||
QList<HonaPacket> honaPacketList; |
|
||||
QMutex _mutex; |
|
||||
int _threadSforValue = 0; |
|
||||
<<<<<<< HEAD |
|
||||
bool _isReaderThreadFree = false; |
|
||||
bool _isUpdateThreadFree = false; |
|
||||
QVector<quint32> honaRegisterBuffer; |
|
||||
QList<HonaPacket> honaPacketList; |
QList<HonaPacket> honaPacketList; |
||||
PlxWrapper plxwrapper; |
QMutex _mutex; |
||||
|
int _threadSforValue = 0; |
||||
|
bool _isHsruMainThreadFree = false; |
||||
|
bool _isHsruReaderThreadFree = false; |
||||
|
bool _isHsruUpdateThreadFree = false; |
||||
|
|
||||
|
bool _isHiruReaderThreadFree = false; |
||||
|
bool _isHiruUpdateThreadFree = false; |
||||
|
QVector<quint32> honaRegisterBuffer; |
||||
|
PlxWrapper plxWrapper; |
||||
|
|
||||
quint32 hsruLoss = 0; |
static quint32 packetLenInt4; |
||||
|
static quint32 packetLenRes4; |
||||
|
static quint32 packetLenSinglePulse; |
||||
|
|
||||
static quint32 packetLenInt123C; |
static quint32 packetLenInt123C; |
||||
static quint32 packetLenRes123C; |
static quint32 packetLenRes123C; |
||||
static quint32 packetLenIntS; |
static quint32 packetLenIntS; |
||||
static quint32 packetLenResS; |
static quint32 packetLenResS; |
||||
======= |
|
||||
bool _isHsruMainThreadFree = false; |
static quint32 nextInt4; |
||||
bool _isHsruReaderThreadFree = false; |
static quint32 nextRes4; |
||||
bool _isHsruUpdateThreadFree = false; |
static quint32 nextSinglePulse; |
||||
|
|
||||
bool _isHiruReaderThreadFree = false; |
static quint32 nextInt123C; |
||||
bool _isHiruUpdateThreadFree = false; |
static quint32 nextRes123C; |
||||
QVector<quint32> honaRegisterBuffer; |
static quint32 nextIntS; |
||||
PlxWrapper plxWrapper; |
static quint32 nextResS; |
||||
|
|
||||
static quint32 packetLenInt4; |
quint32 lastPNInt4 = 0; |
||||
static quint32 packetLenRes4; |
quint32 lastPNRes4 = 0; |
||||
static quint32 packetLenSinglePulse; |
quint32 lastPNSinglePulse = 0; |
||||
|
|
||||
static quint32 packetLenInt123C; |
quint32 lastPNInt123C = 0; |
||||
static quint32 packetLenRes123C; |
quint32 lastPNRes123C = 0; |
||||
static quint32 packetLenIntS; |
quint32 lastPNIntS = 0; |
||||
static quint32 packetLenResS; |
quint32 lastPNResS = 0; |
||||
|
|
||||
static quint32 nextInt4; |
HonaPacket tempHonaPacketInt4; |
||||
static quint32 nextRes4; |
HonaPacket tempHonaPacketRes4; |
||||
static quint32 nextSinglePulse; |
HonaPacket tempHonaPacketSinglePulse; |
||||
|
|
||||
static quint32 nextInt123C; |
HonaPacket tempHonaPacketInt123C; |
||||
static quint32 nextRes123C; |
HonaPacket tempHonaPacketRes123C; |
||||
static quint32 nextIntS; |
HonaPacket tempHonaPacketIntS; |
||||
static quint32 nextResS; |
HonaPacket tempHonaPacketResS; |
||||
|
|
||||
quint32 lastPNInt4 = 0; |
|
||||
quint32 lastPNRes4 = 0; |
|
||||
quint32 lastPNSinglePulse = 0; |
|
||||
|
|
||||
quint32 lastPNInt123C = 0; |
|
||||
quint32 lastPNRes123C = 0; |
|
||||
quint32 lastPNIntS = 0; |
|
||||
quint32 lastPNResS = 0; |
|
||||
|
|
||||
HonaPacket tempHonaPacketInt4; |
|
||||
HonaPacket tempHonaPacketRes4; |
|
||||
HonaPacket tempHonaPacketSinglePulse; |
|
||||
|
|
||||
HonaPacket tempHonaPacketInt123C; |
|
||||
HonaPacket tempHonaPacketRes123C; |
|
||||
HonaPacket tempHonaPacketIntS; |
|
||||
HonaPacket tempHonaPacketResS; |
|
||||
>>>>>>> 64f6e7f618eb5a6f1f63a4c5f377b46f1e7bc126 |
|
||||
|
|
||||
public: |
public: |
||||
qulonglong toaStartBoard = 0; |
qulonglong toaStartBoard = 0; |
||||
|
|
||||
HonaLowLevelAPI(QObject* parent = nullptr); |
HonaLowLevelAPI(QObject* parent = nullptr); |
||||
~HonaLowLevelAPI() |
~HonaLowLevelAPI() |
||||
{ |
{ |
||||
} |
} |
||||
|
|
||||
bool isHsruStarted(); |
bool isHsruStarted(); |
||||
bool isHiruStarted(); |
bool isHiruStarted(); |
||||
void deviceReset(); |
void deviceReset(); |
||||
|
|
||||
void setConfig(HonaSettings& settings); |
void setConfig(HonaSettings& settings); |
||||
HonaSettings getConfig(); |
HonaSettings getConfig(); |
||||
QString getSwVersion(); |
QString getSwVersion(); |
||||
QString getDeviceId(); |
QString getDeviceId(); |
||||
void hsruStart(); |
void hsruStart(); |
||||
void hiruStart(); |
void hiruStart(); |
||||
void hsruStop(); |
void hsruStop(); |
||||
void init(); |
void init(); |
||||
|
|
||||
bool getHsruIsStarted() const; |
bool getHsruIsStarted() const; |
||||
void setHsruIsStarted(bool hsruIsStarted); |
void setHsruIsStarted(bool hsruIsStarted); |
||||
|
|
||||
bool getHiruIsStarted() const; |
bool getHiruIsStarted() const; |
||||
void setHiruIsStarted(bool hiruIsStarted); |
void setHiruIsStarted(bool hiruIsStarted); |
||||
|
|
||||
private: |
private: |
||||
void writeSettingToRegisters(HonaSettings& settings); |
void writeSettingToRegisters(HonaSettings& settings); |
||||
void setConfig(); |
void setConfig(); |
||||
void hsruMainThread(); |
void hsruMainThread(); |
||||
void hsruReadThread(); |
void hsruReadThread(); |
||||
void hsruUpdateThread(); |
void hsruUpdateThread(); |
||||
void hiruMainThread(); |
void hiruMainThread(); |
||||
void hiruReadThread(); |
void hiruReadThread(); |
||||
void hiruUpdateThread(); |
void hiruUpdateThread(); |
||||
quint32 hiruGetDOA(); |
quint32 hiruGetDOA(); |
||||
|
|
||||
quint32 hsruParserInt123C(const QVector<quint32>& honaData, QList<HonaPacket>& honaPacketList); |
quint32 hsruParserInt123C(const QVector<quint32>& honaData, QList<HonaPacket>& honaPacketList); |
||||
quint32 hsruParserRes123C(const QVector<quint32>& honaData, QList<HonaPacket>& honaPacketList); |
quint32 hsruParserRes123C(const QVector<quint32>& honaData, QList<HonaPacket>& honaPacketList); |
||||
quint32 hsruParserIntS(const QVector<quint32>& honaData, QList<HonaPacket>& honaPacketList); |
quint32 hsruParserIntS(const QVector<quint32>& honaData, QList<HonaPacket>& honaPacketList); |
||||
quint32 hsruParserResS(const QVector<quint32>& honaData, QList<HonaPacket>& honaPacketList); |
quint32 hsruParserResS(const QVector<quint32>& honaData, QList<HonaPacket>& honaPacketList); |
||||
quint32 hsruParserInt4(const QVector<quint32>& honaData, QList<HonaPacket>& honaPacketList); |
quint32 hsruParserInt4(const QVector<quint32>& honaData, QList<HonaPacket>& honaPacketList); |
||||
quint32 hsruParserRes4(const QVector<quint32>& honaData, QList<HonaPacket>& honaPacketList); |
quint32 hsruParserRes4(const QVector<quint32>& honaData, QList<HonaPacket>& honaPacketList); |
||||
quint32 hsruParserSinglePulse(const QVector<quint32>& honaData, |
quint32 hsruParserSinglePulse(const QVector<quint32>& honaData, |
||||
QList<HonaPacket>& honaPacketList); |
QList<HonaPacket>& honaPacketList); |
||||
|
|
||||
QVector<quint32> hsruReadHonaBuffer(honaReceivers receiver); |
|
||||
|
|
||||
bool isValid(HonaPacket hp); |
|
||||
|
|
||||
public: |
|
||||
|
|
||||
void hsruReaderMethod(); |
|
||||
QVector<quint32> hsruReadHonaBuffer(honaReceivers receiver); |
QVector<quint32> hsruReadHonaBuffer(honaReceivers receiver); |
||||
quint32 hsruParserInt123C(quint32 honaData,QList<HonaPacket> honaPacketList); |
|
||||
|
bool isValid(HonaPacket hp); |
||||
|
|
||||
|
public: |
||||
|
|
||||
signals: |
signals: |
||||
void lowLevelHonaData(QList<HonaPacket> honaPacketList, quint32 hsruLoss, quint32 Doa); |
void lowLevelHonaData(QList<HonaPacket> &honaPacketList, quint32 hsruLoss, quint32 Doa); |
||||
|
|
||||
//uncrustify off
|
//uncrustify off
|
||||
public slots: |
public slots: |
||||
//uncrustify on
|
//uncrustify on
|
||||
}; |
}; |
||||
|
|
||||
#endif //HONALOWLEVELAPI_H
|
#endif //HONALOWLEVELAPI_H
|
||||
|
@ -1,186 +1,185 @@ |
|||||
#include "include/API/HonaAPI.h" |
#include "include/API/HonaAPI.h" |
||||
|
|
||||
/*************************************************************************************************/ |
/*************************************************************************************************/ |
||||
|
|
||||
ApiResult HonaAPI::isHsruStarted() |
ApiResult HonaAPI::isHsruStarted() |
||||
{ |
{ |
||||
try { |
try { |
||||
if(_honaLowLevelAPI.isHsruStarted()) |
if(_honaLowLevelAPI.isHsruStarted()) |
||||
return ApiResult::success; |
return ApiResult::success; |
||||
} |
} |
||||
catch(HonaException ex) |
catch(HonaException ex) |
||||
{ |
{ |
||||
return ApiResult::error; |
return ApiResult::error; |
||||
} |
} |
||||
|
|
||||
return ApiResult::success; |
return ApiResult::success; |
||||
} |
} |
||||
|
|
||||
/*************************************************************************************************/ |
/*************************************************************************************************/ |
||||
ApiResult HonaAPI::isHiruStarted() |
ApiResult HonaAPI::isHiruStarted() |
||||
{ |
{ |
||||
try { |
try { |
||||
if(_honaLowLevelAPI.isHiruStarted()) |
if(_honaLowLevelAPI.isHiruStarted()) |
||||
return ApiResult::success; |
return ApiResult::success; |
||||
} |
} |
||||
catch(HonaException ex) |
catch(HonaException ex) |
||||
{ |
{ |
||||
return ApiResult::error; |
return ApiResult::error; |
||||
} |
} |
||||
|
|
||||
return ApiResult::success; |
return ApiResult::success; |
||||
} |
} |
||||
|
|
||||
/*************************************************************************************************/ |
/*************************************************************************************************/ |
||||
ApiResult HonaAPI::deviceReset() |
ApiResult HonaAPI::deviceReset() |
||||
{ |
{ |
||||
try { |
try { |
||||
_honaLowLevelAPI.deviceReset(); |
_honaLowLevelAPI.deviceReset(); |
||||
} |
} |
||||
catch(HonaException ex) |
catch(HonaException ex) |
||||
{ |
{ |
||||
return ApiResult::error; |
return ApiResult::error; |
||||
} |
} |
||||
catch(HonaAlreadyStartedException ex) |
catch(HonaAlreadyStartedException ex) |
||||
{ |
{ |
||||
return ApiResult::error; |
return ApiResult::error; |
||||
} |
} |
||||
|
|
||||
return ApiResult::success; |
return ApiResult::success; |
||||
} |
} |
||||
|
|
||||
/*************************************************************************************************/ |
/*************************************************************************************************/ |
||||
ApiResult HonaAPI::setConfig(HonaSettings& settings) |
ApiResult HonaAPI::setConfig(HonaSettings& settings) |
||||
{ |
{ |
||||
try { |
try { |
||||
_honaLowLevelAPI.setConfig(settings); |
_honaLowLevelAPI.setConfig(settings); |
||||
} |
} |
||||
catch(HonaException ex) |
catch(HonaException ex) |
||||
{ |
{ |
||||
return ApiResult::error; |
return ApiResult::error; |
||||
} |
} |
||||
catch(HonaAlreadyStartedException ex) |
catch(HonaAlreadyStartedException ex) |
||||
{ |
{ |
||||
return ApiResult::error; |
return ApiResult::error; |
||||
} |
} |
||||
|
|
||||
return ApiResult::success; |
return ApiResult::success; |
||||
} |
} |
||||
|
|
||||
/*************************************************************************************************/ |
/*************************************************************************************************/ |
||||
ApiResult HonaAPI::getConfig(HonaSettings& settings) |
ApiResult HonaAPI::getConfig(HonaSettings& settings) |
||||
{ |
{ |
||||
try { |
try { |
||||
settings = _honaLowLevelAPI.getConfig(); |
settings = _honaLowLevelAPI.getConfig(); |
||||
} |
} |
||||
catch(HonaException ex) |
catch(HonaException ex) |
||||
{ |
{ |
||||
return ApiResult::error; |
return ApiResult::error; |
||||
} |
} |
||||
|
|
||||
return ApiResult::success; |
return ApiResult::success; |
||||
} |
} |
||||
|
|
||||
/*************************************************************************************************/ |
/*************************************************************************************************/ |
||||
ApiResult HonaAPI::getSwVersion(QString& swVerion) |
ApiResult HonaAPI::getSwVersion(QString& swVerion) |
||||
{ |
{ |
||||
try { |
try { |
||||
swVerion = _honaLowLevelAPI.getSwVersion(); |
swVerion = _honaLowLevelAPI.getSwVersion(); |
||||
} |
} |
||||
catch(HonaException ex) |
catch(HonaException ex) |
||||
{ |
{ |
||||
return ApiResult::error; |
return ApiResult::error; |
||||
} |
} |
||||
|
|
||||
return ApiResult::success; |
return ApiResult::success; |
||||
} |
} |
||||
|
|
||||
/*************************************************************************************************/ |
/*************************************************************************************************/ |
||||
ApiResult HonaAPI::getDeviceId(QString& deviceId) |
ApiResult HonaAPI::getDeviceId(QString& deviceId) |
||||
{ |
{ |
||||
try { |
try { |
||||
deviceId = _honaLowLevelAPI.getDeviceId(); |
deviceId = _honaLowLevelAPI.getDeviceId(); |
||||
} |
} |
||||
catch(HonaException ex) |
catch(HonaException ex) |
||||
{ |
{ |
||||
return ApiResult::error; |
return ApiResult::error; |
||||
} |
} |
||||
|
|
||||
return ApiResult::success; |
return ApiResult::success; |
||||
} |
} |
||||
|
|
||||
/*************************************************************************************************/ |
/*************************************************************************************************/ |
||||
ApiResult HonaAPI::hsruStart() |
ApiResult HonaAPI::hsruStart() |
||||
{ |
{ |
||||
try { |
try { |
||||
_honaLowLevelAPI.hsruStart(); |
_honaLowLevelAPI.hsruStart(); |
||||
} |
} |
||||
catch(HonaException ex) |
catch(HonaException ex) |
||||
{ |
{ |
||||
return ApiResult::error; |
return ApiResult::error; |
||||
} |
} |
||||
catch(HonaAlreadyStartedException ex) |
catch(HonaAlreadyStartedException ex) |
||||
{ |
{ |
||||
return ApiResult::error; |
return ApiResult::error; |
||||
} |
} |
||||
|
|
||||
return ApiResult::success; |
return ApiResult::success; |
||||
} |
} |
||||
|
|
||||
/*************************************************************************************************/ |
/*************************************************************************************************/ |
||||
ApiResult HonaAPI::hiruStart() |
ApiResult HonaAPI::hiruStart() |
||||
{ |
{ |
||||
try { |
try { |
||||
_honaLowLevelAPI.hiruStart(); |
_honaLowLevelAPI.hiruStart(); |
||||
} |
} |
||||
catch(HonaException ex) |
catch(HonaException ex) |
||||
{ |
{ |
||||
return ApiResult::error; |
return ApiResult::error; |
||||
} |
} |
||||
catch(HonaAlreadyStartedException ex) |
catch(HonaAlreadyStartedException ex) |
||||
{ |
{ |
||||
return ApiResult::error; |
return ApiResult::error; |
||||
} |
} |
||||
|
|
||||
return ApiResult::success; |
return ApiResult::success; |
||||
} |
} |
||||
|
|
||||
/*************************************************************************************************/ |
/*************************************************************************************************/ |
||||
ApiResult HonaAPI::hsruStop() |
ApiResult HonaAPI::hsruStop() |
||||
{ |
{ |
||||
try { |
try { |
||||
_honaLowLevelAPI.hsruStop(); |
_honaLowLevelAPI.hsruStop(); |
||||
} |
} |
||||
catch(HonaException ex) |
catch(HonaException ex) |
||||
{ |
{ |
||||
return ApiResult::error; |
return ApiResult::error; |
||||
} |
} |
||||
catch(HonaAlreadyStartedException ex) |
catch(HonaAlreadyStartedException ex) |
||||
{ |
{ |
||||
return ApiResult::error; |
return ApiResult::error; |
||||
} |
} |
||||
|
|
||||
return ApiResult::success; |
return ApiResult::success; |
||||
} |
} |
||||
|
|
||||
/*************************************************************************************************/ |
/*************************************************************************************************/ |
||||
ApiResult HonaAPI::init() |
ApiResult HonaAPI::init() |
||||
{ |
{ |
||||
connect(&_honaLowLevelAPI, &HonaLowLevelAPI::lowLevelHonaData, this, &HonaAPI::honaDataResult); |
connect(&_honaLowLevelAPI, &HonaLowLevelAPI::lowLevelHonaData, this, &HonaAPI::honaDataResult,Qt::BlockingQueuedConnection); |
||||
|
|
||||
try { |
try { |
||||
_honaLowLevelAPI.init(); |
_honaLowLevelAPI.init(); |
||||
} |
} |
||||
catch(HonaException ex) |
catch(HonaException ex) |
||||
{ |
{ |
||||
return ApiResult::error; |
return ApiResult::error; |
||||
} |
} |
||||
catch(HonaAlreadyStartedException ex) |
catch(HonaAlreadyStartedException ex) |
||||
{ |
{ |
||||
return ApiResult::error; |
return ApiResult::error; |
||||
} |
} |
||||
|
|
||||
return ApiResult::success; |
return ApiResult::success; |
||||
} |
} |
||||
|
|
||||
/*************************************************************************************************/ |
/*************************************************************************************************/ |
||||
|
File diff suppressed because it is too large
@ -1,72 +1,75 @@ |
|||||
#include "MainWindow.h" |
#include "MainWindow.h" |
||||
#include "ui_MainWindow.h" |
#include "ui_MainWindow.h" |
||||
HonaAPI _honaAPI; |
|
||||
|
|
||||
MainWindow::MainWindow(QWidget* parent) |
MainWindow::MainWindow(QWidget* parent) |
||||
: QMainWindow(parent) |
: QMainWindow(parent) |
||||
, ui(new Ui::MainWindow) |
, ui(new Ui::MainWindow) |
||||
{ |
{ |
||||
ui->setupUi(this); |
ui->setupUi(this); |
||||
connect(&_honaAPI, &HonaAPI::honaDataResult, this, &MainWindow::honaDataResultUi); |
connect(&_honaAPI, &HonaAPI::honaDataResult, this, &MainWindow::honaDataResultUi); |
||||
} |
} |
||||
|
|
||||
MainWindow::~MainWindow() |
MainWindow::~MainWindow() |
||||
{ |
{ |
||||
delete ui; |
delete ui; |
||||
} |
} |
||||
|
|
||||
/*************************************************************************************************/ |
/*************************************************************************************************/ |
||||
void MainWindow::honaDataResultUi(QList<HonaPacket> honaPacketList, quint32 hsruLoss, quint32 Doa) |
void MainWindow::honaDataResultUi(QList<HonaPacket> &honaPacketList, quint32 hsruLoss, quint32 Doa) |
||||
{ |
{ |
||||
qDebug() << "honaDataResultUi inside " << honaPacketList.length(); |
QString _str; |
||||
QString _str; |
for(auto i = 0; i < honaPacketList.length(); i++) |
||||
for(auto i = 0; i < honaPacketList.length(); i++) |
{ |
||||
{ |
_str += "\n[hsruLoss] :" + QString::number(hsruLoss, 16); |
||||
_str = "[" + QString::number(i) + "] " + "0x hsruLoss" + QString::number(hsruLoss); |
_str += "\n[getToa] :" + QString::number(honaPacketList[i].getToa(), 16); |
||||
_str += "\n *********************************************"; |
_str += "\n[getDoa] :" + QString::number(honaPacketList[i].getDoa(), 16); |
||||
} |
_str += "\n[getPa1] :" + QString::number(honaPacketList[i].getPa1(), 16); |
||||
|
_str += "\n[getPa2] :" + QString::number(honaPacketList[i].getPa2(), 16); |
||||
|
_str += "\n[getPa3] :" + QString::number(honaPacketList[i].getPa3(), 16); |
||||
|
_str += "\n[getPa4] :" + QString::number(honaPacketList[i].getPa4(), 16); |
||||
|
_str += "\n[getCode] :" + QString::number(honaPacketList[i].getCode(), 16); |
||||
|
_str += "\n[getCodeL] :" + QString::number(honaPacketList[i].getCodeL(), 16); |
||||
|
_str += "\n[getCodeM] :" + QString::number(honaPacketList[i].getCodeM(), 16); |
||||
|
} |
||||
|
|
||||
ui->dataFromMemory->setText(_str); |
ui->dataFromMemory->setText(_str); |
||||
} |
} |
||||
|
|
||||
void MainWindow::on_testPLX_clicked() |
void MainWindow::on_testPLX_clicked() |
||||
{ |
{ |
||||
ApiResult _resultInit = _honaAPI.init(); |
ApiResult _resultInit = _honaAPI.init(); |
||||
//ApiResult _deviceReset = _honaAPI.deviceReset();
|
ApiResult _hsruStartResult = _honaAPI.hsruStart(); |
||||
//HonaSettings settings;
|
|
||||
//ApiResult _configResult = _honaAPI.setConfig(settings);
|
|
||||
//ApiResult isHsruStarted = _honaAPI.isHsruStarted();
|
|
||||
ApiResult _hsruStartResult = _honaAPI.hsruStart(); |
|
||||
|
|
||||
//********************************************************
|
//********************************************************
|
||||
QString temp = ui->errorMonitoring->text(); |
QString temp = ui->errorMonitoring->text(); |
||||
if(_resultInit == ApiResult::error) |
if(_resultInit == ApiResult::error) |
||||
{ |
{ |
||||
ui->errorMonitoring->setText(temp + "\n" + " Error _resultInit"); |
ui->errorMonitoring->setText(temp + "\n" + " Error _resultInit"); |
||||
} |
} |
||||
else if(_resultInit == ApiResult::success) |
else if(_resultInit == ApiResult::success) |
||||
{ |
{ |
||||
ui->errorMonitoring->setText(temp + "\n" + "success _resultInit"); |
ui->errorMonitoring->setText(temp + "\n" + "success _resultInit"); |
||||
} |
} |
||||
//********************************************************
|
//********************************************************
|
||||
|
|
||||
if(_hsruStartResult == ApiResult::error) |
if(_hsruStartResult == ApiResult::error) |
||||
{ |
{ |
||||
ui->errorMonitoring->setText(temp + "\n" + " Error _hsruStartResult"); |
ui->errorMonitoring->setText(temp + "\n" + " Error _hsruStartResult"); |
||||
} |
} |
||||
else if(_hsruStartResult == ApiResult::success) |
else if(_hsruStartResult == ApiResult::success) |
||||
{ |
{ |
||||
ui->errorMonitoring->setText(temp + "\n" + " success _hsruStartResult"); |
ui->errorMonitoring->setText(temp + "\n" + " success _hsruStartResult"); |
||||
} |
} |
||||
//********************************************************
|
//********************************************************
|
||||
} |
} |
||||
|
|
||||
void MainWindow::on_stopHsru_clicked() |
void MainWindow::on_stopHsru_clicked() |
||||
{ |
{ |
||||
QString temp = ui->errorMonitoring->text(); |
QString temp = ui->errorMonitoring->text(); |
||||
ApiResult _hsruStop = _honaAPI.hsruStop(); |
ApiResult _hsruStop = _honaAPI.hsruStop(); |
||||
if(_hsruStop == ApiResult::error) |
if(_hsruStop == ApiResult::error) |
||||
{ |
{ |
||||
ui->errorMonitoring->setText(temp + "\n" + " success _hsruStartResult"); |
ui->errorMonitoring->setText(temp + "\n" + " success _hsruStartResult"); |
||||
} |
} |
||||
} |
} |
||||
|
@ -0,0 +1 @@ |
|||||
|
*.pro.user |
Loading…
Reference in new issue