Browse Source

fix some code

heydari
Alireza 3 years ago
parent
commit
310e843d28
  1. 5
      Plx/include/LowLevel/HonaLowLevelAPI.h
  2. 99
      Plx/include/LowLevel/HonaPacket.h
  3. 41
      Plx/include/LowLevel/Setting/Setting.h

5
Plx/include/LowLevel/HonaLowLevelAPI.h

@ -3,6 +3,9 @@
#include <QObject> #include <QObject>
#include "LowLevel/Setting/Setting.h"
#include "HonaPacket.h"
class HonaLowLevelAPI : public QObject class HonaLowLevelAPI : public QObject
{ {
Q_OBJECT Q_OBJECT
@ -29,7 +32,7 @@ private:
int hiruGetDOA(); int hiruGetDOA();
signals: signals:
void signalToTop(QList<&HonaPacket> honaPacketList, int i, int j); void signalToTop(QList<HonaPacket*> honaPacketList, int i, int j);
//uncrustify off //uncrustify off
public slots: public slots:
//uncrustify on //uncrustify on

99
Plx/include/LowLevel/HonaPacket.h

@ -2,62 +2,61 @@
#define HONAPACKET_H #define HONAPACKET_H
#include <QtGlobal> #include <QtGlobal>
#include "include/LowLevel/Utils/Utils.h"
#include "include/LowLevel/Utils/Utils.h"
class HonaPacket class HonaPacket
{ {
private: private:
qreal toaClock;
qreal toaClock; honaPacketType m_PacketType;
honaPacketType m_PacketType; quint32 m_PacketNumber;
quint32 m_PacketNumber; qulonglong m_Toa;
qulonglong m_Toa; quint32 m_Doa;
quint32 m_Doa; quint32 m_Pa1;
quint32 m_Pa1; quint32 m_Pa2;
quint32 m_Pa2; quint32 m_Pa3;
quint32 m_Pa3; quint32 m_Pa4;
quint32 m_Pa4; quint32 m_Code;
quint32 m_Code; quint32 m_CodeL;
quint32 m_CodeL; quint32 m_CodeM;
quint32 m_CodeM;
public: public:
HonaPacket(); HonaPacket();
/******************************************************************/ /******************************************************************/
honaPacketType getPacketType(void); honaPacketType getPacketType();
void setPacketType(honaPacketType &temp); void setPacketType(honaPacketType& temp);
/******************************************************************/ /******************************************************************/
quint32 getPacketNumber(void); quint32 getPacketNumber();
void setPacketNumber(quint32 temp); void setPacketNumber(quint32 temp);
/******************************************************************/ /******************************************************************/
qulonglong getToa(void); qulonglong getToa();
void setToa(qulonglong temp); void setToa(qulonglong temp);
/******************************************************************/ /******************************************************************/
quint32 getDoa(void); quint32 getDoa();
void setDoa(quint32 temp); void setDoa(quint32 temp);
/******************************************************************/ /******************************************************************/
quint32 getPa1(void); quint32 getPa1();
void setPa1(quint32 temp); void setPa1(quint32 temp);
/******************************************************************/ /******************************************************************/
quint32 getPa2(void); quint32 getPa2();
void setPa2(quint32 temp); void setPa2(quint32 temp);
/******************************************************************/ /******************************************************************/
quint32 getPa3(void); quint32 getPa3();
void setPa3(quint32 temp); void setPa3(quint32 temp);
/******************************************************************/ /******************************************************************/
quint32 getPa4(void); quint32 getPa4();
void setPa4(quint32 temp); void setPa4(quint32 temp);
/******************************************************************/ /******************************************************************/
quint32 getCode(void); quint32 getCode();
void setCode(quint32 temp); void setCode(quint32 temp);
/******************************************************************/ /******************************************************************/
quint32 getCodeL(void); quint32 getCodeL();
void setCodeL(quint32 temp); void setCodeL(quint32 temp);
/******************************************************************/ /******************************************************************/
quint32 getCodeM(void); quint32 getCodeM();
void setCodeM(quint32 temp); void setCodeM(quint32 temp);
/******************************************************************/ /******************************************************************/
}; };
#endif // HONAPACKET_H #endif //HONAPACKET_H

41
Plx/include/LowLevel/Setting/Setting.h

@ -1,4 +1,3 @@
#ifndef SETTINGS_H #ifndef SETTINGS_H
#define SETTINGS_H #define SETTINGS_H
@ -8,34 +7,32 @@
/***********************************************************************************************/ /***********************************************************************************************/
typedef struct _HIRUSETTINGS typedef struct _HIRUSETTINGS
{ {
recorderStart recordStard; recorderStart recordStard;
recorderMode recordMode; recorderMode recordMode;
quint32 recordChannel; quint32 recordChannel;
quint32 threshold = 0; quint32 threshold = 0;
quint32 timeout = 1000; quint32 timeout = 1000;
quint32 count = 5; quint32 count = 5;
}hiruSettings; }hiruSettings;
/***********************************************************************************************/ /***********************************************************************************************/
typedef struct _HSRUSETTINGS typedef struct _HSRUSETTINGS
{ {
bool isReal = true; bool isReal = true;
quint32 honaInt123CTHR = 128; quint32 honaInt123CTHR = 128;
quint32 honaRes123CTHR = 128; quint32 honaRes123CTHR = 128;
quint32 honaIntSTHR = 20; quint32 honaIntSTHR = 20;
quint32 honaResSTHR = 20; quint32 honaResSTHR = 20;
quint32 honaSPTHR = 20; //mode4 quint32 honaSPTHR = 20; //mode4
quint32 intM4_THR = 20; //mode4 quint32 intM4_THR = 20; //mode4
quint32 resM4_THR = 20; //mode4 quint32 resM4_THR = 20; //mode4
}hsruSettings; }hsruSettings;
/***********************************************************************************************/ /***********************************************************************************************/
typedef struct _HONASETTINGS struct HonaSetting
{ {
quint32 hsruSettings; quint32 hsruSettings;
quint32 hiruSettings; quint32 hiruSettings;
};
}honaSettings;
/***********************************************************************************************/ /***********************************************************************************************/
#endif // SETTING_H #endif //SETTING_H

Loading…
Cancel
Save