Você não pode selecionar mais de 25 tópicos
Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
|
- #include "CableTestBench.h"
- #include <QDateTime>
-
- CCableTestBench::CCableTestBench(QObject *parent) :
- QObject(parent)
- {
- w = new MainWindow(0,this);
-
- }
-
- CCableTestBench::~CCableTestBench()
- {
- delete w;
- }
-
- int CCableTestBench::Start()
- {
- w->showMaximized();
-
- mMainPageHandle = w->mMainPage;
- mVisualInspPageHandle = w->mVisualInspPage;
-
- return 1;
- }
-
-
- quint8 CCableTestBench::DecToBCDByte(const quint8 byte)
- {
- quint8 out = 0;
-
- out = ((byte/10) << 4) + (byte%10);
-
-
- return out;
-
- }
-
- quint16 CCableTestBench::DecToBCDWord(const quint16 word)
- {
- quint16 out = 0;
- quint16 temp = 0;
-
- out = word % 10;
- temp = (((word /10) % 10) << 4);
- out += temp;
- temp = (((word / 100) % 10) << 8);
- out += temp;
- temp = (((word / 1000) % 10) << 12);
- out += temp;
-
- return out;
-
- }
|