-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHardwareSetting_ScanHead.cpp
executable file
·91 lines (73 loc) · 1.99 KB
/
HardwareSetting_ScanHead.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
// HardwareSetting_ScanHead.cpp : 实现文件
//
#include "stdafx.h"
#include "LaserScan.h"
#include "HardwareSetting_ScanHead.h"
#include "RTC5impl.hpp"
#include "LaserScanDoc.h"
// CHardwareSetting_ScanHead 对话框
IMPLEMENT_DYNAMIC(CHardwareSetting_ScanHead, CDialog)
CHardwareSetting_ScanHead::CHardwareSetting_ScanHead(CWnd* pParent /*=NULL*/)
: CDialog(CHardwareSetting_ScanHead::IDD, pParent)
, ScanHead_bit3(_T(""))
, ScanHead_bit4(_T(""))
, ScanHead_bit6(_T(""))
, ScanHead_bit7(_T(""))
{
}
CHardwareSetting_ScanHead::~CHardwareSetting_ScanHead()
{
}
void CHardwareSetting_ScanHead::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Text(pDX, IDC_STATIC_Px_Error, ScanHead_bit3);
DDX_Text(pDX, IDC_STATIC_Py_Error, ScanHead_bit4);
DDX_Text(pDX, IDC_STATIC_Ts_Error, ScanHead_bit6);
DDX_Text(pDX, IDC_STATIC_Ps_Error, ScanHead_bit7);
}
BEGIN_MESSAGE_MAP(CHardwareSetting_ScanHead, CDialog)
END_MESSAGE_MAP()
// CHardwareSetting_ScanHead 消息处理程序
BOOL CHardwareSetting_ScanHead::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: 在此添加额外的初始化
set_start_list(1);
UINT query=get_head_status(1);
set_end_of_list();
execute_list(1);
CLaserScanDoc::s_HeadStatus=query;
UINT bit;
bit=query % 2;
query=query/2;
bit=query % 2;
query=query/2;
bit=query % 2;
query=query/2;
bit=query % 2;
query=query/2;
//bit3=bit;
if (bit) ScanHead_bit3="OK";
else ScanHead_bit3="ERROR";
bit=query % 2;
query=query/2;
//bit4=bit;
if (bit) ScanHead_bit4="OK";
else ScanHead_bit4="ERROR";
bit=query % 2;
query=query/2;
bit=query % 2;
query=query/2;
//bit6=bit;
if (bit) ScanHead_bit6="OK";
else ScanHead_bit6="ERROR";
bit=query % 2;
query=query/2;
//bit7=bit;
if (bit) ScanHead_bit7="OK";
else ScanHead_bit7="ERROR";
UpdateData(0);
return TRUE; // return TRUE unless you set the focus to a control
// 异常: OCX 属性页应返回 FALSE
}