25개 이상의 토픽을 선택하실 수 없습니다.
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- #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();
- w->show();
-
- 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;
-
- }
|