Commit 9eb7960821c89241c95f646a0aeb294bf3a51ce4

Authored by xiemeng
1 parent 1c7a5fa4

update 20210201

... ... @@ -53,6 +53,11 @@ CString GetCurrPath();
53 53 BOOL CBlueFlashToolApp::InitInstance()
54 54 {
55 55 CString strglobalpath;
  56 + if(MAX_TOPWELL_DEVICE_NUM > 25)
  57 + {
  58 + ::AfxMessageBox("算了吧",MB_ICONSTOP);
  59 + return FALSE;
  60 + }
56 61 AfxEnableControlContainer();
57 62
58 63 // Standard initialization
... ... @@ -104,6 +109,14 @@ bool CBlueFlashToolApp::LoadConfigs(void)
104 109 g_AppMainData.SN_end = g_globalini.ReadInt("SN_Config","SN_end");
105 110 g_AppMainData.SN_cur = g_globalini.ReadInt("SN_Config","SN_cur");
106 111
  112 + g_AppMainData.if_same_btname = g_globalini.ReadBool("BT_name_Config","Btname_same");
  113 + g_AppMainData.btname_head = g_globalini.ReadString("BT_name_Config","Btname_head");
  114 + g_AppMainData.btname_start = g_globalini.ReadInt("BT_name_Config","Btname_start");
  115 + g_AppMainData.btname_end = g_globalini.ReadInt("BT_name_Config","Btname_end");
  116 + g_AppMainData.btname_cur = g_globalini.ReadInt("BT_name_Config","Btname_cur");
  117 +
  118 +
  119 +
107 120 g_AppMainData.com_config.aBandrate = g_globalini.ReadInt("UART_Config","波特率");
108 121 g_AppMainData.com_config.bcheck = g_globalini.ReadInt("UART_Config","校验位");
109 122 g_AppMainData.com_config.cdatabit = g_globalini.ReadInt("UART_Config","数据位");
... ... @@ -134,26 +147,7 @@ bool CBlueFlashToolApp::LoadConfigs(void)
134 147 g_AppMainData.FilePathUsb= g_globalini.ReadString("BinFilePath","UsbBin");
135 148
136 149
137   - g_AppMainData.if_flash[BLUE_TYPE_EAR][0] = g_globalini.ReadBool("Other_Config","ear_enable1");
138   - g_AppMainData.if_flash[BLUE_TYPE_EAR][1] = g_globalini.ReadBool("Other_Config","ear_enable2");
139   - g_AppMainData.if_flash[BLUE_TYPE_EAR][2] = g_globalini.ReadBool("Other_Config","ear_enable3");
140   - g_AppMainData.if_flash[BLUE_TYPE_EAR][3] = g_globalini.ReadBool("Other_Config","ear_enable4");
141   - g_AppMainData.if_flash[BLUE_TYPE_EAR][4] = g_globalini.ReadBool("Other_Config","ear_enable5");
142   - g_AppMainData.if_flash[BLUE_TYPE_EAR][5] = g_globalini.ReadBool("Other_Config","ear_enable6");
143   - g_AppMainData.if_flash[BLUE_TYPE_EAR][6] = g_globalini.ReadBool("Other_Config","ear_enable7");
144   - g_AppMainData.if_flash[BLUE_TYPE_EAR][7] = g_globalini.ReadBool("Other_Config","ear_enable8");
145   - g_AppMainData.if_flash[BLUE_TYPE_EAR][8] = g_globalini.ReadBool("Other_Config","ear_enable9");
146   - g_AppMainData.if_flash[BLUE_TYPE_EAR][9] = g_globalini.ReadBool("Other_Config","ear_enable10");
147   - g_AppMainData.if_flash[BLUE_TYPE_USB][0] = g_globalini.ReadBool("Other_Config","usb_enable1");
148   - g_AppMainData.if_flash[BLUE_TYPE_USB][1] = g_globalini.ReadBool("Other_Config","usb_enable2");
149   - g_AppMainData.if_flash[BLUE_TYPE_USB][2] = g_globalini.ReadBool("Other_Config","usb_enable3");
150   - g_AppMainData.if_flash[BLUE_TYPE_USB][3] = g_globalini.ReadBool("Other_Config","usb_enable4");
151   - g_AppMainData.if_flash[BLUE_TYPE_USB][4] = g_globalini.ReadBool("Other_Config","usb_enable5");
152   - g_AppMainData.if_flash[BLUE_TYPE_USB][5] = g_globalini.ReadBool("Other_Config","usb_enable6");
153   - g_AppMainData.if_flash[BLUE_TYPE_USB][6] = g_globalini.ReadBool("Other_Config","usb_enable7");
154   - g_AppMainData.if_flash[BLUE_TYPE_USB][7] = g_globalini.ReadBool("Other_Config","usb_enable8");
155   - g_AppMainData.if_flash[BLUE_TYPE_USB][8] = g_globalini.ReadBool("Other_Config","usb_enable9");
156   - g_AppMainData.if_flash[BLUE_TYPE_USB][9] = g_globalini.ReadBool("Other_Config","usb_enable10");
  150 +
157 151
158 152
159 153
... ... @@ -187,6 +181,17 @@ bool CBlueFlashToolApp::SaveConfigs(void)
187 181 g_globalini.WriteInt("SN_Config","SN_end",g_AppMainData.SN_end);
188 182 g_globalini.WriteInt("SN_Config","SN_cur",g_AppMainData.SN_cur);
189 183
  184 +
  185 + g_globalini.WriteBool("BT_name_Config","Btname_same",g_AppMainData.if_same_btname);
  186 + g_globalini.WriteString("BT_name_Config","Btname_head",g_AppMainData.btname_head);
  187 + g_globalini.WriteInt("BT_name_Config","Btname_start",g_AppMainData.btname_start);
  188 + g_globalini.WriteInt("BT_name_Config","Btname_end",g_AppMainData.btname_end);
  189 + g_globalini.WriteInt("BT_name_Config","Btname_cur",g_AppMainData.btname_cur);
  190 +
  191 +
  192 +
  193 +
  194 +
190 195 g_globalini.WriteInt("UART_Config","波特率",g_AppMainData.com_config.aBandrate);
191 196 g_globalini.WriteInt("UART_Config","校验位",g_AppMainData.com_config.bcheck);
192 197 g_globalini.WriteInt("UART_Config","数据位",g_AppMainData.com_config.cdatabit);
... ... @@ -219,26 +224,6 @@ bool CBlueFlashToolApp::SaveConfigs(void)
219 224
220 225
221 226
222   - g_globalini.WriteBool("Other_Config","ear_enable1",g_AppMainData.if_flash[BLUE_TYPE_EAR][0]);
223   - g_globalini.WriteBool("Other_Config","ear_enable2",g_AppMainData.if_flash[BLUE_TYPE_EAR][1]);
224   - g_globalini.WriteBool("Other_Config","ear_enable3",g_AppMainData.if_flash[BLUE_TYPE_EAR][2]);
225   - g_globalini.WriteBool("Other_Config","ear_enable4",g_AppMainData.if_flash[BLUE_TYPE_EAR][3]);
226   - g_globalini.WriteBool("Other_Config","ear_enable5",g_AppMainData.if_flash[BLUE_TYPE_EAR][4]);
227   - g_globalini.WriteBool("Other_Config","ear_enable6",g_AppMainData.if_flash[BLUE_TYPE_EAR][5]);
228   - g_globalini.WriteBool("Other_Config","ear_enable7",g_AppMainData.if_flash[BLUE_TYPE_EAR][6]);
229   - g_globalini.WriteBool("Other_Config","ear_enable8",g_AppMainData.if_flash[BLUE_TYPE_EAR][7]);
230   - g_globalini.WriteBool("Other_Config","ear_enable9",g_AppMainData.if_flash[BLUE_TYPE_EAR][8]);
231   - g_globalini.WriteBool("Other_Config","ear_enable10",g_AppMainData.if_flash[BLUE_TYPE_EAR][9]);
232   - g_globalini.WriteBool("Other_Config","usb_enable1",g_AppMainData.if_flash[BLUE_TYPE_USB][0]);
233   - g_globalini.WriteBool("Other_Config","usb_enable2",g_AppMainData.if_flash[BLUE_TYPE_USB][1]);
234   - g_globalini.WriteBool("Other_Config","usb_enable3",g_AppMainData.if_flash[BLUE_TYPE_USB][2]);
235   - g_globalini.WriteBool("Other_Config","usb_enable4",g_AppMainData.if_flash[BLUE_TYPE_USB][3]);
236   - g_globalini.WriteBool("Other_Config","usb_enable5",g_AppMainData.if_flash[BLUE_TYPE_USB][4]);
237   - g_globalini.WriteBool("Other_Config","usb_enable6",g_AppMainData.if_flash[BLUE_TYPE_USB][5]);
238   - g_globalini.WriteBool("Other_Config","usb_enable7",g_AppMainData.if_flash[BLUE_TYPE_USB][6]);
239   - g_globalini.WriteBool("Other_Config","usb_enable8",g_AppMainData.if_flash[BLUE_TYPE_USB][7]);
240   - g_globalini.WriteBool("Other_Config","usb_enable9",g_AppMainData.if_flash[BLUE_TYPE_USB][8]);
241   - g_globalini.WriteBool("Other_Config","usb_enable10",g_AppMainData.if_flash[BLUE_TYPE_USB][9]);
242 227
243 228 return true;
244 229 }
... ... @@ -308,9 +293,10 @@ BOOL QuerySingleSerialPortEx(int nPort)
308 293
309 294 //利用API查询指定范围内的串口状态信息,并分别返回指定范围内系统存在的串口,
310 295 //当前未被占用的可用串口,已被占用的串口和系统不存在的串口
311   -void QuerySerialPortStatusEx(CStringArray& cStrAryExistPort,\
312   - CStringArray& cStrAryNoneOpenedPort,CStringArray& cStrAryAlreadyOpenedPort,\
313   - CStringArray& cStrAryNotExistPort,int nStartPort,int nLastPort)
  296 +void QuerySerialPortStatusEx(CWordArray& cAryExistPort,
  297 + CWordArray& cAryNoneOpenedPort,
  298 + CWordArray& cAryAlreadyOpenedPort,
  299 + CWordArray& cAryNotExistPort,int nStartPort,int nLastPort)
314 300 {
315 301 CString strTmp,strComm,strFree;
316 302 //对输入的参数进行检查
... ... @@ -322,10 +308,10 @@ void QuerySerialPortStatusEx(CStringArray& cStrAryExistPort,\
322 308 nStartPort = min(n1,n2);
323 309 nLastPort = max(n1,n2);
324 310
325   - cStrAryExistPort.RemoveAll();
326   - cStrAryNoneOpenedPort.RemoveAll();
327   - cStrAryAlreadyOpenedPort.RemoveAll();
328   - cStrAryNotExistPort.RemoveAll();
  311 + cAryExistPort.RemoveAll();
  312 + cAryNoneOpenedPort.RemoveAll();
  313 + cAryAlreadyOpenedPort.RemoveAll();
  314 + cAryNotExistPort.RemoveAll();
329 315
330 316 HANDLE hComm;
331 317 int nAccum = 0;
... ... @@ -346,22 +332,22 @@ void QuerySerialPortStatusEx(CStringArray& cStrAryExistPort,\
346 332 {//***********如果没有该设备,或者被其他应用程序在用********
347 333 if (2 == nLastError)
348 334 {//串口不存在
349   - cStrAryNotExistPort.Add(strComm);
  335 + cAryNotExistPort.Add(i);
350 336 }
351 337 else if(5 == nLastError)
352 338 {//串口已被占用
353   - cStrAryExistPort.Add(strComm);
354   - cStrAryAlreadyOpenedPort.Add(strComm);
  339 + cAryExistPort.Add(i);
  340 + cAryAlreadyOpenedPort.Add(i);
355 341 }
356 342 else
357 343 {//其他错误
358   - cStrAryExistPort.Add(strComm);
  344 + cAryExistPort.Add(i);
359 345 }
360 346 }
361 347 else
362 348 {//串口存在且未被占用
363   - cStrAryExistPort.Add(strComm);
364   - cStrAryNoneOpenedPort.Add(strComm);
  349 + cAryExistPort.Add(i);
  350 + cAryNoneOpenedPort.Add(i);
365 351 nAccum++;
366 352 }
367 353 CloseHandle(hComm); //关闭文件句柄 - 必要
... ...
... ... @@ -28,7 +28,8 @@
28 28
29 29 #define MAX_PATH 260
30 30 #define WM_UPDATEPOS WM_USER + 1000
31   -#define MAX_TOPWELL_DEVICE_NUM 15
  31 +// 设备数目, 最大不能超过25个
  32 +#define MAX_TOPWELL_DEVICE_NUM 12
32 33
33 34 typedef enum
34 35 {
... ... @@ -39,6 +40,17 @@ typedef enum
39 40
40 41 typedef struct
41 42 {
  43 + char topwell_for_search[20];
  44 + char project_version[128] ;
  45 + char bt_name[64];
  46 + char optek_link_group[3];
  47 +}topwell_SN_write_struct;
  48 +
  49 +
  50 +
  51 +
  52 +typedef struct
  53 +{
42 54 int aBandrate;
43 55 char bcheck;
44 56 char cdatabit;
... ... @@ -48,9 +60,6 @@ typedef struct
48 60 typedef struct
49 61 {
50 62 short ary_myComPort[BLUE_TYPE_MAX][MAX_TOPWELL_DEVICE_NUM];
51   - //short ary_myComPort[BLUE_TYPE_USB][10];
52   - BOOL if_flash[BLUE_TYPE_MAX][MAX_TOPWELL_DEVICE_NUM];
53   - //BOOL if_flash[BLUE_TYPE_USB][10];
54 63 short int_myComPortDebug;
55 64 com_config_struct com_config;
56 65 BOOL if_same_sn;
... ... @@ -58,6 +67,12 @@ typedef struct
58 67 int SN_start;
59 68 int SN_end;
60 69 int SN_cur;
  70 + BOOL if_same_btname;
  71 + CString btname_head;
  72 + int btname_start;
  73 + int btname_end;
  74 + int btname_cur;
  75 +
61 76 int int_ResendTime;
62 77 CString FilePathUsb;
63 78 CString FilePathEar;
... ... @@ -66,8 +81,13 @@ typedef struct
66 81 extern app_main_data_struct g_AppMainData;
67 82 extern CIniFile g_globalini;
68 83 BOOL QuerySingleSerialPortEx(int nPort);
69   -void QuerySerialPortStatusEx(CStringArray& cStrAryExistPort, CStringArray& cStrAryNoneOpenedPort,CStringArray& cStrAryAlreadyOpenedPort, CStringArray& cStrAryNotExistPort,int nStartPort,int nLastPort);
  84 +void QuerySerialPortStatusEx(CWordArray& cStrAryExistPort,
  85 + CWordArray& cStrAryNoneOpenedPort,
  86 + CWordArray& cStrAryAlreadyOpenedPort,
  87 + CWordArray& cStrAryNotExistPort,
  88 + int nStartPort,int nLastPort);
70 89 bool IsExistFile(CString strAbsolutefilePath);
  90 +CString GetCurrPath();
71 91
72 92
73 93 class CBlueFlashToolApp : public CWinApp
... ...
... ... @@ -13,7 +13,7 @@
13 13 #undef APSTUDIO_READONLY_SYMBOLS
14 14
15 15 /////////////////////////////////////////////////////////////////////////////
16   -// Chinese (P.R.C.) resources
  16 +// 中文(中华人民共和国) resources
17 17
18 18 #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)
19 19 #ifdef _WIN32
... ... @@ -79,9 +79,9 @@ EXSTYLE WS_EX_APPWINDOW
79 79 CAPTION "BlueFlashTool"
80 80 FONT 9, "宋体", 0, 0, 0x1
81 81 BEGIN
82   - PUSHBUTTON "全部开始",IDC_START_ALL,42,216,84,30
83   - PUSHBUTTON "全部停止",IDC_STOP_ALL,198,216,84,30
84   - PUSHBUTTON "参数设置",IDC_BUTTON_SETTING,466,216,84,30
  82 + PUSHBUTTON "全部开始",IDC_START_ALL,487,31,84,30
  83 + PUSHBUTTON "全部停止",IDC_STOP_ALL,487,66,84,30
  84 + PUSHBUTTON "参数设置",IDC_BUTTON_SETTING,487,161,84,30
85 85 CONTROL "",IDC_MSCOMM0,"{648A5600-2C6E-101B-82B6-000000000014}",WS_TABSTOP,0,300,25,25
86 86 CONTROL "",IDC_MSCOMM1,"{648A5600-2C6E-101B-82B6-000000000014}",WS_TABSTOP,0,300,25,25
87 87 CONTROL "",IDC_MSCOMM2,"{648A5600-2C6E-101B-82B6-000000000014}",WS_TABSTOP,0,300,25,25
... ... @@ -134,52 +134,34 @@ BEGIN
134 134 CONTROL "",IDC_MSCOMM49,"{648A5600-2C6E-101B-82B6-000000000014}",WS_TABSTOP,0,300,25,25
135 135 CONTROL "",IDC_MSCOMM50,"{648A5600-2C6E-101B-82B6-000000000014}",WS_TABSTOP,0,300,25,25
136 136 LISTBOX IDC_DEBUG_MESSAGE,0,261,591,41,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
137   - PUSHBUTTON "设备初始化",IDC_BUTTON_INIT_COMPORT,332,216,84,30
  137 + PUSHBUTTON "连接夹具",IDC_BUTTON_INIT_COMPORT,487,119,84,30
  138 + GROUPBOX "静态",IDC_STATIC_GROUP_EAR,39,27,48,40
  139 + GROUPBOX "静态",IDC_STATIC_GROUP_USB,317,104,48,40
  140 + GROUPBOX "静态",IDC_STATIC_GROUP_DEBUG_INFO,383,188,48,40
138 141 END
139 142
140   -IDD_SYSTEM_CONFIG DIALOGEX 0, 0, 289, 235
  143 +IDD_SYSTEM_CONFIG DIALOGEX 0, 0, 306, 261
141 144 STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
142 145 CAPTION "Dialog"
143 146 FONT 10, "System", 0, 0, 0x0
144 147 BEGIN
145   - GROUPBOX "SN号设置",IDC_STATIC,0,0,120,60
  148 + GROUPBOX "SN号设置",IDC_STATIC,0,0,120,64
146 149 CONTROL "固定SN号",IDC_CHECK_SAME_SN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,10,50,10
147 150 LTEXT "起始ID从",IDC_STATIC,5,34,24,12,SS_CENTERIMAGE
148 151 EDITTEXT IDC_EDIT_SN_START,32,35,32,12,ES_AUTOHSCROLL
149 152 EDITTEXT IDC_EDIT_SN_END,83,35,32,12,ES_AUTOHSCROLL
150   - GROUPBOX "COM口配置",IDC_STATIC,0,65,120,100
151   - LTEXT "波特率",IDC_STATIC,5,80,35,8,SS_CENTERIMAGE
152   - LTEXT "校验位",IDC_STATIC,5,97,35,8,SS_CENTERIMAGE
153   - LTEXT "数据位",IDC_STATIC,5,114,35,8,SS_CENTERIMAGE
154   - LTEXT "停止位",IDC_STATIC,5,131,35,8,SS_CENTERIMAGE
155   - LTEXT "流控制",IDC_STATIC,5,148,35,8,SS_CENTERIMAGE
156   - COMBOBOX IDC_COMBO_BAND,50,80,65,235,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
157   - COMBOBOX IDC_COMBO_CHECK,50,97,65,218,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
158   - COMBOBOX IDC_COMBO_DATABIT,50,114,65,211,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
159   - COMBOBOX IDC_COMBO_STOPBIT,50,131,65,209,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
160   - COMBOBOX IDC_COMBO_STEAM,50,148,65,182,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
  153 + GROUPBOX "COM口配置",IDC_STATIC,132,0,120,100
  154 + LTEXT "波特率",IDC_STATIC,137,15,35,8,SS_CENTERIMAGE
  155 + LTEXT "校验位",IDC_STATIC,137,32,35,8,SS_CENTERIMAGE
  156 + LTEXT "数据位",IDC_STATIC,137,49,35,8,SS_CENTERIMAGE
  157 + LTEXT "停止位",IDC_STATIC,137,66,35,8,SS_CENTERIMAGE
  158 + LTEXT "流控制",IDC_STATIC,137,83,35,8,SS_CENTERIMAGE
  159 + COMBOBOX IDC_COMBO_BAND,182,15,65,235,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
  160 + COMBOBOX IDC_COMBO_CHECK,182,32,65,218,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
  161 + COMBOBOX IDC_COMBO_DATABIT,182,49,65,211,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
  162 + COMBOBOX IDC_COMBO_STOPBIT,182,66,65,209,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
  163 + COMBOBOX IDC_COMBO_STEAM,182,83,65,182,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
161 164 LTEXT "说明:ID五位必须是数字",IDC_STATIC,5,50,82,8
162   - GROUPBOX "Static",IDC_STATIC,130,0,155,165
163   - LTEXT "1: 耳机",IDC_STATIC,135,10,29,12,SS_CENTERIMAGE
164   - LTEXT "发射器",IDC_STATIC,207,10,17,12,SS_CENTERIMAGE
165   - LTEXT "2: 耳机",IDC_STATIC,135,25,29,12,SS_CENTERIMAGE
166   - LTEXT "发射器",IDC_STATIC,207,25,17,12,SS_CENTERIMAGE
167   - LTEXT "3: 耳机",IDC_STATIC,135,40,29,12,SS_CENTERIMAGE
168   - LTEXT "发射器",IDC_STATIC,207,40,17,12,SS_CENTERIMAGE
169   - LTEXT "4: 耳机",IDC_STATIC,135,55,29,12,SS_CENTERIMAGE
170   - LTEXT "发射器",IDC_STATIC,207,55,17,12,SS_CENTERIMAGE
171   - LTEXT "5: 耳机",IDC_STATIC,135,70,29,12,SS_CENTERIMAGE
172   - LTEXT "发射器",IDC_STATIC,207,70,17,12,SS_CENTERIMAGE
173   - LTEXT "6: 耳机",IDC_STATIC,135,85,29,12,SS_CENTERIMAGE
174   - LTEXT "发射器",IDC_STATIC,207,85,17,12,SS_CENTERIMAGE
175   - LTEXT "7: 耳机",IDC_STATIC,135,100,29,12,SS_CENTERIMAGE
176   - LTEXT "发射器",IDC_STATIC,207,100,17,12,SS_CENTERIMAGE
177   - LTEXT "8: 耳机",IDC_STATIC,135,115,29,12,SS_CENTERIMAGE
178   - LTEXT "发射器",IDC_STATIC,207,115,17,12,SS_CENTERIMAGE
179   - LTEXT "9: 耳机",IDC_STATIC,135,130,29,12,SS_CENTERIMAGE
180   - LTEXT "发射器",IDC_STATIC,207,130,17,12,SS_CENTERIMAGE
181   - LTEXT "10: 耳机",IDC_STATIC,135,145,29,12,SS_CENTERIMAGE
182   - LTEXT "发射器",IDC_STATIC,207,145,17,12,SS_CENTERIMAGE
183 165 GROUPBOX "软件路径",IDC_STATIC,0,170,250,50
184 166 EDITTEXT IDC_EDIT_EAR_PATH,5,185,180,14,ES_AUTOHSCROLL | ES_READONLY
185 167 EDITTEXT IDC_EDIT_USB_PATH,5,204,180,14,ES_AUTOHSCROLL | ES_READONLY
... ... @@ -190,6 +172,14 @@ BEGIN
190 172 LTEXT "到",IDC_STATIC,69,34,9,12,SS_CENTERIMAGE
191 173 LTEXT "SN号前缀",IDC_STATIC,5,21,34,11,SS_CENTERIMAGE
192 174 EDITTEXT IDC_EDIT_SN_HEADER,43,21,61,12,ES_AUTOHSCROLL
  175 + GROUPBOX "蓝牙名称",IDC_STATIC,0,72,120,64
  176 + CONTROL "固定蓝牙名称",IDC_CHECK_SAME_BTNAME,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,82,64,10
  177 + LTEXT "起始ID从",IDC_STATIC,5,106,24,12,SS_CENTERIMAGE
  178 + EDITTEXT IDC_EDIT_BTNAME_START,32,107,32,12,ES_AUTOHSCROLL
  179 + EDITTEXT IDC_EDIT_BTNAME_END,83,107,32,12,ES_AUTOHSCROLL
  180 + LTEXT "到",IDC_STATIC,69,106,9,12,SS_CENTERIMAGE
  181 + LTEXT "SN号前缀",IDC_STATIC,5,93,34,11,SS_CENTERIMAGE
  182 + EDITTEXT IDC_EDIT_BTNAME_HEADER,43,93,61,12,ES_AUTOHSCROLL
193 183 END
194 184
195 185
... ... @@ -250,9 +240,9 @@ BEGIN
250 240 IDD_SYSTEM_CONFIG, DIALOG
251 241 BEGIN
252 242 LEFTMARGIN, 7
253   - RIGHTMARGIN, 282
  243 + RIGHTMARGIN, 299
254 244 TOPMARGIN, 7
255   - BOTTOMMARGIN, 228
  245 + BOTTOMMARGIN, 254
256 246 END
257 247 END
258 248 #endif // APSTUDIO_INVOKED
... ... @@ -712,7 +702,7 @@ END
712 702
713 703 IDB_BITMAP_RED BITMAP "res\\bitmap1.bmp"
714 704 IDB_BITMAP_GREEN BITMAP "res\\bitmap2.bmp"
715   -#endif // Chinese (P.R.C.) resources
  705 +#endif // 中文(中华人民共和国) resources
716 706 /////////////////////////////////////////////////////////////////////////////
717 707
718 708
... ...
... ... @@ -5,6 +5,7 @@
5 5 #include "BlueFlashTool.h"
6 6 #include "BlueFlashToolDlg.h"
7 7 #include "SysConfig.h"
  8 +#include "DBT.H"
8 9
9 10 #ifdef _DEBUG
10 11 #define new DEBUG_NEW
... ... @@ -31,11 +32,11 @@ CBlueFlashToolDlg::CBlueFlashToolDlg(CWnd* pParent /*=NULL*/)
31 32 m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
32 33 for (int i=0;i<10;i++)
33 34 {
34   - g_AppMainData.if_flash[BLUE_TYPE_EAR][i] = 0;
35   - g_AppMainData.if_flash[BLUE_TYPE_USB][i] = 0;
36 35 ifUartEnable[BLUE_TYPE_USB][i] = false;
37 36 ifUartEnable[BLUE_TYPE_EAR][i] = false;
38 37 }
  38 + memcpy(strSignalFlashReady,"\xFC\x4F\x70\x74\x65\x6B\x20\x52\x4F\x4D\x20\x62\x6F\x6F\x74\x00",16);
  39 + memcpy(strSignalFlashing,"\x50\x72\x6F\x67\x72\x61\x6D\x6D\x69\x6E\x67\x3A\x00",13);
39 40 }
40 41
41 42 void CBlueFlashToolDlg::DoDataExchange(CDataExchange* pDX)
... ... @@ -43,56 +44,106 @@ void CBlueFlashToolDlg::DoDataExchange(CDataExchange* pDX)
43 44 CDialog::DoDataExchange(pDX);
44 45 //{{AFX_DATA_MAP(CBlueFlashToolDlg)
45 46 DDX_Control(pDX, IDC_MSCOMM0, mycom_debug);
46   - DDX_Control(pDX, IDC_MSCOMM1, mycom01);
47   - DDX_Control(pDX, IDC_MSCOMM2, mycom02);
48   - DDX_Control(pDX, IDC_MSCOMM3, mycom03);
49   - DDX_Control(pDX, IDC_MSCOMM4, mycom04);
50   - DDX_Control(pDX, IDC_MSCOMM5, mycom05);
51   - DDX_Control(pDX, IDC_MSCOMM6, mycom06);
52   - DDX_Control(pDX, IDC_MSCOMM7, mycom07);
53   - DDX_Control(pDX, IDC_MSCOMM8, mycom08);
54   - DDX_Control(pDX, IDC_MSCOMM9, mycom09);
55   - DDX_Control(pDX, IDC_MSCOMM10, mycom10);
56   - DDX_Control(pDX, IDC_MSCOMM11, mycom11);
57   - DDX_Control(pDX, IDC_MSCOMM12, mycom12);
58   - DDX_Control(pDX, IDC_MSCOMM13, mycom13);
59   - DDX_Control(pDX, IDC_MSCOMM14, mycom14);
60   - DDX_Control(pDX, IDC_MSCOMM15, mycom15);
61   - DDX_Control(pDX, IDC_MSCOMM16, mycom16);
62   - DDX_Control(pDX, IDC_MSCOMM17, mycom17);
63   - DDX_Control(pDX, IDC_MSCOMM18, mycom18);
64   - DDX_Control(pDX, IDC_MSCOMM19, mycom19);
65   - DDX_Control(pDX, IDC_MSCOMM20, mycom20);
66   - DDX_Control(pDX, IDC_MSCOMM21, mycom21);
67   - DDX_Control(pDX, IDC_MSCOMM22, mycom22);
68   - DDX_Control(pDX, IDC_MSCOMM23, mycom23);
69   - DDX_Control(pDX, IDC_MSCOMM24, mycom24);
70   - DDX_Control(pDX, IDC_MSCOMM25, mycom25);
71   - DDX_Control(pDX, IDC_MSCOMM26, mycom26);
72   - DDX_Control(pDX, IDC_MSCOMM27, mycom27);
73   - DDX_Control(pDX, IDC_MSCOMM28, mycom28);
74   - DDX_Control(pDX, IDC_MSCOMM29, mycom29);
75   - DDX_Control(pDX, IDC_MSCOMM30, mycom30);
76   - DDX_Control(pDX, IDC_MSCOMM31, mycom31);
77   - DDX_Control(pDX, IDC_MSCOMM32, mycom32);
78   - DDX_Control(pDX, IDC_MSCOMM33, mycom33);
79   - DDX_Control(pDX, IDC_MSCOMM34, mycom34);
80   - DDX_Control(pDX, IDC_MSCOMM35, mycom35);
81   - DDX_Control(pDX, IDC_MSCOMM36, mycom36);
82   - DDX_Control(pDX, IDC_MSCOMM37, mycom37);
83   - DDX_Control(pDX, IDC_MSCOMM38, mycom38);
84   - DDX_Control(pDX, IDC_MSCOMM39, mycom39);
85   - DDX_Control(pDX, IDC_MSCOMM40, mycom40);
86   - DDX_Control(pDX, IDC_MSCOMM41, mycom41);
87   - DDX_Control(pDX, IDC_MSCOMM42, mycom42);
88   - DDX_Control(pDX, IDC_MSCOMM43, mycom43);
89   - DDX_Control(pDX, IDC_MSCOMM44, mycom44);
90   - DDX_Control(pDX, IDC_MSCOMM45, mycom45);
91   - DDX_Control(pDX, IDC_MSCOMM46, mycom46);
92   - DDX_Control(pDX, IDC_MSCOMM47, mycom47);
93   - DDX_Control(pDX, IDC_MSCOMM48, mycom48);
94   - DDX_Control(pDX, IDC_MSCOMM49, mycom49);
95   - DDX_Control(pDX, IDC_MSCOMM50, mycom50);
  47 + DDX_Control(pDX, IDC_MSCOMM1, mycom[0][0]);
  48 + DDX_Control(pDX, IDC_MSCOMM2, mycom[0][1]);
  49 + DDX_Control(pDX, IDC_MSCOMM3, mycom[0][2]);
  50 + DDX_Control(pDX, IDC_MSCOMM4, mycom[0][3]);
  51 + DDX_Control(pDX, IDC_MSCOMM5, mycom[0][4]);
  52 + DDX_Control(pDX, IDC_MSCOMM6, mycom[0][5]);
  53 + DDX_Control(pDX, IDC_MSCOMM7, mycom[0][6]);
  54 + DDX_Control(pDX, IDC_MSCOMM8, mycom[0][7]);
  55 + DDX_Control(pDX, IDC_MSCOMM9, mycom[0][8]);
  56 + DDX_Control(pDX, IDC_MSCOMM10, mycom[0][9]);
  57 + DDX_Control(pDX, IDC_MSCOMM11, mycom[0][10]);
  58 + DDX_Control(pDX, IDC_MSCOMM12, mycom[0][11]);
  59 + DDX_Control(pDX, IDC_MSCOMM13, mycom[0][12]);
  60 + DDX_Control(pDX, IDC_MSCOMM14, mycom[0][13]);
  61 + DDX_Control(pDX, IDC_MSCOMM15, mycom[0][14]);
  62 + DDX_Control(pDX, IDC_MSCOMM16, mycom[0][15]);
  63 + DDX_Control(pDX, IDC_MSCOMM17, mycom[0][16]);
  64 + DDX_Control(pDX, IDC_MSCOMM18, mycom[0][17]);
  65 + DDX_Control(pDX, IDC_MSCOMM19, mycom[0][18]);
  66 + DDX_Control(pDX, IDC_MSCOMM20, mycom[0][19]);
  67 + DDX_Control(pDX, IDC_MSCOMM21, mycom[0][20]);
  68 + DDX_Control(pDX, IDC_MSCOMM22, mycom[0][21]);
  69 + DDX_Control(pDX, IDC_MSCOMM23, mycom[0][22]);
  70 + DDX_Control(pDX, IDC_MSCOMM24, mycom[0][23]);
  71 + DDX_Control(pDX, IDC_MSCOMM25, mycom[0][24]);
  72 + DDX_Control(pDX, IDC_MSCOMM26, mycom[1][0]);
  73 + DDX_Control(pDX, IDC_MSCOMM27, mycom[1][1]);
  74 + DDX_Control(pDX, IDC_MSCOMM28, mycom[1][2]);
  75 + DDX_Control(pDX, IDC_MSCOMM29, mycom[1][3]);
  76 + DDX_Control(pDX, IDC_MSCOMM30, mycom[1][4]);
  77 + DDX_Control(pDX, IDC_MSCOMM31, mycom[1][5]);
  78 + DDX_Control(pDX, IDC_MSCOMM32, mycom[1][6]);
  79 + DDX_Control(pDX, IDC_MSCOMM33, mycom[1][7]);
  80 + DDX_Control(pDX, IDC_MSCOMM34, mycom[1][8]);
  81 + DDX_Control(pDX, IDC_MSCOMM35, mycom[1][9]);
  82 + DDX_Control(pDX, IDC_MSCOMM36, mycom[1][10]);
  83 + DDX_Control(pDX, IDC_MSCOMM37, mycom[1][11]);
  84 + DDX_Control(pDX, IDC_MSCOMM38, mycom[1][12]);
  85 + DDX_Control(pDX, IDC_MSCOMM39, mycom[1][13]);
  86 + DDX_Control(pDX, IDC_MSCOMM40, mycom[1][14]);
  87 + DDX_Control(pDX, IDC_MSCOMM41, mycom[1][15]);
  88 + DDX_Control(pDX, IDC_MSCOMM42, mycom[1][16]);
  89 + DDX_Control(pDX, IDC_MSCOMM43, mycom[1][17]);
  90 + DDX_Control(pDX, IDC_MSCOMM44, mycom[1][18]);
  91 + DDX_Control(pDX, IDC_MSCOMM45, mycom[1][19]);
  92 + DDX_Control(pDX, IDC_MSCOMM46, mycom[1][20]);
  93 + DDX_Control(pDX, IDC_MSCOMM47, mycom[1][21]);
  94 + DDX_Control(pDX, IDC_MSCOMM48, mycom[1][22]);
  95 + DDX_Control(pDX, IDC_MSCOMM49, mycom[1][23]);
  96 + DDX_Control(pDX, IDC_MSCOMM50, mycom[1][24]);
  97 +// DDX_Control(pDX, IDC_MSCOMM1, mycom01);
  98 +// DDX_Control(pDX, IDC_MSCOMM2, mycom02);
  99 +// DDX_Control(pDX, IDC_MSCOMM3, mycom03);
  100 +// DDX_Control(pDX, IDC_MSCOMM4, mycom04);
  101 +// DDX_Control(pDX, IDC_MSCOMM5, mycom05);
  102 +// DDX_Control(pDX, IDC_MSCOMM6, mycom06);
  103 +// DDX_Control(pDX, IDC_MSCOMM7, mycom07);
  104 +// DDX_Control(pDX, IDC_MSCOMM8, mycom08);
  105 +// DDX_Control(pDX, IDC_MSCOMM9, mycom09);
  106 +// DDX_Control(pDX, IDC_MSCOMM10, mycom10);
  107 +// DDX_Control(pDX, IDC_MSCOMM11, mycom11);
  108 +// DDX_Control(pDX, IDC_MSCOMM12, mycom12);
  109 +// DDX_Control(pDX, IDC_MSCOMM13, mycom13);
  110 +// DDX_Control(pDX, IDC_MSCOMM14, mycom14);
  111 +// DDX_Control(pDX, IDC_MSCOMM15, mycom15);
  112 +// DDX_Control(pDX, IDC_MSCOMM16, mycom16);
  113 +// DDX_Control(pDX, IDC_MSCOMM17, mycom17);
  114 +// DDX_Control(pDX, IDC_MSCOMM18, mycom18);
  115 +// DDX_Control(pDX, IDC_MSCOMM19, mycom19);
  116 +// DDX_Control(pDX, IDC_MSCOMM20, mycom20);
  117 +// DDX_Control(pDX, IDC_MSCOMM21, mycom21);
  118 +// DDX_Control(pDX, IDC_MSCOMM22, mycom22);
  119 +// DDX_Control(pDX, IDC_MSCOMM23, mycom23);
  120 +// DDX_Control(pDX, IDC_MSCOMM24, mycom24);
  121 +// DDX_Control(pDX, IDC_MSCOMM25, mycom25);
  122 +// DDX_Control(pDX, IDC_MSCOMM26, mycom26);
  123 +// DDX_Control(pDX, IDC_MSCOMM27, mycom27);
  124 +// DDX_Control(pDX, IDC_MSCOMM28, mycom28);
  125 +// DDX_Control(pDX, IDC_MSCOMM29, mycom29);
  126 +// DDX_Control(pDX, IDC_MSCOMM30, mycom30);
  127 +// DDX_Control(pDX, IDC_MSCOMM31, mycom31);
  128 +// DDX_Control(pDX, IDC_MSCOMM32, mycom32);
  129 +// DDX_Control(pDX, IDC_MSCOMM33, mycom33);
  130 +// DDX_Control(pDX, IDC_MSCOMM34, mycom34);
  131 +// DDX_Control(pDX, IDC_MSCOMM35, mycom35);
  132 +// DDX_Control(pDX, IDC_MSCOMM36, mycom36);
  133 +// DDX_Control(pDX, IDC_MSCOMM37, mycom37);
  134 +// DDX_Control(pDX, IDC_MSCOMM38, mycom38);
  135 +// DDX_Control(pDX, IDC_MSCOMM39, mycom39);
  136 +// DDX_Control(pDX, IDC_MSCOMM40, mycom40);
  137 +// DDX_Control(pDX, IDC_MSCOMM41, mycom41);
  138 +// DDX_Control(pDX, IDC_MSCOMM42, mycom42);
  139 +// DDX_Control(pDX, IDC_MSCOMM43, mycom43);
  140 +// DDX_Control(pDX, IDC_MSCOMM44, mycom44);
  141 +// DDX_Control(pDX, IDC_MSCOMM45, mycom45);
  142 +// DDX_Control(pDX, IDC_MSCOMM46, mycom46);
  143 +// DDX_Control(pDX, IDC_MSCOMM47, mycom47);
  144 +// DDX_Control(pDX, IDC_MSCOMM48, mycom48);
  145 +// DDX_Control(pDX, IDC_MSCOMM49, mycom49);
  146 +// DDX_Control(pDX, IDC_MSCOMM50, mycom50);
96 147
97 148 //}}AFX_DATA_MAP
98 149 DDX_Control(pDX, IDC_DEBUG_MESSAGE, mylistDebugInfo);
... ... @@ -121,9 +172,20 @@ BOOL CBlueFlashToolDlg::OnInitDialog()
121 172 RECT rect_comport[BLUE_TYPE_MAX][MAX_TOPWELL_DEVICE_NUM];
122 173 RECT rect_process_bar[BLUE_TYPE_MAX][MAX_TOPWELL_DEVICE_NUM];
123 174 RECT rect_start_button[BLUE_TYPE_MAX][MAX_TOPWELL_DEVICE_NUM];
  175 + RECT rect_SN_info[MAX_TOPWELL_DEVICE_NUM];
  176 + RECT rect_this;
  177 + CString m_strSettings;
124 178
125 179 CDialog::OnInitDialog();
126   - QuerySerialPortStatusEx(myStrAryExistPort,myStrAryNoneOpenedPort,myStrAryAlreadyOpenedPort,myStrAryNotExistPort,1,254);
  180 +
  181 + mybufferForFile = new BYTE [1024*1024*2];
  182 + mybufferForFileUSB = new BYTE [1024*1024*2];
  183 + LoadBin((int)BLUE_TYPE_EAR);
  184 + LoadBin((int)BLUE_TYPE_USB);
  185 + GetWindowRect(&rect_this);
  186 + myfontButton.CreateFont( 18,0,0,0,FW_NORMAL|FW_BOLD,FALSE,FALSE,0,DEFAULT_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,
  187 + DEFAULT_PITCH | FF_MODERN,_T("宋体") ) ;
  188 + //QuerySerialPortStatusEx(myAryExistPort,myAryNoneOpenedPort,myAryAlreadyOpenedPort,myAryNotExistPort,1,254);
127 189
128 190 // Set the icon for this dialog. The framework does this automatically
129 191 // when the application's main window is not a dialog
... ... @@ -131,6 +193,9 @@ BOOL CBlueFlashToolDlg::OnInitDialog()
131 193 SetIcon(m_hIcon, FALSE); // Set small icon
132 194 myBitmapWait = ::LoadBitmap(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDB_BITMAP_RED));
133 195 myBitmapReady = ::LoadBitmap(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDB_BITMAP_GREEN));
  196 +
  197 + m_strSettings.Format("%d,n,8,1", g_AppMainData.com_config.aBandrate);
  198 +
134 199 for (loop1 = 0;loop1<BLUE_TYPE_MAX; loop1++)
135 200 {
136 201 for (loop2 = 0;loop2 <MAX_TOPWELL_DEVICE_NUM;loop2++)
... ... @@ -140,18 +205,19 @@ BOOL CBlueFlashToolDlg::OnInitDialog()
140 205 rect_process_bar[loop1][loop2].left = 110+300*loop1;
141 206 rect_start_button[loop1][loop2].left = 230+300*loop1;
142 207
  208 +
143 209 rect_pcb[loop1][loop2].right= rect_pcb[loop1][loop2].left+15;
144 210 rect_comport[loop1][loop2].right = rect_comport[loop1][loop2].left+70;
145 211 rect_process_bar[loop1][loop2].right = rect_process_bar[loop1][loop2].left+100;
146 212 rect_start_button[loop1][loop2].right = rect_start_button[loop1][loop2].left+40;
147 213
148   - rect_pcb[loop1][loop2].top = 10+25*loop2;
149   - rect_comport[loop1][loop2].top = 10+25*loop2;
150   - rect_process_bar[loop1][loop2].top = 10+25*loop2;
151   - rect_start_button[loop1][loop2].top = 10+25*loop2;
  214 + rect_pcb[loop1][loop2].top = 30+25*loop2;
  215 + rect_comport[loop1][loop2].top = 30+25*loop2;
  216 + rect_process_bar[loop1][loop2].top = 30+25*loop2;
  217 + rect_start_button[loop1][loop2].top = 30+25*loop2;
152 218
153 219 rect_pcb[loop1][loop2].bottom= rect_pcb[loop1][loop2].top+20;
154   - rect_comport[loop1][loop2].bottom = rect_comport[loop1][loop2].top+20;
  220 + rect_comport[loop1][loop2].bottom = rect_comport[loop1][loop2].top+200;
155 221 rect_process_bar[loop1][loop2].bottom = rect_process_bar[loop1][loop2].top+20;
156 222 rect_start_button[loop1][loop2].bottom = rect_start_button[loop1][loop2].top+20;
157 223
... ... @@ -164,61 +230,91 @@ BOOL CBlueFlashToolDlg::OnInitDialog()
164 230 //COM port list
165 231 myctrlComboComPort[loop1][loop2].Create( WS_CHILD|WS_VISIBLE|WS_VSCROLL|CBS_DROPDOWNLIST,
166 232 rect_comport[loop1][loop2],this,IDC_UART_CONFIG1+loop1*MAX_TOPWELL_DEVICE_NUM+loop2);
167   - myctrlComboComPort[loop1][loop2].AddString("不下载");
168   - for (loop3 = 0; loop3 < myStrAryNoneOpenedPort.GetSize(); loop3++)
169   - myctrlComboComPort[loop1][loop2].AddString(myStrAryNoneOpenedPort.GetAt(loop3));
170   - myctrlComboComPort[loop1][loop2].SetCurSel(0);
171   -
172 233 // Create a smooth child progress control.
173 234 myctrlProcess[loop1][loop2].Create(WS_CHILD|WS_VISIBLE|PBS_SMOOTH, rect_process_bar[loop1][loop2],
174 235 this, IDC_PROGRESS_FLASH0+loop1*MAX_TOPWELL_DEVICE_NUM+loop2);
175 236
176 237 // Create a push button.
177   - myctrlStartButton[loop1][loop2].Create("开始",WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON,
  238 + myctrlStartButton[loop1][loop2].Create("开始",WS_VISIBLE|BS_PUSHBUTTON,
178 239 rect_start_button[loop1][loop2], this, IDC_BUTTON_START0+loop1*MAX_TOPWELL_DEVICE_NUM+loop2);
  240 + //myctrlStartButton[loop1][loop2].set
  241 + if (g_AppMainData.ary_myComPort[loop1][loop2]<2)
  242 + myctrlStartButton[loop1][loop2].EnableWindow(FALSE);
  243 + else
  244 + {
  245 + mycom[loop1][loop2].SetCommPort(g_AppMainData.ary_myComPort[loop1][loop2]); //选择com1
  246 + mycom[loop1][loop2].SetInputMode(1);
  247 + mycom[loop1][loop2].SetInputLen(512); //设置当前接收区数据长度为0
  248 + mycom[loop1][loop2].SetOutBufferSize(512);//设置当前接收区数据长度为0
  249 + mycom[loop1][loop2].SetSettings(m_strSettings); //波特率9600,无校验,8个数据位,1个停止位
  250 + myctrlStartButton[loop1][loop2].EnableWindow(TRUE);
  251 + }
179 252
180   -
  253 + if (loop1 ==BLUE_TYPE_MAX-1 )
  254 + {
  255 + rect_SN_info[loop2].top = rect_start_button[loop1][loop2].top;
  256 + rect_SN_info[loop2].left = rect_start_button[loop1][loop2].right + 15;
  257 + rect_SN_info[loop2].right = rect_SN_info[loop2].left + 100;
  258 + rect_SN_info[loop2].bottom = rect_start_button[loop1][loop2].bottom;
  259 + myStaticSn[loop2].Create("SN号",WS_BORDER|WS_CHILD|WS_VISIBLE, rect_SN_info[loop2],
  260 + this, IDC_STATIC_GROUP0+loop2);
  261 + if (g_AppMainData.ary_myComPort[BLUE_TYPE_EAR][loop2]>2
  262 + ||g_AppMainData.ary_myComPort[BLUE_TYPE_USB][loop2]>2)
  263 + myStaticSn[loop2].EnableWindow(TRUE);
  264 + else
  265 + myStaticSn[loop2].EnableWindow(FALSE);
  266 + }
181 267 }
182 268 }
  269 + //WM_DEVICECHANGE
  270 +
  271 + GetDlgItem(IDC_STATIC_GROUP_DEBUG_INFO)->MoveWindow(0,rect_pcb[0][loop2-1].bottom+10,
  272 + rect_start_button[loop1-1][loop2-1].right+250,310);
  273 + GetDlgItem(IDC_STATIC_GROUP_DEBUG_INFO)->SetWindowText("运行日志");
  274 + mylistDebugInfo.MoveWindow(rect_pcb[0][loop2-1].left,rect_pcb[0][loop2-1].bottom+30,
  275 + rect_start_button[loop1-1][loop2-1].right+230,300);
  276 +
  277 + GetDlgItem(IDC_STATIC_GROUP_EAR)->MoveWindow(0,5,
  278 + rect_start_button[0][loop2-1].right+15,
  279 + rect_start_button[0][loop2-1].bottom+2);
  280 + GetDlgItem(IDC_STATIC_GROUP_EAR)->SetWindowText("耳机下载");
  281 + GetDlgItem(IDC_STATIC_GROUP_USB)->MoveWindow(rect_pcb[loop1-1][0].left-10,5,
  282 + rect_start_button[0][loop2-1].right+10,
  283 + rect_start_button[0][loop2-1].bottom+2);
  284 + GetDlgItem(IDC_STATIC_GROUP_USB)->SetWindowText("发射器下载");
183 285
184 286
185   - // TODO: Add extra initialization here
186   -// for (loop =0;loop<10;loop++)
187   -// {
188   -// pcheckButton[BLUE_TYPE_EAR][loop] = (CButton *)GetDlgItem(IDC_CHECK_EAR1+loop);
189   -// pcheckButton[BLUE_TYPE_USB][loop] = (CButton *)GetDlgItem(IDC_CHECK_USB1+loop);
190   -// myctrlStartButton[BLUE_TYPE_EAR][loop] = (CButton *)GetDlgItem(IDC_BUTTON_START+loop);
191   -// myctrlStartButton[BLUE_TYPE_EAR][loop]->EnableWindow(FALSE);
192   -// myctrlStartButton[BLUE_TYPE_USB][loop] = (CButton *)GetDlgItem(IDC_BUTTON_START_USB1+loop);
193   -// myctrlStartButton[BLUE_TYPE_USB][loop]->EnableWindow(FALSE);
194   -// myctrlProcess[BLUE_TYPE_EAR][loop] = (CProgressCtrl *)GetDlgItem(IDC_PROGRESS_FLASH+loop);
195   -// myctrlProcess[BLUE_TYPE_USB][loop] = (CProgressCtrl *)GetDlgItem(IDC_PROGRESS_USB1+loop);
196   -// pStaticSn[loop] = (CStatic *)GetDlgItem(IDC_STATIC_GROUP1+loop);
197   -// myctrlPcbState[BLUE_TYPE_EAR][loop] = (CStatic *)GetDlgItem(IDC_PCB_STATE1+loop);
198   -// myctrlPcbState[BLUE_TYPE_USB][loop] = (CStatic *)GetDlgItem(IDC_PCB_STATE11+loop);
199   -// }
200   - pctrlMSComm[BLUE_TYPE_EAR][0]=&mycom01;
201   - pctrlMSComm[BLUE_TYPE_EAR][1]=&mycom02;
202   - pctrlMSComm[BLUE_TYPE_EAR][2]=&mycom03;
203   - pctrlMSComm[BLUE_TYPE_EAR][3]=&mycom04;
204   - pctrlMSComm[BLUE_TYPE_EAR][4]=&mycom05;
205   - pctrlMSComm[BLUE_TYPE_EAR][5]=&mycom06;
206   - pctrlMSComm[BLUE_TYPE_EAR][6]=&mycom07;
207   - pctrlMSComm[BLUE_TYPE_EAR][7]=&mycom08;
208   - pctrlMSComm[BLUE_TYPE_EAR][8]=&mycom09;
209   - pctrlMSComm[BLUE_TYPE_EAR][9]=&mycom10;
210   - pctrlMSComm[BLUE_TYPE_USB][0]=&mycom11;
211   - pctrlMSComm[BLUE_TYPE_USB][1]=&mycom12;
212   - pctrlMSComm[BLUE_TYPE_USB][2]=&mycom13;
213   - pctrlMSComm[BLUE_TYPE_USB][3]=&mycom14;
214   - pctrlMSComm[BLUE_TYPE_USB][4]=&mycom15;
215   - pctrlMSComm[BLUE_TYPE_USB][5]=&mycom16;
216   - pctrlMSComm[BLUE_TYPE_USB][6]=&mycom17;
217   - pctrlMSComm[BLUE_TYPE_USB][7]=&mycom18;
218   - pctrlMSComm[BLUE_TYPE_USB][8]=&mycom19;
219   - pctrlMSComm[BLUE_TYPE_USB][9]=&mycom20;
  287 +
  288 + GetDlgItem(IDC_START_ALL)->MoveWindow(
  289 + rect_start_button[loop1-1][loop2-1].right+150,
  290 + rect_start_button[0][0].top+20,
  291 + 100,50);
  292 + GetDlgItem(IDC_STOP_ALL)->MoveWindow(
  293 + rect_start_button[loop1-1][loop2-1].right+150,
  294 + rect_start_button[0][0].top+90,
  295 + 100,50);
  296 + GetDlgItem(IDC_BUTTON_INIT_COMPORT)->MoveWindow(
  297 + rect_start_button[loop1-1][loop2-1].right+150,
  298 + rect_start_button[loop1-1][loop2-1].bottom-140,
  299 + 100,50);
  300 + GetDlgItem(IDC_BUTTON_SETTING)->MoveWindow(
  301 + rect_start_button[loop1-1][loop2-1].right+150,
  302 + rect_start_button[loop1-1][loop2-1].bottom-70,
  303 + 100,50);
  304 +
  305 + GetDlgItem(IDC_START_ALL)->SetFont(&myfontButton);
  306 + GetDlgItem(IDC_STOP_ALL)->SetFont(&myfontButton);
  307 + GetDlgItem(IDC_BUTTON_INIT_COMPORT)->SetFont(&myfontButton);
  308 + GetDlgItem(IDC_BUTTON_SETTING)->SetFont(&myfontButton);
  309 + rect_this.right = rect_this.left + rect_start_button[loop1-1][loop2-1].right+260;
  310 + rect_this.bottom = rect_this.top + rect_pcb[0][loop2-1].bottom+350;
  311 + MoveWindow(&rect_this);
220 312
221 313
  314 +
  315 +
  316 + UartDeviceChange();
  317 +
222 318 UpdateGroupsCaptions();
223 319
224 320 return TRUE; // return TRUE unless you set the focus to a control
... ... @@ -263,11 +359,10 @@ HCURSOR CBlueFlashToolDlg::OnQueryDragIcon()
263 359 void CBlueFlashToolDlg::OnButtonSetting()
264 360 {
265 361 CSysConfig dlg;
266   - dlg.myStrAryExistPort = &myStrAryExistPort;
267   - dlg.myStrAryNoneOpenedPort = &myStrAryNoneOpenedPort;
268   - dlg.myStrAryAlreadyOpenedPort = &myStrAryAlreadyOpenedPort;
269   - dlg.myStrAryNotExistPort= &myStrAryNotExistPort;
270 362 dlg.DoModal();
  363 + LoadBin((int)BLUE_TYPE_EAR);
  364 + LoadBin((int)BLUE_TYPE_USB);
  365 +
271 366 UpdateGroupsCaptions();
272 367
273 368 }
... ... @@ -275,57 +370,38 @@ void CBlueFlashToolDlg::OnButtonSetting()
275 370 void CBlueFlashToolDlg::UpdateGroupsCaptions()
276 371 {
277 372 CString strCaptionStatics;
278   - int loop = 0;
  373 + int loop1 = 0,loop2 = 0;
279 374 int SN_readwrite = g_AppMainData.SN_cur;
280   - char sum_ear, sum_usb;
  375 + int sumPort = 0,sumForSn = 0;
281 376 CButton * pbutton;
282 377
283   - for (loop = 0; loop < 10; loop++)
  378 + for (loop2 = 0; loop2 < MAX_TOPWELL_DEVICE_NUM; loop2++)
284 379 {
285   - if (g_AppMainData.ary_myComPort[BLUE_TYPE_EAR][loop] < 2
286   - || ifUartEnable[BLUE_TYPE_EAR][loop] == false)
  380 + sumForSn = 0;
  381 + for (loop1 = 0; loop1 < BLUE_TYPE_MAX; loop1++)
287 382 {
288   - g_AppMainData.if_flash[BLUE_TYPE_EAR][loop] = 0;
289   - //pcheckButton[BLUE_TYPE_EAR][loop]->SetCheck(0);
290   - //pcheckButton[BLUE_TYPE_EAR][loop]->EnableWindow(FALSE);
  383 + sumForSn+=g_AppMainData.ary_myComPort[loop1][loop2];
  384 + if (g_AppMainData.ary_myComPort[loop1][loop2] >1)
  385 + myctrlStartButton[loop1][loop2].EnableWindow(TRUE);
  386 + else
  387 + myctrlStartButton[loop1][loop2].EnableWindow(FALSE);
  388 + sumPort+= g_AppMainData.ary_myComPort[loop1][loop2];
291 389 }
292   - else
293   - {
294   - //pcheckButton[BLUE_TYPE_EAR][loop]->SetCheck(g_AppMainData.if_flash[BLUE_TYPE_EAR][loop]);
295   - //pcheckButton[BLUE_TYPE_EAR][loop]->EnableWindow(TRUE);
296   - }
297   - if (g_AppMainData.ary_myComPort[BLUE_TYPE_USB][loop] < 2
298   - || ifUartEnable[BLUE_TYPE_USB][loop] == false)
  390 + if (sumForSn)
299 391 {
300   - g_AppMainData.if_flash[BLUE_TYPE_USB][loop] = 0;
301   - //pcheckButton[BLUE_TYPE_USB][loop]->SetCheck(0);
302   - //pcheckButton[BLUE_TYPE_USB][loop]->EnableWindow(FALSE);
  392 + myStaticSn[loop2].EnableWindow(TRUE);
  393 + mySN_readwrite[loop2] = SN_readwrite++;
  394 + strCaptionStatics.Format("%s%04x", g_AppMainData.SN_head, mySN_readwrite[loop2]);
  395 + myStaticSn[loop2].SetWindowText(strCaptionStatics);
303 396 }
304 397 else
305 398 {
306   - //pcheckButton[BLUE_TYPE_USB][loop]->SetCheck(g_AppMainData.if_flash[BLUE_TYPE_USB][loop]);
307   - //pcheckButton[BLUE_TYPE_USB][loop]->EnableWindow(TRUE);
308   - }
309   - if (g_AppMainData.if_flash[BLUE_TYPE_EAR][loop] +g_AppMainData.if_flash[BLUE_TYPE_USB][loop] > 0)
310   - {
311   - pStaticSn[loop]->EnableWindow(TRUE);
312   - mySN_readwrite[loop] = SN_readwrite++;
313   - strCaptionStatics.Format("SN: %s%05d", g_AppMainData.SN_head, mySN_readwrite[loop]);
314   - pStaticSn[loop]->SetWindowText(strCaptionStatics);
  399 + myStaticSn[loop2].EnableWindow(FALSE);
  400 + mySN_readwrite[loop2] = -1;
  401 + myStaticSn[loop2].SetWindowText("不可用");
315 402 }
316   - else
317   - {
318   - //pStaticSn[loop]->EnableWindow(FALSE);
319   - //pStaticSn[loop]->SetWindowText("不可用");
320   - }
321   - //myctrlStartButton[BLUE_TYPE_EAR][loop]->EnableWindow((BOOL) g_AppMainData.if_flash[BLUE_TYPE_EAR][loop]);
322   - //myctrlStartButton[BLUE_TYPE_USB][loop]->EnableWindow((BOOL) g_AppMainData.if_flash[BLUE_TYPE_USB][loop]);
323   - //pcheckButton[BLUE_TYPE_EAR][loop]->SetCheck((BOOL) g_AppMainData.if_flash[BLUE_TYPE_EAR][loop]);
324   - //pcheckButton[BLUE_TYPE_USB][loop]->SetCheck((BOOL) g_AppMainData.if_flash[BLUE_TYPE_USB][loop]);
325 403 }
326   - sum_ear = g_AppMainData.if_flash[BLUE_TYPE_EAR][0] + g_AppMainData.if_flash[BLUE_TYPE_EAR][1] + g_AppMainData.if_flash[BLUE_TYPE_EAR][2] + g_AppMainData.if_flash[BLUE_TYPE_EAR][3] + g_AppMainData.if_flash[BLUE_TYPE_EAR][4] + g_AppMainData.if_flash[BLUE_TYPE_EAR][5] + g_AppMainData.if_flash[BLUE_TYPE_EAR][6] + g_AppMainData.if_flash[BLUE_TYPE_EAR][7] + g_AppMainData.if_flash[BLUE_TYPE_EAR][8] + g_AppMainData.if_flash[BLUE_TYPE_EAR][9];
327   - sum_usb = g_AppMainData.if_flash[BLUE_TYPE_USB][0] + g_AppMainData.if_flash[BLUE_TYPE_USB][1] + g_AppMainData.if_flash[BLUE_TYPE_USB][2] + g_AppMainData.if_flash[BLUE_TYPE_USB][3] + g_AppMainData.if_flash[BLUE_TYPE_USB][4] + g_AppMainData.if_flash[BLUE_TYPE_USB][5] + g_AppMainData.if_flash[BLUE_TYPE_USB][6] + g_AppMainData.if_flash[BLUE_TYPE_USB][7] + g_AppMainData.if_flash[BLUE_TYPE_USB][8] + g_AppMainData.if_flash[BLUE_TYPE_USB][9];
328   - GetDlgItem(IDC_START_ALL)->EnableWindow(sum_ear + sum_usb > 0 ? TRUE: FALSE);
  404 + GetDlgItem(IDC_START_ALL)->EnableWindow(sumPort> 0 ? TRUE: FALSE);
329 405 }
330 406
331 407
... ... @@ -340,161 +416,79 @@ void CBlueFlashToolDlg::OnCommMscommDebug()
340 416 {
341 417 // TODO: Add your message handler code here
342 418 }
343   -
344   -
345   -
346   -
347   -
348 419 void CBlueFlashToolDlg::OnBnClickedButtonInitComport()
349 420 {
350   - int loop = 0;
351   - for (loop = 0; loop < 10; loop++)
  421 + int loop1 = 0, loop2 = 0;
  422 + for (loop1 = 0; loop1 < BLUE_TYPE_MAX; loop1++)
352 423 {
353   - OpenComport(BLUE_TYPE_EAR,loop);
354   - OpenComport(BLUE_TYPE_USB,loop);
  424 + for (loop2 = 0; loop2 < MAX_TOPWELL_DEVICE_NUM; loop2++)
  425 + {
  426 + OpenComport(loop1, loop2);
  427 + }
355 428 }
356 429 UpdateGroupsCaptions();
357 430 }
358 431
359   -void CBlueFlashToolDlg::OnBnClickedCheckEarUsb()
360   -{
361   -// int currentID;
362   -// currentID = GetFocus()->GetDlgCtrlID();
363   -// CButton *pbutton = (CButton *)GetDlgItem(currentID);
364   -// BOOL ifchecked = pbutton->GetCheck();
365   -// if (currentID >= IDC_CHECK_EAR1 && currentID <= IDC_CHECK_EAR10)
366   -// g_AppMainData.if_flash[BLUE_TYPE_EAR][currentID -IDC_CHECK_EAR1 ] = ifchecked;
367   -// else if (currentID >= IDC_CHECK_USB1 && currentID <= IDC_CHECK_USB10)
368   -// g_AppMainData.if_flash[BLUE_TYPE_USB][currentID -IDC_CHECK_USB1 ] = ifchecked;
369   -// UpdateGroupsCaptions();
370   -}
371   -
372   -void CBlueFlashToolDlg::OnBnClickedButtonStartUsbEar()
373   -{
374   -// int currentID;
375   -// BLUE_DEVICE_TYPE aDeviceType;
376   -// int aIndex;
377   -// CString strText;
378   -//
379   -// currentID = GetFocus()->GetDlgCtrlID();
380   -// if (currentID >= IDC_BUTTON_START && currentID <= IDC_BUTTON_START_EAR10)
381   -// {
382   -// aDeviceType = BLUE_TYPE_EAR;
383   -// aIndex = currentID - IDC_BUTTON_START;
384   -// myThreadData[aDeviceType][aIndex].Filename = g_AppMainData.FilePathEar;
385   -// }
386   -// else if (currentID >= IDC_BUTTON_START_USB1 && currentID <= IDC_BUTTON_START_USB1)
387   -// {
388   -// aDeviceType = BLUE_TYPE_USB;
389   -// aIndex = currentID - IDC_BUTTON_START_USB1;
390   -// myThreadData[aDeviceType][aIndex].Filename = g_AppMainData.FilePathUsb;
391   -// }
392   -// ((CWnd*)GetDlgItem(currentID))->GetWindowText(strText);
393   -// if (strText == "开始")
394   -// {
395   -// //pThreadData = new FLASH_THREAD_DATA;
396   -// myThreadData[aDeviceType][aIndex].pDlg = this;
397   -// myThreadData[aDeviceType][aIndex].blue_device_type = (BYTE)aDeviceType;
398   -// myThreadData[aDeviceType][aIndex].nIndex = aIndex;
399   -// myThreadData[aDeviceType][aIndex].StopThread = false;
400   -// myThreadData[aDeviceType][aIndex].pctrlMSComm = pctrlMSComm[aDeviceType][aIndex];
401   -// myThreadData[aDeviceType][aIndex].m_hThread = AfxBeginThread(BlueFlashThreadProc, &myThreadData[aDeviceType][aIndex]);
402   -// }
403   -// else if (strText == "停止")
404   -// {
405   -// //DWORD threadExitcode;
406   -// //GetExitCodeThread(m_hThread[aDeviceType][aIndex], &threadExitcode);
407   -// //if (threadExitcode == STILL_ACTIVE) TerminateThread(m_hThread[aDeviceType][aIndex], 0);
408   -// myThreadData[aDeviceType][aIndex].StopThread = true;
409   -// }
410   -}
411 432
412 433
413 434 void CBlueFlashToolDlg::OnDestroy()
414 435 {
415 436 CDialog::OnDestroy();
416   -
  437 + delete mybufferForFile;
417 438 g_pmainapp->SaveConfigs();
418   -
419 439 }
420 440
421 441 // 打开COM口,
422   -bool CBlueFlashToolDlg::OpenComport(BLUE_DEVICE_TYPE earOrUsb, int index)
  442 +bool CBlueFlashToolDlg::OpenComport(int earOrUsb, int index)
423 443 {
424 444 int loop = 0;
425 445 CString m_strSettings;
426 446 int comopen_port;
427   - CMSComm *pctrlComToOpen = pctrlMSComm[BLUE_TYPE_EAR][index];
428   -
429   - m_strSettings.Format("%d,n,8,1", g_AppMainData.com_config.aBandrate);
430   -
431   - comopen_port =g_AppMainData.ary_myComPort[BLUE_TYPE_EAR][index] ;
432   -
433   - DBG_print("开始打开端口 %d",comopen_port);
  447 + //CMSComm *pctrlComToOpen = pctrlMSComm[earOrUsb][index];
  448 + //m_strSettings.Format("%d,n,8,1", g_AppMainData.com_config.aBandrate);
  449 + comopen_port =g_AppMainData.ary_myComPort[earOrUsb][index] ;
434 450 if (comopen_port<2)
435 451 {
436   - DBG_print("无效端口 %d",comopen_port);
437 452 return false;
438 453 }
  454 + DBG_print("[%d]开始打开端口 %d",__LINE__,comopen_port);
439 455 if (QuerySingleSerialPortEx(comopen_port) != TRUE)
440 456 {
441   - DBG_print("已被占用 %d",comopen_port);
442   - g_AppMainData.if_flash[BLUE_TYPE_EAR][loop] = 0;
  457 + DBG_print("[%d]已被占用 %d",__LINE__,comopen_port);
443 458 g_AppMainData.ary_myComPort[BLUE_TYPE_EAR][loop]=0;
444 459 ifUartEnable[earOrUsb][index] = false;
445 460 return false;
446 461 }
447   - if (pctrlComToOpen->GetPortOpen())
  462 + if (mycom[earOrUsb][index].GetPortOpen())
448 463 {
449   - if (pctrlComToOpen->GetCommPort() == comopen_port)
  464 + if (mycom[earOrUsb][index].GetCommPort() == comopen_port)
450 465 {
451   - DBG_print("该串口已打开,请勿重复打开!\r\n");
  466 + DBG_print("[%d]该串口已打开,请勿重复打开!\r\n",__LINE__);
452 467 return TRUE;
453 468 }
454 469 }
455   - //参数1表示每当串口接收缓冲区中有多于或等于1个字符时将引发一个接收数据的OnComm事件
456   - try
457   - {
458   - pctrlComToOpen->SetCommPort(comopen_port); //选择com1
459   - pctrlComToOpen->SetInputMode(1);
460   - pctrlComToOpen->SetInputLen(512); //设置当前接收区数据长度为0
461   - pctrlComToOpen->SetOutBufferSize(512);//设置当前接收区数据长度为0
462   - pctrlComToOpen->SetSettings(m_strSettings); //波特率9600,无校验,8个数据位,1个停止位
463   - }
464   - catch (CException* e)
465   - {
466   - e->ReportError(MB_ICONSTOP);
467   - return FALSE;
468   - }
469   - DBG_print("设置串口配置 %s",m_strSettings );
470   -
471   - if (!pctrlComToOpen->GetPortOpen())
  470 + if (!mycom[earOrUsb][index].GetPortOpen())
472 471 {
473 472 try
474 473 {
475   - pctrlComToOpen->SetPortOpen(TRUE); //打开串口
  474 + mycom[earOrUsb][index].SetPortOpen(TRUE); //打开串口
476 475 }
477 476 catch (CException* e)
478 477 {
479 478 e->ReportError(MB_ICONSTOP);
480 479 return FALSE;
481 480 }
482   -
483   -
484   - pctrlComToOpen->SetRThreshold(1);
  481 + mycom[earOrUsb][index].SetRThreshold(1);
485 482 ifUartEnable[earOrUsb][index] = true;
486   - DBG_print("串口打开成功 %d",comopen_port);
  483 + DBG_print("[%d]串口打开成功 %d",__LINE__,comopen_port);
487 484 }
488 485 else
489 486 {
490   - DBG_print("串口%d无法打开",comopen_port );
491   - g_AppMainData.if_flash[BLUE_TYPE_EAR][loop] = 0;
  487 + DBG_print("[%d]串口%d无法打开",__LINE__,comopen_port );
492 488 g_AppMainData.ary_myComPort[BLUE_TYPE_EAR][loop]=0;
493 489 ifUartEnable[earOrUsb][index] = false;
494 490 }
495   -
496   -
497   - pctrlComToOpen->GetInput(); //先预读缓冲区以清除残留数据
  491 + mycom[earOrUsb][index].GetInput(); //先预读缓冲区以清除残留数据
498 492 return true;
499 493 }
500 494
... ... @@ -546,15 +540,11 @@ void CBlueFlashToolDlg::OnCommMscomm1(UINT nID)
546 540 len = safearray_inp.GetOneDimSize(); //得到有效数据长度
547 541 for (k = 0; k < len; k++)
548 542 safearray_inp.GetElement(&k, rxdata + k); //转换为BYTE型数组
549   - if(strstr((char *)rxdata, "Optek ROM boot") == NULL)
550   - {
  543 + if(strstr((char *)rxdata, strSignalFlashReady) == NULL)
551 544 myctrlPcbState[aDeviceType][aIndex].SetBitmap(myBitmapWait);
552   - }
553 545 else
554   - {
555 546 myctrlPcbState[aDeviceType][aIndex].SetBitmap(myBitmapReady);
556   - }
557   - if (strstr((char *)rxdata,"Programming:") != NULL)
  547 + if (strstr((char *)rxdata,strSignalFlashing) != NULL)
558 548 {
559 549 strncpy(flash_process,(char *)(rxdata+12),3);
560 550 myctrlProcess[aDeviceType][aIndex].SetPos(atoi(flash_process));
... ... @@ -576,6 +566,7 @@ UINT BlueFlashThreadProc(LPVOID lParam)
576 566 int loop; //循环读取文件的计数器
577 567 CMSComm *pctrlMSComm;
578 568
  569 +
579 570
580 571 if(lParam == NULL) return -1; //如果线程参数位空, 直接退出
581 572 aDeviceType = (BLUE_DEVICE_TYPE)pThreadData->blue_device_type;
... ... @@ -585,7 +576,7 @@ UINT BlueFlashThreadProc(LPVOID lParam)
585 576
586 577 if (!IsExistFile(pThreadData->Filename))
587 578 {
588   - pThreadData->pDlg->DBG_print("文件不存在, 请重新设定软件路径");
  579 + pThreadData->pDlg->DBG_print("[%d]文件不存在, 请重新设定软件路径",__LINE__);
589 580 return -1;
590 581 }
591 582 pThreadData->pDlg->myctrlStartButton[aDeviceType][aIndex].SetWindowText("停止");
... ... @@ -641,7 +632,7 @@ bool CBlueFlashToolDlg::SendFileToComPort(BLUE_DEVICE_TYPE earOrUsb, int index)
641 632 return false;
642 633 }
643 634
644   -#if xiemeng_othd
  635 +#if 0//xiemeng_othd
645 636
646 637
647 638 void Funcfromnet(void)
... ... @@ -731,13 +722,290 @@ void Funcfromnet(void)
731 722
732 723
733 724 #endif
734   -
735 725 LRESULT CBlueFlashToolDlg::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
736 726 {
  727 + switch (message)
  728 + {
  729 + case WM_DEVICECHANGE:
  730 + {
  731 + DEV_BROADCAST_HDR *pdevices_info = (DEV_BROADCAST_HDR *)lParam;
  732 + if (pdevices_info)
  733 + {
  734 + if (pdevices_info->dbch_devicetype == 3)
  735 + {//UART类型设备
  736 + switch (wParam)
  737 + {
  738 + case DBT_DEVICEARRIVAL:
  739 + DBG_print("新串口接入");
  740 + break;
  741 + case DBT_DEVICEREMOVECOMPLETE:
  742 + DBG_print("串口线拔出");
  743 + }
  744 + UartDeviceChange();
  745 + }
  746 + }
  747 + }
  748 + break;
  749 + case WM_COMMAND:
  750 + {
  751 + int currID;
  752 + int device_type;
  753 + int device_index;
  754 + CString strtmsg;
  755 + CString strButonText;
  756 + DWORD itemdataCombo;
  757 + switch (HIWORD(wParam))
  758 + {
  759 + case CBN_SELCHANGE:
  760 + {
  761 + currID = LOWORD(wParam);
  762 + if (currID >= IDC_UART_CONFIG0 && currID <= IDC_UART_CONFIG99)
  763 + {
  764 + CComboBox *pCombobox = (CComboBox *)GetDlgItem(currID);
  765 + itemdataCombo = pCombobox->GetItemData(pCombobox->GetCurSel());
  766 + device_type = itemdataCombo>>16;
  767 + device_index = HIBYTE(LOWORD(itemdataCombo));
  768 + g_AppMainData.ary_myComPort[device_type][device_index] = LOBYTE(LOWORD(itemdataCombo));;
  769 + if (g_AppMainData.ary_myComPort[device_type][device_index] == 1)
  770 + g_AppMainData.ary_myComPort[device_type][device_index] = 0;
  771 + }
  772 + UpdateGroupsCaptions();
  773 + }
  774 + break;
  775 + case BN_CLICKED:
  776 + {
  777 + currID = LOWORD(wParam);
  778 + if (currID >= IDC_BUTTON_START0 && currID <= IDC_BUTTON_START99)
  779 + {
  780 + device_type = (currID - IDC_BUTTON_START0) / MAX_TOPWELL_DEVICE_NUM;
  781 + device_index = (currID - IDC_BUTTON_START0) % MAX_TOPWELL_DEVICE_NUM;
  782 + if (ifUartEnable[device_type][device_index] == false)
  783 + {
  784 + if (!OpenComport(device_type, device_index))
  785 + return 0;
  786 + }
  787 + if (SaveBin(device_type,device_index) == false)
  788 + {
  789 + DBG_print("生成文件失败");
  790 + return 0;
  791 + }
  792 + myStaticSn[device_index].GetWindowText(strtmsg);
  793 +
  794 + if (device_type == BLUE_TYPE_EAR)
  795 + myThreadData[device_type][device_index].Filename.Format("%sEar%04x.bin",GetCurrPath(),mySN_readwrite[device_index]);
  796 + else
  797 + myThreadData[device_type][device_index].Filename.Format("%sDongle%04x.bin",GetCurrPath(),mySN_readwrite[device_index]);
  798 +
  799 + GetDlgItem(currID)->GetWindowText(strButonText);
  800 + if (strButonText == "开始")
  801 + {
  802 + //pThreadData = new FLASH_THREAD_DATA;
  803 + myThreadData[device_type][device_index].pDlg = this;
  804 + myThreadData[device_type][device_index].blue_device_type = (BYTE)
  805 + device_type;
  806 + myThreadData[device_type][device_index].nIndex = device_index;
  807 + myThreadData[device_type][device_index].StopThread = false;
  808 + myThreadData[device_type][device_index].pctrlMSComm = pctrlMSComm[device_type][device_index];
  809 + myThreadData[device_type][device_index].m_hThread = AfxBeginThread(BlueFlashThreadProc, &myThreadData[device_type][device_index]);
  810 + }
  811 + else if (strButonText == "停止")
  812 + {
  813 + //DWORD threadExitcode;
  814 + //GetExitCodeThread(m_hThread[aDeviceType][aIndex], &threadExitcode);
  815 + //if (threadExitcode == STILL_ACTIVE) TerminateThread(m_hThread[aDeviceType][aIndex], 0);
  816 + myThreadData[device_type][device_index].StopThread = true;
  817 + }
  818 + }
  819 + }
  820 + break;
  821 + }
  822 + }
  823 + break;
  824 + }
737 825 return CDialog::WindowProc(message, wParam, lParam);
738 826 }
739 827
740 828 void CBlueFlashToolDlg::OnBnClickedStartAll()
741 829 {
  830 + int loop1,loop2;
  831 + for (loop1 = 0; loop1 < BLUE_TYPE_MAX; loop1++)
  832 + {
  833 + for (loop2 = 0; loop2 < MAX_TOPWELL_DEVICE_NUM; loop2++)
  834 + {
  835 + myThreadData[loop1][loop2].pDlg = this;
  836 + myThreadData[loop1][loop2].blue_device_type = (BYTE)loop1;
  837 + myThreadData[loop1][loop2].nIndex = loop2;
  838 + myThreadData[loop1][loop2].StopThread = false;
  839 + myThreadData[loop1][loop2].pctrlMSComm = pctrlMSComm[loop1][loop2];
  840 + myThreadData[loop1][loop2].m_hThread = AfxBeginThread(BlueFlashThreadProc, &myThreadData[loop1][loop2]);
  841 + }
  842 + }
  843 +
742 844 // TODO: Add your control notification handler code here
743 845 }
  846 +
  847 +// 拔出或者插入UART线, 更新列表信息
  848 +void CBlueFlashToolDlg::UartDeviceChange(void)
  849 +{
  850 + int loop1,loop2,loop3;
  851 + DWORD itemdataComPortList;
  852 + int sumPort = 0;
  853 +
  854 + QuerySerialPortStatusEx(myAryExistPort,myAryNoneOpenedPort,myAryAlreadyOpenedPort,myAryNotExistPort,1,254);
  855 + for (loop1 = 0;loop1<BLUE_TYPE_MAX; loop1++)
  856 + {
  857 + for (loop2 = 0;loop2 <MAX_TOPWELL_DEVICE_NUM;loop2++)
  858 + {
  859 + myctrlComboComPort[loop1][loop2].ResetContent();
  860 + myctrlComboComPort[loop1][loop2].AddString("不下载");
  861 + itemdataComPortList=0;
  862 + itemdataComPortList = loop1<<16|loop2<<8;
  863 + myctrlComboComPort[loop1][loop2].SetItemData(0, itemdataComPortList);
  864 + if (g_AppMainData.ary_myComPort[loop1][loop2] == 0)
  865 + myctrlComboComPort[loop1][loop2].SetCurSel(0);
  866 + for (loop3 = 0; loop3 < myAryNoneOpenedPort.GetSize(); loop3++)
  867 + {
  868 + CString strComName;
  869 + strComName.Format("COM%d",myAryNoneOpenedPort.GetAt(loop3));
  870 + int add_index = myctrlComboComPort[loop1][loop2].AddString(strComName);
  871 + itemdataComPortList=0;
  872 + itemdataComPortList = loop1<<16|loop2<<8|add_index,myAryNoneOpenedPort.GetAt(loop3);
  873 + myctrlComboComPort[loop1][loop2].SetItemData(add_index,itemdataComPortList);
  874 + if (myAryNoneOpenedPort.GetAt(loop3) == g_AppMainData.ary_myComPort[loop1][loop2])
  875 + {
  876 + myctrlComboComPort[loop1][loop2].SetCurSel(add_index);
  877 + }
  878 + }
  879 + }
  880 + }
  881 +}
  882 +
  883 +bool CBlueFlashToolDlg::LoadBin(int blueDeviceType)
  884 +{
  885 + CFile MyFile1;
  886 + int Length;
  887 + BOOL result_openfile;
  888 + int sumPort = 0;
  889 + DBG_print("正在加载bin文件");
  890 +
  891 +
  892 + if (blueDeviceType == BLUE_TYPE_EAR)
  893 + {
  894 + if(g_AppMainData.FilePathEar == "")
  895 + {
  896 + DBG_print("耳机软件为空");
  897 + return false;
  898 + }
  899 + result_openfile = MyFile1.Open(g_AppMainData.FilePathEar, CFile::modeRead|CFile::typeBinary);
  900 + }
  901 + else
  902 + {
  903 + if(g_AppMainData.FilePathEar == "")
  904 + {
  905 + DBG_print("Dongle软件为空");
  906 + return false;
  907 + }
  908 + result_openfile = MyFile1.Open(g_AppMainData.FilePathUsb, CFile::modeRead|CFile::typeBinary);
  909 + }
  910 +
  911 + if (result_openfile == FALSE)
  912 + {
  913 + MyFile1.Close();
  914 + DBG_print("Bin文件读写错误");
  915 + return false;
  916 + }
  917 + if (blueDeviceType == BLUE_TYPE_EAR)
  918 + {
  919 + myLenForFile = MyFile1.GetLength();
  920 + memset(mybufferForFile,0,1024*1024*2);
  921 + MyFile1.Seek(0,CFile::begin);
  922 + MyFile1.Read(mybufferForFile,myLenForFile);
  923 + MyFile1.Close();
  924 + }
  925 + else
  926 + {
  927 + myLenForFileUSB = MyFile1.GetLength();
  928 + memset(mybufferForFileUSB,0,1024*1024*2);
  929 + MyFile1.Seek(0,CFile::begin);
  930 + MyFile1.Read(mybufferForFileUSB,myLenForFileUSB);
  931 + MyFile1.Close();
  932 + }
  933 + return true;
  934 +}
  935 +bool CBlueFlashToolDlg::SaveBin(int blueDeviceType)
  936 +{
  937 + char *pSearchKey;
  938 + int loop=0;
  939 + char buf_SN[4];
  940 + CFile MyFile1;
  941 + CString WFileName;
  942 + BOOL result_openfile;
  943 +
  944 + int SN_readwrite = g_AppMainData.SN_cur;
  945 + DBG_print("准备写入SN号");
  946 + pSN_write = (topwell_SN_write_struct *)strstr((char *)mybufferForFile,"TOPWELL2021");
  947 + if ( pSearchKey == NULL)
  948 + {
  949 + DBG_print("写入SN号失败");
  950 + return false;
  951 + }
  952 + for (loop = 0; loop < MAX_TOPWELL_DEVICE_NUM; loop++)
  953 + {
  954 + if (mySN_readwrite[loop] >0) SN_readwrite;
  955 + memset(buf_SN,0,4);
  956 + sprintf(buf_SN,"%c%4x",g_AppMainData.SN_head,g_AppMainData.SN_cur);
  957 +
  958 + memcpy(pSN_write->optek_link_group,buf_SN,3);
  959 + if (blueDeviceType == BLUE_TYPE_EAR)
  960 + WFileName.Format("Ear%s%s.bin",GetCurrPath(),buf_SN);
  961 + else
  962 + WFileName.Format("Dongle%s%s.bin",GetCurrPath(),buf_SN);
  963 + DBG_print("正在生成新SN号软件..........");
  964 + result_openfile = MyFile1.Open(WFileName, CFile::modeCreate|CFile::modeWrite);
  965 + MyFile1.Write(mybufferForFile, myLenForFile);
  966 + MyFile1.Close();
  967 + }
  968 +}
  969 +bool CBlueFlashToolDlg::SaveBin(int blueDeviceType,int index)
  970 +{
  971 + char buf_SN[4];
  972 + CFile MyFile1;
  973 + CString WFileName,strSn;
  974 + BOOL result_openfile;
  975 +
  976 + int SN_readwrite = g_AppMainData.SN_cur;
  977 + DBG_print("准备写入SN号");
  978 + pSN_write = (topwell_SN_write_struct *)strstr((char *)mybufferForFile,"TOPWELL2021");
  979 +
  980 + //测试代码
  981 + pSN_write = (topwell_SN_write_struct *)(mybufferForFile+10);
  982 +
  983 +
  984 + if ( pSN_write == NULL)
  985 + {
  986 + DBG_print("写入SN号失败");
  987 + return false;
  988 + }
  989 +
  990 + //if (mySN_readwrite[index] >0) SN_readwrite++;
  991 + myStaticSn[index].GetWindowText(strSn);
  992 + memset(buf_SN,0,4);
  993 + strncpy(buf_SN, strSn.GetBuffer(0),4);
  994 +
  995 + memcpy(pSN_write->optek_link_group,buf_SN,3);
  996 + if (blueDeviceType == BLUE_TYPE_EAR)
  997 + WFileName.Format("%sEar%04x.bin",GetCurrPath(),mySN_readwrite[index]);
  998 + else
  999 + WFileName.Format("%sDongle%04x.bin",GetCurrPath(),mySN_readwrite[index]);
  1000 + DBG_print("正在生成新SN号软件..........");
  1001 + result_openfile = MyFile1.Open(WFileName, CFile::modeCreate|CFile::modeWrite);
  1002 + if (result_openfile == FALSE)
  1003 + {
  1004 + DBG_print("创建文件失败..");
  1005 + return false;
  1006 + }
  1007 + MyFile1.Write(mybufferForFile, myLenForFile);
  1008 + MyFile1.Close();
  1009 +
  1010 +}
  1011 +
... ...
... ... @@ -41,7 +41,7 @@ public:
41 41 //下载按钮
42 42 CButton myctrlStartButton[BLUE_TYPE_MAX][MAX_TOPWELL_DEVICE_NUM];
43 43 //SN显
44   - CStatic *pStaticSn[MAX_TOPWELL_DEVICE_NUM];
  44 + CStatic myStaticSn[MAX_TOPWELL_DEVICE_NUM];
45 45 //进度条
46 46 CProgressCtrl myctrlProcess[BLUE_TYPE_MAX][MAX_TOPWELL_DEVICE_NUM];
47 47 //控件
... ... @@ -55,16 +55,26 @@ public:
55 55 //现成数据
56 56 FLASH_THREAD_DATA myThreadData[BLUE_TYPE_MAX][MAX_TOPWELL_DEVICE_NUM];;
57 57 //存在UART口
58   - CStringArray myStrAryExistPort;
  58 + CWordArray myAryExistPort;
59 59 //可用UART口
60   - CStringArray myStrAryNoneOpenedPort;
  60 + CWordArray myAryNoneOpenedPort;
61 61 //已经被占用UART口
62   - CStringArray myStrAryAlreadyOpenedPort;
  62 + CWordArray myAryAlreadyOpenedPort;
63 63 //不存在的UART口
64   - CStringArray myStrAryNotExistPort;
  64 + CWordArray myAryNotExistPort;
  65 +
  66 + char strSignalFlashReady[16];
  67 + char strSignalFlashing[13];
65 68
66 69 HBITMAP myBitmapWait;
67 70 HBITMAP myBitmapReady;
  71 + CFont myfontButton;
  72 +
  73 + BYTE *mybufferForFile;
  74 + BYTE *mybufferForFileUSB;
  75 + int myLenForFile;
  76 + int myLenForFileUSB;
  77 + topwell_SN_write_struct *pSN_write;
68 78
69 79
70 80 int DBG_print(const char * strMsg, ...);
... ... @@ -74,56 +84,56 @@ public:
74 84 //{{AFX_DATA(CBlueFlashToolDlg)
75 85 enum { IDD = IDD_BLUEFLASHTOOL_DIALOG };
76 86 CMSComm mycom_debug;
77   - CMSComm mycom01;
78   - CMSComm mycom02;
79   - CMSComm mycom03;
80   - CMSComm mycom04;
81   - CMSComm mycom05;
82   - CMSComm mycom06;
83   - CMSComm mycom07;
84   - CMSComm mycom08;
85   - CMSComm mycom09;
86   - CMSComm mycom10;
87   - CMSComm mycom11;
88   - CMSComm mycom12;
89   - CMSComm mycom13;
90   - CMSComm mycom14;
91   - CMSComm mycom15;
92   - CMSComm mycom16;
93   - CMSComm mycom17;
94   - CMSComm mycom18;
95   - CMSComm mycom19;
96   - CMSComm mycom20;
97   - CMSComm mycom21;
98   - CMSComm mycom22;
99   - CMSComm mycom23;
100   - CMSComm mycom24;
101   - CMSComm mycom25;
102   - CMSComm mycom26;
103   - CMSComm mycom27;
104   - CMSComm mycom28;
105   - CMSComm mycom29;
106   - CMSComm mycom30;
107   - CMSComm mycom31;
108   - CMSComm mycom32;
109   - CMSComm mycom33;
110   - CMSComm mycom34;
111   - CMSComm mycom35;
112   - CMSComm mycom36;
113   - CMSComm mycom37;
114   - CMSComm mycom38;
115   - CMSComm mycom39;
116   - CMSComm mycom40;
117   - CMSComm mycom41;
118   - CMSComm mycom42;
119   - CMSComm mycom43;
120   - CMSComm mycom44;
121   - CMSComm mycom45;
122   - CMSComm mycom46;
123   - CMSComm mycom47;
124   - CMSComm mycom48;
125   - CMSComm mycom49;
126   - CMSComm mycom50;
  87 + CMSComm mycom[2][25];;
  88 +// CMSComm mycom02;
  89 +// CMSComm mycom03;
  90 +// CMSComm mycom04;
  91 +// CMSComm mycom05;
  92 +// CMSComm mycom06;
  93 +// CMSComm mycom07;
  94 +// CMSComm mycom08;
  95 +// CMSComm mycom09;
  96 +// CMSComm mycom10;
  97 +// CMSComm mycom11;
  98 +// CMSComm mycom12;
  99 +// CMSComm mycom13;
  100 +// CMSComm mycom14;
  101 +// CMSComm mycom15;
  102 +// CMSComm mycom16;
  103 +// CMSComm mycom17;
  104 +// CMSComm mycom18;
  105 +// CMSComm mycom19;
  106 +// CMSComm mycom20;
  107 +// CMSComm mycom21;
  108 +// CMSComm mycom22;
  109 +// CMSComm mycom23;
  110 +// CMSComm mycom24;
  111 +// CMSComm mycom25;
  112 +// CMSComm mycom26;
  113 +// CMSComm mycom27;
  114 +// CMSComm mycom28;
  115 +// CMSComm mycom29;
  116 +// CMSComm mycom30;
  117 +// CMSComm mycom31;
  118 +// CMSComm mycom32;
  119 +// CMSComm mycom33;
  120 +// CMSComm mycom34;
  121 +// CMSComm mycom35;
  122 +// CMSComm mycom36;
  123 +// CMSComm mycom37;
  124 +// CMSComm mycom38;
  125 +// CMSComm mycom39;
  126 +// CMSComm mycom40;
  127 +// CMSComm mycom41;
  128 +// CMSComm mycom42;
  129 +// CMSComm mycom43;
  130 +// CMSComm mycom44;
  131 +// CMSComm mycom45;
  132 +// CMSComm mycom46;
  133 +// CMSComm mycom47;
  134 +// CMSComm mycom48;
  135 +// CMSComm mycom49;
  136 +// CMSComm mycom50;
127 137
128 138 //}}AFX_DATA
129 139
... ... @@ -149,13 +159,10 @@ protected:
149 159 public:
150 160 DECLARE_EVENTSINK_MAP()
151 161 afx_msg void OnBnClickedButtonInitComport();
152   - afx_msg void OnBnClickedCheckEarUsb();
153   - afx_msg void OnBnClickedButtonStartUsbEar();
154   - afx_msg void OnBnClickedCheckEarUsbAll();
155 162 afx_msg void OnDestroy();
156 163
157 164 void OnCommMscommDebug();
158   - bool OpenComport(BLUE_DEVICE_TYPE earOrUsb, int index);
  165 + bool OpenComport(int earOrUsb, int index);
159 166 void OnCommMscomm1(UINT nID);
160 167 bool SendFileToComPort(BLUE_DEVICE_TYPE earOrUsb, int index);
161 168
... ... @@ -167,6 +174,11 @@ public:
167 174
168 175
169 176 afx_msg void OnBnClickedStartAll();
  177 + // 拔出或者插入UART线, 更新列表信息
  178 + void UartDeviceChange(void);
  179 + bool LoadBin(int blueDeviceType);
  180 + bool SaveBin(int blueDeviceType);
  181 + bool SaveBin(int blueDeviceType,int index);
170 182 };
171 183
172 184 //{{AFX_INSERT_LOCATION}}
... ...
... ... @@ -10,9 +10,9 @@ SN_cur=0
10 10 数据位=3
11 11 停止位=-127
12 12 流控制=0
13   -ear_port1=0
14   -ear_port2=3
15   -ear_port3=3
  13 +ear_port1=2
  14 +ear_port2=0
  15 +ear_port3=0
16 16 ear_port4=0
17 17 ear_port5=0
18 18 ear_port6=0
... ... @@ -20,9 +20,9 @@ ear_port7=0
20 20 ear_port8=0
21 21 ear_port9=0
22 22 ear_port10=0
23   -usb_port1=3
24   -usb_port2=3
25   -usb_port3=3
  23 +usb_port1=0
  24 +usb_port2=0
  25 +usb_port3=0
26 26 usb_port4=0
27 27 usb_port5=0
28 28 usb_port6=0
... ... @@ -31,26 +31,11 @@ usb_port8=0
31 31 usb_port9=0
32 32 usb_port10=0
33 33 [BinFilePath]
34   -EarBin=D:\release_sw\blue\RX_0127D_耳机模式呼吸灯频率减慢.bin
35   -UsbBin=D:\code\Optek_TBH01\BlueSea_OPTEK_LINK_LC3_DWE_RX5\upgrade_bin\BlueSea_BT_SDK_uart_rx_test3.bin
36   -[Other_Config]
37   -ear_enable1=0
38   -ear_enable2=0
39   -ear_enable3=0
40   -ear_enable4=0
41   -ear_enable5=0
42   -ear_enable6=0
43   -ear_enable7=0
44   -ear_enable8=0
45   -ear_enable9=0
46   -ear_enable10=0
47   -usb_enable1=0
48   -usb_enable2=0
49   -usb_enable3=0
50   -usb_enable4=0
51   -usb_enable5=0
52   -usb_enable6=0
53   -usb_enable7=0
54   -usb_enable8=0
55   -usb_enable9=0
56   -usb_enable10=0
  34 +EarBin=h:\code\Optek_TBH01\BlueSea_OPTEK_LINK_LC3_DWE_RX3\upgrade_bin\BlueSea_USB_SD_SDK_uart_programming.bin
  35 +UsbBin=h:\code\Optek_TBH01\BlueSea_OPTEK_LINK_LC3_DWE_RX3\upgrade_bin\BlueSea_USB_SD_SDK_uart_programming.bin
  36 +[BT_name_Config]
  37 +Btname_same=1
  38 +Btname_head=ERROR
  39 +Btname_start=-9999999
  40 +Btname_end=-9999999
  41 +Btname_cur=-9999999
... ...
... ... @@ -20,6 +20,7 @@
20 20 #include <afxcmn.h> // MFC support for Windows Common Controls
21 21 #endif // _AFX_NO_AFXCMN_SUPPORT
22 22 #include <string>
  23 +///#include "EDK.H"
23 24
24 25 //{{AFX_INSERT_LOCATION}}
25 26 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
... ...
... ... @@ -34,26 +34,26 @@ void CSysConfig::DoDataExchange(CDataExchange* pDX)
34 34 {
35 35 CDialog::DoDataExchange(pDX);
36 36 //{{AFX_DATA_MAP(CSysConfig)
37   -// DDX_Control(pDX, IDC_COMPORT_EAR01, mylistEar01);
38   -// DDX_Control(pDX, IDC_COMPORT_EAR02, mylistEar02);
39   -// DDX_Control(pDX, IDC_COMPORT_EAR03, mylistEar03);
40   -// DDX_Control(pDX, IDC_COMPORT_EAR04, mylistEar04);
41   -// DDX_Control(pDX, IDC_COMPORT_EAR05, mylistEar05);
42   -// DDX_Control(pDX, IDC_COMPORT_EAR06, mylistEar06);
43   -// DDX_Control(pDX, IDC_COMPORT_EAR07, mylistEar07);
44   -// DDX_Control(pDX, IDC_COMPORT_EAR08, mylistEar08);
45   -// DDX_Control(pDX, IDC_COMPORT_EAR09, mylistEar09);
46   -// DDX_Control(pDX, IDC_COMPORT_EAR10, mylistEar10);
47   -// DDX_Control(pDX, IDC_COMPORT_USB01, mylistUsb01);
48   -// DDX_Control(pDX, IDC_COMPORT_USB02, mylistUsb02);
49   -// DDX_Control(pDX, IDC_COMPORT_USB03, mylistUsb03);
50   -// DDX_Control(pDX, IDC_COMPORT_USB04, mylistUsb04);
51   -// DDX_Control(pDX, IDC_COMPORT_USB05, mylistUsb05);
52   -// DDX_Control(pDX, IDC_COMPORT_USB06, mylistUsb06);
53   -// DDX_Control(pDX, IDC_COMPORT_USB07, mylistUsb07);
54   -// DDX_Control(pDX, IDC_COMPORT_USB08, mylistUsb08);
55   -// DDX_Control(pDX, IDC_COMPORT_USB09, mylistUsb09);
56   -// DDX_Control(pDX, IDC_COMPORT_USB10, mylistUsb10);
  37 + // DDX_Control(pDX, IDC_COMPORT_EAR01, mylistEar01);
  38 + // DDX_Control(pDX, IDC_COMPORT_EAR02, mylistEar02);
  39 + // DDX_Control(pDX, IDC_COMPORT_EAR03, mylistEar03);
  40 + // DDX_Control(pDX, IDC_COMPORT_EAR04, mylistEar04);
  41 + // DDX_Control(pDX, IDC_COMPORT_EAR05, mylistEar05);
  42 + // DDX_Control(pDX, IDC_COMPORT_EAR06, mylistEar06);
  43 + // DDX_Control(pDX, IDC_COMPORT_EAR07, mylistEar07);
  44 + // DDX_Control(pDX, IDC_COMPORT_EAR08, mylistEar08);
  45 + // DDX_Control(pDX, IDC_COMPORT_EAR09, mylistEar09);
  46 + // DDX_Control(pDX, IDC_COMPORT_EAR10, mylistEar10);
  47 + // DDX_Control(pDX, IDC_COMPORT_USB01, mylistUsb01);
  48 + // DDX_Control(pDX, IDC_COMPORT_USB02, mylistUsb02);
  49 + // DDX_Control(pDX, IDC_COMPORT_USB03, mylistUsb03);
  50 + // DDX_Control(pDX, IDC_COMPORT_USB04, mylistUsb04);
  51 + // DDX_Control(pDX, IDC_COMPORT_USB05, mylistUsb05);
  52 + // DDX_Control(pDX, IDC_COMPORT_USB06, mylistUsb06);
  53 + // DDX_Control(pDX, IDC_COMPORT_USB07, mylistUsb07);
  54 + // DDX_Control(pDX, IDC_COMPORT_USB08, mylistUsb08);
  55 + // DDX_Control(pDX, IDC_COMPORT_USB09, mylistUsb09);
  56 + // DDX_Control(pDX, IDC_COMPORT_USB10, mylistUsb10);
57 57 DDX_Control(pDX, IDC_COMBO_STEAM, mylistStreambit);
58 58 DDX_Control(pDX, IDC_COMBO_STOPBIT, mylistStopbit);
59 59 DDX_Control(pDX, IDC_COMBO_DATABIT, mylistDatabit);
... ... @@ -68,6 +68,7 @@ void CSysConfig::DoDataExchange(CDataExchange* pDX)
68 68 DDV_MaxChars(pDX, mystrSnStart, 5);
69 69 DDV_MaxChars(pDX, mystrSnEnd, 5);
70 70 DDX_CBString(pDX, IDC_COMBO_BAND, myintBandrate);
  71 + DDX_Control(pDX, IDC_CHECK_SAME_BTNAME, myCheckSameBtname);
71 72 }
72 73
73 74
... ... @@ -78,8 +79,7 @@ BEGIN_MESSAGE_MAP(CSysConfig, CDialog)
78 79 ON_BN_CLICKED(IDC_BUTTON_SECPATH_USB, OnButtonSecpathUsb)
79 80 //}}AFX_MSG_MAP
80 81 ON_BN_CLICKED(IDOK, &CSysConfig::OnBnClickedOk)
81   -
82   -
  82 + ON_BN_CLICKED(IDC_CHECK_SAME_BTNAME, &CSysConfig::OnBnClickedCheckSameBtname)
83 83 END_MESSAGE_MAP()
84 84
85 85 /////////////////////////////////////////////////////////////////////////////
... ... @@ -94,53 +94,45 @@ void CSysConfig::OnCheckSameSn()
94 94 GetDlgItem(IDC_EDIT_SN_HEADER)->EnableWindow(!g_AppMainData.if_same_sn);
95 95 }
96 96
  97 +void CSysConfig::OnBnClickedCheckSameBtname()
  98 +{
  99 + g_AppMainData.if_same_btname = myCheckSameBtname.GetCheck();
  100 + GetDlgItem(IDC_EDIT_BTNAME_START)->EnableWindow(!g_AppMainData.if_same_btname);
  101 + GetDlgItem(IDC_EDIT_BTNAME_END)->EnableWindow(!g_AppMainData.if_same_btname);
  102 + GetDlgItem(IDC_EDIT_BTNAME_HEADER)->EnableWindow(!g_AppMainData.if_same_btname);
  103 +}
  104 +
97 105 BOOL CSysConfig::OnInitDialog()
98 106 {
99 107 int loop = 0,loop2 = 0;
100   - int total_coms = myStrAryNoneOpenedPort->GetSize();
101 108 int index_inserted;
102 109 CString strComname,strCommConfiged;
103 110 CDialog::OnInitDialog();
104   -// for (loop = 0;loop<10;loop++)
105   -// {
106   -// CComboBox *plistCom = (CComboBox *)GetDlgItem(IDC_COMPORT_EAR01+loop);
107   -// plistCom->ResetContent();
108   -// plistCom->AddString("NONE");
109   -// strCommConfiged.Format("COM%d",g_AppMainData.ary_myComPort[BLUE_TYPE_EAR][loop]);
110   -// for (loop2 = 1;loop2<total_coms;loop2++)
111   -// {
112   -// strComname = myStrAryNoneOpenedPort->GetAt(loop2);
113   -// index_inserted = plistCom->AddString(strComname);
114   -// if (strComname == strCommConfiged)
115   -// plistCom->SetCurSel(index_inserted);
116   -// }
117   -// }
118   -// for (loop = 0;loop<10;loop++)
119   -// {
120   -// CComboBox *plistCom = (CComboBox *)GetDlgItem(IDC_COMPORT_USB01+loop);
121   -// plistCom->ResetContent();
122   -// plistCom->AddString("NONE");
123   -// strCommConfiged.Format("COM%d",g_AppMainData.ary_myComPort[BLUE_TYPE_USB][loop]);
124   -// for (loop2 = 1;loop2<total_coms;loop2++)
125   -// {
126   -// strComname = myStrAryNoneOpenedPort->GetAt(loop2);
127   -// index_inserted = plistCom->AddString(strComname);
128   -// if (strComname == strCommConfiged)
129   -// plistCom->SetCurSel(index_inserted);
130   -// }
  111 +
131 112 // } //数据初始化
132 113 mystrSNHeader.Format("%s",g_AppMainData.SN_head);
133 114 mystrSnStart.Format("%05d",g_AppMainData.SN_cur);
134 115 mystrSnEnd.Format("%05d",g_AppMainData.SN_end);
  116 +
135 117 mylistCheck.SetCurSel(g_AppMainData.com_config.bcheck);
136 118 mylistDatabit.SetCurSel(3);
137 119 mylistStopbit.SetCurSel(0);
138 120 mylistStreambit.SetCurSel(0);
139 121 //UI 初始化
140 122 myCheckSameSn.SetCheck(g_AppMainData.if_same_sn);
  123 +
141 124 GetDlgItem(IDC_EDIT_SN_START)->EnableWindow(!g_AppMainData.if_same_sn);
142 125 GetDlgItem(IDC_EDIT_SN_END)->EnableWindow(!g_AppMainData.if_same_sn);
143 126 GetDlgItem(IDC_EDIT_SN_HEADER)->EnableWindow(!g_AppMainData.if_same_sn);
  127 +
  128 + myCheckSameBtname.SetCheck(FALSE);
  129 +
  130 + myCheckSameBtname.EnableWindow(FALSE);
  131 + GetDlgItem(IDC_EDIT_BTNAME_START)->EnableWindow(FALSE);
  132 + GetDlgItem(IDC_EDIT_BTNAME_END)->EnableWindow(FALSE);
  133 + GetDlgItem(IDC_EDIT_BTNAME_HEADER)->EnableWindow(FALSE);
  134 +
  135 +
144 136 mylistCheck.EnableWindow(FALSE);
145 137 mylistDatabit.EnableWindow(FALSE);
146 138 mylistStopbit.EnableWindow(FALSE);
... ... @@ -222,12 +214,10 @@ void CSysConfig::OnBnClickedOk()
222 214 if (mystrFilePathEar == "")
223 215 {
224 216 MessageBox("未选择耳机软件", "Warning");
225   - return;
226 217 }
227 218 if (mystrFilePathUsb == "")
228 219 {
229 220 MessageBox("未选择发射器软件", "Warning");
230   - return;
231 221 }
232 222 g_AppMainData.FilePathEar = mystrFilePathEar;
233 223 g_AppMainData.FilePathUsb = mystrFilePathUsb;
... ... @@ -238,29 +228,3 @@ void CSysConfig::OnBnClickedOk()
238 228 CDialog::OnOK();
239 229 }
240 230
241   -// void CSysConfig::OnCbnSelchangeComportEarUsb()
242   -// {
243   -// int loop,indexComm,currentID;
244   -// CComboBox *plist;
245   -// CString strOfItem;
246   -// char ascchar[4];
247   -// memset(ascchar,0,4);
248   -// currentID = GetFocus()->GetDlgCtrlID();
249   -// plist =(CComboBox *)GetDlgItem(currentID);
250   -// plist->GetLBText(plist->GetCurSel(),strOfItem);
251   -// strcpy(ascchar,strOfItem.GetBuffer(0)+3);
252   -// indexComm = atoi(ascchar);
253   -// if ( indexComm== 1)
254   -// {
255   -// MessageBox("无效COM口", "Warning");
256   -// myAllowSave = false;
257   -// return;
258   -// }
259   -// if (currentID>=IDC_COMPORT_EAR01 && IDC_COMPORT_EAR01<=IDC_COMPORT_EAR10 )
260   -// {
261   -// g_AppMainData.ary_myComPort[BLUE_TYPE_EAR][currentID-IDC_COMPORT_EAR01] = indexComm;
262   -// }
263   -// else
264   -// g_AppMainData.ary_myComPort[BLUE_TYPE_USB][currentID-IDC_COMPORT_USB01] = indexComm;
265   -// myAllowSave = true;
266   -// }
... ...
  1 +#include "afxwin.h"
1 2 #if !defined(AFX_SYSCONFIG_H__80AB7013_3975_451D_83C3_A137DEB231FB__INCLUDED_)
2 3 #define AFX_SYSCONFIG_H__80AB7013_3975_451D_83C3_A137DEB231FB__INCLUDED_
3 4
... ... @@ -15,14 +16,6 @@ class CSysConfig : public CDialog
15 16 // Construction
16 17 public:
17 18 CSysConfig(CWnd* pParent = NULL); // standard constructor
18   - //存在UART口
19   - CStringArray *myStrAryExistPort;
20   - //可用UART口
21   - CStringArray *myStrAryNoneOpenedPort;
22   - //已经被占用UART口
23   - CStringArray *myStrAryAlreadyOpenedPort;
24   - //不存在的UART口
25   - CStringArray *myStrAryNotExistPort;
26 19
27 20 // Dialog Data
28 21 //{{AFX_DATA(CSysConfig)
... ... @@ -85,6 +78,8 @@ public:
85 78 afx_msg void OnCbnSelchangeComportEarUsb();
86 79 // 有效数据才允许保存
87 80 bool myAllowSave;
  81 + afx_msg void OnBnClickedCheckSameBtname();
  82 + CButton myCheckSameBtname;
88 83 };
89 84
90 85 //{{AFX_INSERT_LOCATION}}
... ...
... ... @@ -7,206 +7,209 @@
7 7 #define IDD_SYSTEM_CONFIG 131
8 8 #define IDB_BITMAP_RED 134
9 9 #define IDB_BITMAP_GREEN 135
10   -#define IDC_BUTTON_START0 1000
11   -#define IDC_BUTTON_START1 1001
12   -#define IDC_BUTTON_START2 1002
13   -#define IDC_BUTTON_START3 1003
14   -#define IDC_BUTTON_START4 1004
15   -#define IDC_BUTTON_START5 1005
16   -#define IDC_BUTTON_START6 1006
17   -#define IDC_BUTTON_START7 1007
18   -#define IDC_BUTTON_START8 1008
19   -#define IDC_BUTTON_START9 1009
20   -#define IDC_BUTTON_START10 1010
21   -#define IDC_BUTTON_START11 1011
22   -#define IDC_BUTTON_START12 1012
23   -#define IDC_BUTTON_START13 1013
24   -#define IDC_BUTTON_START14 1014
25   -#define IDC_BUTTON_START15 1015
26   -#define IDC_BUTTON_START16 1016
27   -#define IDC_BUTTON_START17 1017
28   -#define IDC_BUTTON_START18 1018
29   -#define IDC_BUTTON_START19 1019
30   -#define IDC_BUTTON_START20 1020
31   -#define IDC_BUTTON_START21 1021
32   -#define IDC_BUTTON_START22 1022
33   -#define IDC_BUTTON_START23 1023
34   -#define IDC_BUTTON_START24 1024
35   -#define IDC_BUTTON_START25 1025
36   -#define IDC_BUTTON_START26 1026
37   -#define IDC_BUTTON_START27 1027
38   -#define IDC_BUTTON_START28 1028
39   -#define IDC_BUTTON_START29 1029
40   -#define IDC_BUTTON_START30 1030
41   -#define IDC_BUTTON_START31 1031
42   -#define IDC_BUTTON_START32 1032
43   -#define IDC_BUTTON_START33 1033
44   -#define IDC_BUTTON_START34 1034
45   -#define IDC_BUTTON_START35 1035
46   -#define IDC_BUTTON_START36 1036
47   -#define IDC_BUTTON_START37 1037
48   -#define IDC_BUTTON_START38 1038
49   -#define IDC_BUTTON_START39 1039
50   -#define IDC_BUTTON_START40 1040
51   -#define IDC_BUTTON_START41 1041
52   -#define IDC_BUTTON_START42 1042
53   -#define IDC_BUTTON_START43 1043
54   -#define IDC_BUTTON_START44 1044
55   -#define IDC_BUTTON_START45 1045
56   -#define IDC_BUTTON_START46 1046
57   -#define IDC_BUTTON_START47 1047
58   -#define IDC_BUTTON_START48 1048
59   -#define IDC_BUTTON_START49 1049
60   -#define IDC_BUTTON_START50 1050
61   -#define IDC_BUTTON_START51 1051
62   -#define IDC_BUTTON_START52 1052
63   -#define IDC_BUTTON_START53 1053
64   -#define IDC_BUTTON_START54 1054
65   -#define IDC_BUTTON_START55 1055
66   -#define IDC_BUTTON_START56 1056
67   -#define IDC_BUTTON_START57 1057
68   -#define IDC_BUTTON_START58 1058
69   -#define IDC_BUTTON_START59 1059
70   -#define IDC_BUTTON_START60 1060
71   -#define IDC_BUTTON_START61 1061
72   -#define IDC_BUTTON_START62 1062
73   -#define IDC_BUTTON_START63 1063
74   -#define IDC_BUTTON_START64 1064
75   -#define IDC_BUTTON_START65 1065
76   -#define IDC_BUTTON_START66 1066
77   -#define IDC_BUTTON_START67 1067
78   -#define IDC_BUTTON_START68 1068
79   -#define IDC_BUTTON_START69 1069
80   -#define IDC_BUTTON_START70 1070
81   -#define IDC_BUTTON_START71 1071
82   -#define IDC_BUTTON_START72 1072
83   -#define IDC_BUTTON_START73 1073
84   -#define IDC_BUTTON_START74 1074
85   -#define IDC_BUTTON_START75 1075
86   -#define IDC_BUTTON_START76 1076
87   -#define IDC_BUTTON_START77 1077
88   -#define IDC_BUTTON_START78 1078
89   -#define IDC_BUTTON_START79 1079
90   -#define IDC_BUTTON_START80 1080
91   -#define IDC_BUTTON_START81 1081
92   -#define IDC_BUTTON_START82 1082
93   -#define IDC_BUTTON_START83 1083
94   -#define IDC_BUTTON_START84 1084
95   -#define IDC_BUTTON_START85 1085
96   -#define IDC_BUTTON_START86 1086
97   -#define IDC_BUTTON_START87 1087
98   -#define IDC_BUTTON_START88 1088
99   -#define IDC_BUTTON_START89 1089
100   -#define IDC_BUTTON_START90 1090
101   -#define IDC_BUTTON_START91 1091
102   -#define IDC_BUTTON_START92 1092
103   -#define IDC_BUTTON_START93 1093
104   -#define IDC_BUTTON_START94 1094
105   -#define IDC_BUTTON_START95 1095
106   -#define IDC_BUTTON_START96 1096
107   -#define IDC_BUTTON_START97 1097
108   -#define IDC_BUTTON_START98 1098
109   -#define IDC_BUTTON_START99 1099
110   -#define IDC_PROGRESS_FLASH0 1200
111   -#define IDC_PROGRESS_FLASH1 1201
112   -#define IDC_PROGRESS_FLASH2 1202
113   -#define IDC_PROGRESS_FLASH3 1203
114   -#define IDC_PROGRESS_FLASH4 1204
115   -#define IDC_PROGRESS_FLASH5 1205
116   -#define IDC_PROGRESS_FLASH6 1206
117   -#define IDC_PROGRESS_FLASH7 1207
118   -#define IDC_PROGRESS_FLASH8 1208
119   -#define IDC_PROGRESS_FLASH9 1209
120   -#define IDC_PROGRESS_FLASH10 1210
121   -#define IDC_PROGRESS_FLASH11 1211
122   -#define IDC_PROGRESS_FLASH12 1212
123   -#define IDC_PROGRESS_FLASH13 1213
124   -#define IDC_PROGRESS_FLASH14 1214
125   -#define IDC_PROGRESS_FLASH15 1215
126   -#define IDC_PROGRESS_FLASH16 1216
127   -#define IDC_PROGRESS_FLASH17 1217
128   -#define IDC_PROGRESS_FLASH18 1218
129   -#define IDC_PROGRESS_FLASH19 1219
130   -#define IDC_PROGRESS_FLASH20 1220
131   -#define IDC_PROGRESS_FLASH21 1221
132   -#define IDC_PROGRESS_FLASH22 1222
133   -#define IDC_PROGRESS_FLASH23 1223
134   -#define IDC_PROGRESS_FLASH24 1224
135   -#define IDC_PROGRESS_FLASH25 1225
136   -#define IDC_PROGRESS_FLASH26 1226
137   -#define IDC_PROGRESS_FLASH27 1227
138   -#define IDC_PROGRESS_FLASH28 1228
139   -#define IDC_PROGRESS_FLASH29 1229
140   -#define IDC_PROGRESS_FLASH30 1230
141   -#define IDC_PROGRESS_FLASH31 1231
142   -#define IDC_PROGRESS_FLASH32 1232
143   -#define IDC_PROGRESS_FLASH33 1233
144   -#define IDC_PROGRESS_FLASH34 1234
145   -#define IDC_PROGRESS_FLASH35 1235
146   -#define IDC_PROGRESS_FLASH36 1236
147   -#define IDC_PROGRESS_FLASH37 1237
148   -#define IDC_PROGRESS_FLASH38 1238
149   -#define IDC_PROGRESS_FLASH39 1239
150   -#define IDC_PROGRESS_FLASH40 1240
151   -#define IDC_PROGRESS_FLASH41 1241
152   -#define IDC_PROGRESS_FLASH42 1242
153   -#define IDC_PROGRESS_FLASH43 1243
154   -#define IDC_PROGRESS_FLASH44 1244
155   -#define IDC_PROGRESS_FLASH45 1245
156   -#define IDC_PROGRESS_FLASH46 1246
157   -#define IDC_PROGRESS_FLASH47 1247
158   -#define IDC_PROGRESS_FLASH48 1248
159   -#define IDC_PROGRESS_FLASH49 1249
160   -#define IDC_PROGRESS_FLASH50 1250
161   -#define IDC_PROGRESS_FLASH51 1251
162   -#define IDC_PROGRESS_FLASH52 1252
163   -#define IDC_PROGRESS_FLASH53 1253
164   -#define IDC_PROGRESS_FLASH54 1254
165   -#define IDC_PROGRESS_FLASH55 1255
166   -#define IDC_PROGRESS_FLASH56 1256
167   -#define IDC_PROGRESS_FLASH57 1257
168   -#define IDC_PROGRESS_FLASH58 1258
169   -#define IDC_PROGRESS_FLASH59 1259
170   -#define IDC_PROGRESS_FLASH60 1260
171   -#define IDC_PROGRESS_FLASH61 1261
172   -#define IDC_PROGRESS_FLASH62 1262
173   -#define IDC_PROGRESS_FLASH63 1263
174   -#define IDC_PROGRESS_FLASH64 1264
175   -#define IDC_PROGRESS_FLASH65 1265
176   -#define IDC_PROGRESS_FLASH66 1266
177   -#define IDC_PROGRESS_FLASH67 1267
178   -#define IDC_PROGRESS_FLASH68 1268
179   -#define IDC_PROGRESS_FLASH69 1269
180   -#define IDC_PROGRESS_FLASH70 1270
181   -#define IDC_PROGRESS_FLASH71 1271
182   -#define IDC_PROGRESS_FLASH72 1272
183   -#define IDC_PROGRESS_FLASH73 1273
184   -#define IDC_PROGRESS_FLASH74 1274
185   -#define IDC_PROGRESS_FLASH75 1275
186   -#define IDC_PROGRESS_FLASH76 1276
187   -#define IDC_PROGRESS_FLASH77 1277
188   -#define IDC_PROGRESS_FLASH78 1278
189   -#define IDC_PROGRESS_FLASH79 1279
190   -#define IDC_PROGRESS_FLASH80 1280
191   -#define IDC_PROGRESS_FLASH81 1281
192   -#define IDC_PROGRESS_FLASH82 1282
193   -#define IDC_PROGRESS_FLASH83 1283
194   -#define IDC_PROGRESS_FLASH84 1284
195   -#define IDC_PROGRESS_FLASH85 1285
196   -#define IDC_PROGRESS_FLASH86 1286
197   -#define IDC_PROGRESS_FLASH87 1287
198   -#define IDC_PROGRESS_FLASH88 1288
199   -#define IDC_PROGRESS_FLASH89 1289
200   -#define IDC_PROGRESS_FLASH90 1290
201   -#define IDC_PROGRESS_FLASH91 1291
202   -#define IDC_PROGRESS_FLASH92 1292
203   -#define IDC_PROGRESS_FLASH93 1293
204   -#define IDC_PROGRESS_FLASH94 1294
205   -#define IDC_PROGRESS_FLASH95 1295
206   -#define IDC_PROGRESS_FLASH96 1296
207   -#define IDC_PROGRESS_FLASH97 1297
208   -#define IDC_PROGRESS_FLASH98 1298
209   -#define IDC_PROGRESS_FLASH99 1299
  10 +#define IDC_BUTTON_START0 1000
  11 +#define IDC_BUTTON_START1 1001
  12 +#define IDC_BUTTON_START2 1002
  13 +#define IDC_BUTTON_START3 1003
  14 +#define IDC_BUTTON_START4 1004
  15 +#define IDC_BUTTON_START5 1005
  16 +#define IDC_BUTTON_START6 1006
  17 +#define IDC_BUTTON_START7 1007
  18 +#define IDC_BUTTON_START8 1008
  19 +#define IDC_BUTTON_START9 1009
  20 +#define IDC_BUTTON_START10 1010
  21 +#define IDC_BUTTON_START11 1011
  22 +#define IDC_BUTTON_START12 1012
  23 +#define IDC_BUTTON_START13 1013
  24 +#define IDC_BUTTON_START14 1014
  25 +#define IDC_BUTTON_START15 1015
  26 +#define IDC_BUTTON_START16 1016
  27 +#define IDC_BUTTON_START17 1017
  28 +#define IDC_BUTTON_START18 1018
  29 +#define IDC_BUTTON_START19 1019
  30 +#define IDC_BUTTON_START20 1020
  31 +#define IDC_BUTTON_START21 1021
  32 +#define IDC_BUTTON_START22 1022
  33 +#define IDC_BUTTON_START23 1023
  34 +#define IDC_BUTTON_START24 1024
  35 +#define IDC_BUTTON_START25 1025
  36 +#define IDC_BUTTON_START26 1026
  37 +#define IDC_BUTTON_START27 1027
  38 +#define IDC_BUTTON_START28 1028
  39 +#define IDC_BUTTON_START29 1029
  40 +#define IDC_BUTTON_START30 1030
  41 +#define IDC_BUTTON_START31 1031
  42 +#define IDC_BUTTON_START32 1032
  43 +#define IDC_BUTTON_START33 1033
  44 +#define IDC_BUTTON_START34 1034
  45 +#define IDC_BUTTON_START35 1035
  46 +#define IDC_BUTTON_START36 1036
  47 +#define IDC_BUTTON_START37 1037
  48 +#define IDC_BUTTON_START38 1038
  49 +#define IDC_BUTTON_START39 1039
  50 +#define IDC_BUTTON_START40 1040
  51 +#define IDC_BUTTON_START41 1041
  52 +#define IDC_BUTTON_START42 1042
  53 +#define IDC_BUTTON_START43 1043
  54 +#define IDC_BUTTON_START44 1044
  55 +#define IDC_BUTTON_START45 1045
  56 +#define IDC_BUTTON_START46 1046
  57 +#define IDC_BUTTON_START47 1047
  58 +#define IDC_BUTTON_START48 1048
  59 +#define IDC_BUTTON_START49 1049
  60 +#define IDC_BUTTON_START50 1050
  61 +#define IDC_BUTTON_START51 1051
  62 +#define IDC_BUTTON_START52 1052
  63 +#define IDC_BUTTON_START53 1053
  64 +#define IDC_BUTTON_START54 1054
  65 +#define IDC_BUTTON_START55 1055
  66 +#define IDC_BUTTON_START56 1056
  67 +#define IDC_BUTTON_START57 1057
  68 +#define IDC_BUTTON_START58 1058
  69 +#define IDC_BUTTON_START59 1059
  70 +#define IDC_BUTTON_START60 1060
  71 +#define IDC_BUTTON_START61 1061
  72 +#define IDC_BUTTON_START62 1062
  73 +#define IDC_BUTTON_START63 1063
  74 +#define IDC_BUTTON_START64 1064
  75 +#define IDC_BUTTON_START65 1065
  76 +#define IDC_BUTTON_START66 1066
  77 +#define IDC_BUTTON_START67 1067
  78 +#define IDC_BUTTON_START68 1068
  79 +#define IDC_BUTTON_START69 1069
  80 +#define IDC_BUTTON_START70 1070
  81 +#define IDC_BUTTON_START71 1071
  82 +#define IDC_BUTTON_START72 1072
  83 +#define IDC_BUTTON_START73 1073
  84 +#define IDC_BUTTON_START74 1074
  85 +#define IDC_BUTTON_START75 1075
  86 +#define IDC_BUTTON_START76 1076
  87 +#define IDC_BUTTON_START77 1077
  88 +#define IDC_BUTTON_START78 1078
  89 +#define IDC_BUTTON_START79 1079
  90 +#define IDC_BUTTON_START80 1080
  91 +#define IDC_BUTTON_START81 1081
  92 +#define IDC_BUTTON_START82 1082
  93 +#define IDC_BUTTON_START83 1083
  94 +#define IDC_BUTTON_START84 1084
  95 +#define IDC_BUTTON_START85 1085
  96 +#define IDC_BUTTON_START86 1086
  97 +#define IDC_BUTTON_START87 1087
  98 +#define IDC_BUTTON_START88 1088
  99 +#define IDC_BUTTON_START89 1089
  100 +#define IDC_BUTTON_START90 1090
  101 +#define IDC_BUTTON_START91 1091
  102 +#define IDC_BUTTON_START92 1092
  103 +#define IDC_BUTTON_START93 1093
  104 +#define IDC_BUTTON_START94 1094
  105 +#define IDC_BUTTON_START95 1095
  106 +#define IDC_BUTTON_START96 1096
  107 +#define IDC_BUTTON_START97 1097
  108 +#define IDC_BUTTON_START98 1098
  109 +#define IDC_BUTTON_START99 1099
  110 +#define IDC_STATIC_GROUP_EAR 1148
  111 +#define IDC_STATIC_GROUP_USB 1149
  112 +#define IDC_STATIC_GROUP_DEBUG_INFO 1150
  113 +#define IDC_PROGRESS_FLASH0 1200
  114 +#define IDC_PROGRESS_FLASH1 1201
  115 +#define IDC_PROGRESS_FLASH2 1202
  116 +#define IDC_PROGRESS_FLASH3 1203
  117 +#define IDC_PROGRESS_FLASH4 1204
  118 +#define IDC_PROGRESS_FLASH5 1205
  119 +#define IDC_PROGRESS_FLASH6 1206
  120 +#define IDC_PROGRESS_FLASH7 1207
  121 +#define IDC_PROGRESS_FLASH8 1208
  122 +#define IDC_PROGRESS_FLASH9 1209
  123 +#define IDC_PROGRESS_FLASH10 1210
  124 +#define IDC_PROGRESS_FLASH11 1211
  125 +#define IDC_PROGRESS_FLASH12 1212
  126 +#define IDC_PROGRESS_FLASH13 1213
  127 +#define IDC_PROGRESS_FLASH14 1214
  128 +#define IDC_PROGRESS_FLASH15 1215
  129 +#define IDC_PROGRESS_FLASH16 1216
  130 +#define IDC_PROGRESS_FLASH17 1217
  131 +#define IDC_PROGRESS_FLASH18 1218
  132 +#define IDC_PROGRESS_FLASH19 1219
  133 +#define IDC_PROGRESS_FLASH20 1220
  134 +#define IDC_PROGRESS_FLASH21 1221
  135 +#define IDC_PROGRESS_FLASH22 1222
  136 +#define IDC_PROGRESS_FLASH23 1223
  137 +#define IDC_PROGRESS_FLASH24 1224
  138 +#define IDC_PROGRESS_FLASH25 1225
  139 +#define IDC_PROGRESS_FLASH26 1226
  140 +#define IDC_PROGRESS_FLASH27 1227
  141 +#define IDC_PROGRESS_FLASH28 1228
  142 +#define IDC_PROGRESS_FLASH29 1229
  143 +#define IDC_PROGRESS_FLASH30 1230
  144 +#define IDC_PROGRESS_FLASH31 1231
  145 +#define IDC_PROGRESS_FLASH32 1232
  146 +#define IDC_PROGRESS_FLASH33 1233
  147 +#define IDC_PROGRESS_FLASH34 1234
  148 +#define IDC_PROGRESS_FLASH35 1235
  149 +#define IDC_PROGRESS_FLASH36 1236
  150 +#define IDC_PROGRESS_FLASH37 1237
  151 +#define IDC_PROGRESS_FLASH38 1238
  152 +#define IDC_PROGRESS_FLASH39 1239
  153 +#define IDC_PROGRESS_FLASH40 1240
  154 +#define IDC_PROGRESS_FLASH41 1241
  155 +#define IDC_PROGRESS_FLASH42 1242
  156 +#define IDC_PROGRESS_FLASH43 1243
  157 +#define IDC_PROGRESS_FLASH44 1244
  158 +#define IDC_PROGRESS_FLASH45 1245
  159 +#define IDC_PROGRESS_FLASH46 1246
  160 +#define IDC_PROGRESS_FLASH47 1247
  161 +#define IDC_PROGRESS_FLASH48 1248
  162 +#define IDC_PROGRESS_FLASH49 1249
  163 +#define IDC_PROGRESS_FLASH50 1250
  164 +#define IDC_PROGRESS_FLASH51 1251
  165 +#define IDC_PROGRESS_FLASH52 1252
  166 +#define IDC_PROGRESS_FLASH53 1253
  167 +#define IDC_PROGRESS_FLASH54 1254
  168 +#define IDC_PROGRESS_FLASH55 1255
  169 +#define IDC_PROGRESS_FLASH56 1256
  170 +#define IDC_PROGRESS_FLASH57 1257
  171 +#define IDC_PROGRESS_FLASH58 1258
  172 +#define IDC_PROGRESS_FLASH59 1259
  173 +#define IDC_PROGRESS_FLASH60 1260
  174 +#define IDC_PROGRESS_FLASH61 1261
  175 +#define IDC_PROGRESS_FLASH62 1262
  176 +#define IDC_PROGRESS_FLASH63 1263
  177 +#define IDC_PROGRESS_FLASH64 1264
  178 +#define IDC_PROGRESS_FLASH65 1265
  179 +#define IDC_PROGRESS_FLASH66 1266
  180 +#define IDC_PROGRESS_FLASH67 1267
  181 +#define IDC_PROGRESS_FLASH68 1268
  182 +#define IDC_PROGRESS_FLASH69 1269
  183 +#define IDC_PROGRESS_FLASH70 1270
  184 +#define IDC_PROGRESS_FLASH71 1271
  185 +#define IDC_PROGRESS_FLASH72 1272
  186 +#define IDC_PROGRESS_FLASH73 1273
  187 +#define IDC_PROGRESS_FLASH74 1274
  188 +#define IDC_PROGRESS_FLASH75 1275
  189 +#define IDC_PROGRESS_FLASH76 1276
  190 +#define IDC_PROGRESS_FLASH77 1277
  191 +#define IDC_PROGRESS_FLASH78 1278
  192 +#define IDC_PROGRESS_FLASH79 1279
  193 +#define IDC_PROGRESS_FLASH80 1280
  194 +#define IDC_PROGRESS_FLASH81 1281
  195 +#define IDC_PROGRESS_FLASH82 1282
  196 +#define IDC_PROGRESS_FLASH83 1283
  197 +#define IDC_PROGRESS_FLASH84 1284
  198 +#define IDC_PROGRESS_FLASH85 1285
  199 +#define IDC_PROGRESS_FLASH86 1286
  200 +#define IDC_PROGRESS_FLASH87 1287
  201 +#define IDC_PROGRESS_FLASH88 1288
  202 +#define IDC_PROGRESS_FLASH89 1289
  203 +#define IDC_PROGRESS_FLASH90 1290
  204 +#define IDC_PROGRESS_FLASH91 1291
  205 +#define IDC_PROGRESS_FLASH92 1292
  206 +#define IDC_PROGRESS_FLASH93 1293
  207 +#define IDC_PROGRESS_FLASH94 1294
  208 +#define IDC_PROGRESS_FLASH95 1295
  209 +#define IDC_PROGRESS_FLASH96 1296
  210 +#define IDC_PROGRESS_FLASH97 1297
  211 +#define IDC_PROGRESS_FLASH98 1298
  212 +#define IDC_PROGRESS_FLASH99 1299
210 213 #define IDC_MSCOMM0 1300
211 214 #define IDC_MSCOMM1 1301
212 215 #define IDC_MSCOMM2 1302
... ... @@ -258,306 +261,306 @@
258 261 #define IDC_MSCOMM48 1348
259 262 #define IDC_MSCOMM49 1349
260 263 #define IDC_MSCOMM50 1350
261   -#define IDC_PCB_STATE0 1400
262   -#define IDC_PCB_STATE1 1401
263   -#define IDC_PCB_STATE2 1402
264   -#define IDC_PCB_STATE3 1403
265   -#define IDC_PCB_STATE4 1404
266   -#define IDC_PCB_STATE5 1405
267   -#define IDC_PCB_STATE6 1406
268   -#define IDC_PCB_STATE7 1407
269   -#define IDC_PCB_STATE8 1408
270   -#define IDC_PCB_STATE9 1409
271   -#define IDC_PCB_STATE10 1410
272   -#define IDC_PCB_STATE11 1411
273   -#define IDC_PCB_STATE12 1412
274   -#define IDC_PCB_STATE13 1413
275   -#define IDC_PCB_STATE14 1414
276   -#define IDC_PCB_STATE15 1415
277   -#define IDC_PCB_STATE16 1416
278   -#define IDC_PCB_STATE17 1417
279   -#define IDC_PCB_STATE18 1418
280   -#define IDC_PCB_STATE19 1419
281   -#define IDC_PCB_STATE20 1420
282   -#define IDC_PCB_STATE21 1421
283   -#define IDC_PCB_STATE22 1422
284   -#define IDC_PCB_STATE23 1423
285   -#define IDC_PCB_STATE24 1424
286   -#define IDC_PCB_STATE25 1425
287   -#define IDC_PCB_STATE26 1426
288   -#define IDC_PCB_STATE27 1427
289   -#define IDC_PCB_STATE28 1428
290   -#define IDC_PCB_STATE29 1429
291   -#define IDC_PCB_STATE30 1430
292   -#define IDC_PCB_STATE31 1431
293   -#define IDC_PCB_STATE32 1432
294   -#define IDC_PCB_STATE33 1433
295   -#define IDC_PCB_STATE34 1434
296   -#define IDC_PCB_STATE35 1435
297   -#define IDC_PCB_STATE36 1436
298   -#define IDC_PCB_STATE37 1437
299   -#define IDC_PCB_STATE38 1438
300   -#define IDC_PCB_STATE39 1439
301   -#define IDC_PCB_STATE40 1440
302   -#define IDC_PCB_STATE41 1441
303   -#define IDC_PCB_STATE42 1442
304   -#define IDC_PCB_STATE43 1443
305   -#define IDC_PCB_STATE44 1444
306   -#define IDC_PCB_STATE45 1445
307   -#define IDC_PCB_STATE46 1446
308   -#define IDC_PCB_STATE47 1447
309   -#define IDC_PCB_STATE48 1448
310   -#define IDC_PCB_STATE49 1449
311   -#define IDC_PCB_STATE50 1450
312   -#define IDC_PCB_STATE51 1451
313   -#define IDC_PCB_STATE52 1452
314   -#define IDC_PCB_STATE53 1453
315   -#define IDC_PCB_STATE54 1454
316   -#define IDC_PCB_STATE55 1455
317   -#define IDC_PCB_STATE56 1456
318   -#define IDC_PCB_STATE57 1457
319   -#define IDC_PCB_STATE58 1458
320   -#define IDC_PCB_STATE59 1459
321   -#define IDC_PCB_STATE60 1460
322   -#define IDC_PCB_STATE61 1461
323   -#define IDC_PCB_STATE62 1462
324   -#define IDC_PCB_STATE63 1463
325   -#define IDC_PCB_STATE64 1464
326   -#define IDC_PCB_STATE65 1465
327   -#define IDC_PCB_STATE66 1466
328   -#define IDC_PCB_STATE67 1467
329   -#define IDC_PCB_STATE68 1468
330   -#define IDC_PCB_STATE69 1469
331   -#define IDC_PCB_STATE70 1470
332   -#define IDC_PCB_STATE71 1471
333   -#define IDC_PCB_STATE72 1472
334   -#define IDC_PCB_STATE73 1473
335   -#define IDC_PCB_STATE74 1474
336   -#define IDC_PCB_STATE75 1475
337   -#define IDC_PCB_STATE76 1476
338   -#define IDC_PCB_STATE77 1477
339   -#define IDC_PCB_STATE78 1478
340   -#define IDC_PCB_STATE79 1479
341   -#define IDC_PCB_STATE80 1480
342   -#define IDC_PCB_STATE81 1481
343   -#define IDC_PCB_STATE82 1482
344   -#define IDC_PCB_STATE83 1483
345   -#define IDC_PCB_STATE84 1484
346   -#define IDC_PCB_STATE85 1485
347   -#define IDC_PCB_STATE86 1486
348   -#define IDC_PCB_STATE87 1487
349   -#define IDC_PCB_STATE88 1488
350   -#define IDC_PCB_STATE89 1489
351   -#define IDC_PCB_STATE90 1490
352   -#define IDC_PCB_STATE91 1491
353   -#define IDC_PCB_STATE92 1492
354   -#define IDC_PCB_STATE93 1493
355   -#define IDC_PCB_STATE94 1494
356   -#define IDC_PCB_STATE95 1495
357   -#define IDC_PCB_STATE96 1496
358   -#define IDC_PCB_STATE97 1497
359   -#define IDC_PCB_STATE98 1498
360   -#define IDC_PCB_STATE99 1499
361   -#define IDC_UART_CONFIG0 1500
362   -#define IDC_UART_CONFIG1 1501
363   -#define IDC_UART_CONFIG2 1502
364   -#define IDC_UART_CONFIG3 1503
365   -#define IDC_UART_CONFIG4 1504
366   -#define IDC_UART_CONFIG5 1505
367   -#define IDC_UART_CONFIG6 1506
368   -#define IDC_UART_CONFIG7 1507
369   -#define IDC_UART_CONFIG8 1508
370   -#define IDC_UART_CONFIG9 1509
371   -#define IDC_UART_CONFIG10 1510
372   -#define IDC_UART_CONFIG11 1511
373   -#define IDC_UART_CONFIG12 1512
374   -#define IDC_UART_CONFIG13 1513
375   -#define IDC_UART_CONFIG14 1514
376   -#define IDC_UART_CONFIG15 1515
377   -#define IDC_UART_CONFIG16 1516
378   -#define IDC_UART_CONFIG17 1517
379   -#define IDC_UART_CONFIG18 1518
380   -#define IDC_UART_CONFIG19 1519
381   -#define IDC_UART_CONFIG20 1520
382   -#define IDC_UART_CONFIG21 1521
383   -#define IDC_UART_CONFIG22 1522
384   -#define IDC_UART_CONFIG23 1523
385   -#define IDC_UART_CONFIG24 1524
386   -#define IDC_UART_CONFIG25 1525
387   -#define IDC_UART_CONFIG26 1526
388   -#define IDC_UART_CONFIG27 1527
389   -#define IDC_UART_CONFIG28 1528
390   -#define IDC_UART_CONFIG29 1529
391   -#define IDC_UART_CONFIG30 1530
392   -#define IDC_UART_CONFIG31 1531
393   -#define IDC_UART_CONFIG32 1532
394   -#define IDC_UART_CONFIG33 1533
395   -#define IDC_UART_CONFIG34 1534
396   -#define IDC_UART_CONFIG35 1535
397   -#define IDC_UART_CONFIG36 1536
398   -#define IDC_UART_CONFIG37 1537
399   -#define IDC_UART_CONFIG38 1538
400   -#define IDC_UART_CONFIG39 1539
401   -#define IDC_UART_CONFIG40 1540
402   -#define IDC_UART_CONFIG41 1541
403   -#define IDC_UART_CONFIG42 1542
404   -#define IDC_UART_CONFIG43 1543
405   -#define IDC_UART_CONFIG44 1544
406   -#define IDC_UART_CONFIG45 1545
407   -#define IDC_UART_CONFIG46 1546
408   -#define IDC_UART_CONFIG47 1547
409   -#define IDC_UART_CONFIG48 1548
410   -#define IDC_UART_CONFIG49 1549
411   -#define IDC_UART_CONFIG50 1550
412   -#define IDC_UART_CONFIG51 1551
413   -#define IDC_UART_CONFIG52 1552
414   -#define IDC_UART_CONFIG53 1553
415   -#define IDC_UART_CONFIG54 1554
416   -#define IDC_UART_CONFIG55 1555
417   -#define IDC_UART_CONFIG56 1556
418   -#define IDC_UART_CONFIG57 1557
419   -#define IDC_UART_CONFIG58 1558
420   -#define IDC_UART_CONFIG59 1559
421   -#define IDC_UART_CONFIG60 1560
422   -#define IDC_UART_CONFIG61 1561
423   -#define IDC_UART_CONFIG62 1562
424   -#define IDC_UART_CONFIG63 1563
425   -#define IDC_UART_CONFIG64 1564
426   -#define IDC_UART_CONFIG65 1565
427   -#define IDC_UART_CONFIG66 1566
428   -#define IDC_UART_CONFIG67 1567
429   -#define IDC_UART_CONFIG68 1568
430   -#define IDC_UART_CONFIG69 1569
431   -#define IDC_UART_CONFIG70 1570
432   -#define IDC_UART_CONFIG71 1571
433   -#define IDC_UART_CONFIG72 1572
434   -#define IDC_UART_CONFIG73 1573
435   -#define IDC_UART_CONFIG74 1574
436   -#define IDC_UART_CONFIG75 1575
437   -#define IDC_UART_CONFIG76 1576
438   -#define IDC_UART_CONFIG77 1577
439   -#define IDC_UART_CONFIG78 1578
440   -#define IDC_UART_CONFIG79 1579
441   -#define IDC_UART_CONFIG80 1580
442   -#define IDC_UART_CONFIG81 1581
443   -#define IDC_UART_CONFIG82 1582
444   -#define IDC_UART_CONFIG83 1583
445   -#define IDC_UART_CONFIG84 1584
446   -#define IDC_UART_CONFIG85 1585
447   -#define IDC_UART_CONFIG86 1586
448   -#define IDC_UART_CONFIG87 1587
449   -#define IDC_UART_CONFIG88 1588
450   -#define IDC_UART_CONFIG89 1589
451   -#define IDC_UART_CONFIG90 1590
452   -#define IDC_UART_CONFIG91 1591
453   -#define IDC_UART_CONFIG92 1592
454   -#define IDC_UART_CONFIG93 1593
455   -#define IDC_UART_CONFIG94 1594
456   -#define IDC_UART_CONFIG95 1595
457   -#define IDC_UART_CONFIG96 1596
458   -#define IDC_UART_CONFIG97 1597
459   -#define IDC_UART_CONFIG98 1598
460   -#define IDC_UART_CONFIG99 1599
461   -#define IDC_STATIC_GROUP0 1600
462   -#define IDC_STATIC_GROUP1 1601
463   -#define IDC_STATIC_GROUP2 1602
464   -#define IDC_STATIC_GROUP3 1603
465   -#define IDC_STATIC_GROUP4 1604
466   -#define IDC_STATIC_GROUP5 1605
467   -#define IDC_STATIC_GROUP6 1606
468   -#define IDC_STATIC_GROUP7 1607
469   -#define IDC_STATIC_GROUP8 1608
470   -#define IDC_STATIC_GROUP9 1609
471   -#define IDC_STATIC_GROUP10 1610
472   -#define IDC_STATIC_GROUP11 1611
473   -#define IDC_STATIC_GROUP12 1612
474   -#define IDC_STATIC_GROUP13 1613
475   -#define IDC_STATIC_GROUP14 1614
476   -#define IDC_STATIC_GROUP15 1615
477   -#define IDC_STATIC_GROUP16 1616
478   -#define IDC_STATIC_GROUP17 1617
479   -#define IDC_STATIC_GROUP18 1618
480   -#define IDC_STATIC_GROUP19 1619
481   -#define IDC_STATIC_GROUP20 1620
482   -#define IDC_STATIC_GROUP21 1621
483   -#define IDC_STATIC_GROUP22 1622
484   -#define IDC_STATIC_GROUP23 1623
485   -#define IDC_STATIC_GROUP24 1624
486   -#define IDC_STATIC_GROUP25 1625
487   -#define IDC_STATIC_GROUP26 1626
488   -#define IDC_STATIC_GROUP27 1627
489   -#define IDC_STATIC_GROUP28 1628
490   -#define IDC_STATIC_GROUP29 1629
491   -#define IDC_STATIC_GROUP30 1630
492   -#define IDC_STATIC_GROUP31 1631
493   -#define IDC_STATIC_GROUP32 1632
494   -#define IDC_STATIC_GROUP33 1633
495   -#define IDC_STATIC_GROUP34 1634
496   -#define IDC_STATIC_GROUP35 1635
497   -#define IDC_STATIC_GROUP36 1636
498   -#define IDC_STATIC_GROUP37 1637
499   -#define IDC_STATIC_GROUP38 1638
500   -#define IDC_STATIC_GROUP39 1639
501   -#define IDC_STATIC_GROUP40 1640
502   -#define IDC_STATIC_GROUP41 1641
503   -#define IDC_STATIC_GROUP42 1642
504   -#define IDC_STATIC_GROUP43 1643
505   -#define IDC_STATIC_GROUP44 1644
506   -#define IDC_STATIC_GROUP45 1645
507   -#define IDC_STATIC_GROUP46 1646
508   -#define IDC_STATIC_GROUP47 1647
509   -#define IDC_STATIC_GROUP48 1648
510   -#define IDC_STATIC_GROUP49 1649
511   -#define IDC_STATIC_GROUP50 1650
512   -#define IDC_STATIC_GROUP51 1651
513   -#define IDC_STATIC_GROUP52 1652
514   -#define IDC_STATIC_GROUP53 1653
515   -#define IDC_STATIC_GROUP54 1654
516   -#define IDC_STATIC_GROUP55 1655
517   -#define IDC_STATIC_GROUP56 1656
518   -#define IDC_STATIC_GROUP57 1657
519   -#define IDC_STATIC_GROUP58 1658
520   -#define IDC_STATIC_GROUP59 1659
521   -#define IDC_STATIC_GROUP60 1660
522   -#define IDC_STATIC_GROUP61 1661
523   -#define IDC_STATIC_GROUP62 1662
524   -#define IDC_STATIC_GROUP63 1663
525   -#define IDC_STATIC_GROUP64 1664
526   -#define IDC_STATIC_GROUP65 1665
527   -#define IDC_STATIC_GROUP66 1666
528   -#define IDC_STATIC_GROUP67 1667
529   -#define IDC_STATIC_GROUP68 1668
530   -#define IDC_STATIC_GROUP69 1669
531   -#define IDC_STATIC_GROUP70 1670
532   -#define IDC_STATIC_GROUP71 1671
533   -#define IDC_STATIC_GROUP72 1672
534   -#define IDC_STATIC_GROUP73 1673
535   -#define IDC_STATIC_GROUP74 1674
536   -#define IDC_STATIC_GROUP75 1675
537   -#define IDC_STATIC_GROUP76 1676
538   -#define IDC_STATIC_GROUP77 1677
539   -#define IDC_STATIC_GROUP78 1678
540   -#define IDC_STATIC_GROUP79 1679
541   -#define IDC_STATIC_GROUP80 1680
542   -#define IDC_STATIC_GROUP81 1681
543   -#define IDC_STATIC_GROUP82 1682
544   -#define IDC_STATIC_GROUP83 1683
545   -#define IDC_STATIC_GROUP84 1684
546   -#define IDC_STATIC_GROUP85 1685
547   -#define IDC_STATIC_GROUP86 1686
548   -#define IDC_STATIC_GROUP87 1687
549   -#define IDC_STATIC_GROUP88 1688
550   -#define IDC_STATIC_GROUP89 1689
551   -#define IDC_STATIC_GROUP90 1690
552   -#define IDC_STATIC_GROUP91 1691
553   -#define IDC_STATIC_GROUP92 1692
554   -#define IDC_STATIC_GROUP93 1693
555   -#define IDC_STATIC_GROUP94 1694
556   -#define IDC_STATIC_GROUP95 1695
557   -#define IDC_STATIC_GROUP96 1696
558   -#define IDC_STATIC_GROUP97 1697
559   -#define IDC_STATIC_GROUP98 1698
560   -#define IDC_STATIC_GROUP99 1699
  264 +#define IDC_PCB_STATE0 1400
  265 +#define IDC_PCB_STATE1 1401
  266 +#define IDC_PCB_STATE2 1402
  267 +#define IDC_PCB_STATE3 1403
  268 +#define IDC_PCB_STATE4 1404
  269 +#define IDC_PCB_STATE5 1405
  270 +#define IDC_PCB_STATE6 1406
  271 +#define IDC_PCB_STATE7 1407
  272 +#define IDC_PCB_STATE8 1408
  273 +#define IDC_PCB_STATE9 1409
  274 +#define IDC_PCB_STATE10 1410
  275 +#define IDC_PCB_STATE11 1411
  276 +#define IDC_PCB_STATE12 1412
  277 +#define IDC_PCB_STATE13 1413
  278 +#define IDC_PCB_STATE14 1414
  279 +#define IDC_PCB_STATE15 1415
  280 +#define IDC_PCB_STATE16 1416
  281 +#define IDC_PCB_STATE17 1417
  282 +#define IDC_PCB_STATE18 1418
  283 +#define IDC_PCB_STATE19 1419
  284 +#define IDC_PCB_STATE20 1420
  285 +#define IDC_PCB_STATE21 1421
  286 +#define IDC_PCB_STATE22 1422
  287 +#define IDC_PCB_STATE23 1423
  288 +#define IDC_PCB_STATE24 1424
  289 +#define IDC_PCB_STATE25 1425
  290 +#define IDC_PCB_STATE26 1426
  291 +#define IDC_PCB_STATE27 1427
  292 +#define IDC_PCB_STATE28 1428
  293 +#define IDC_PCB_STATE29 1429
  294 +#define IDC_PCB_STATE30 1430
  295 +#define IDC_PCB_STATE31 1431
  296 +#define IDC_PCB_STATE32 1432
  297 +#define IDC_PCB_STATE33 1433
  298 +#define IDC_PCB_STATE34 1434
  299 +#define IDC_PCB_STATE35 1435
  300 +#define IDC_PCB_STATE36 1436
  301 +#define IDC_PCB_STATE37 1437
  302 +#define IDC_PCB_STATE38 1438
  303 +#define IDC_PCB_STATE39 1439
  304 +#define IDC_PCB_STATE40 1440
  305 +#define IDC_PCB_STATE41 1441
  306 +#define IDC_PCB_STATE42 1442
  307 +#define IDC_PCB_STATE43 1443
  308 +#define IDC_PCB_STATE44 1444
  309 +#define IDC_PCB_STATE45 1445
  310 +#define IDC_PCB_STATE46 1446
  311 +#define IDC_PCB_STATE47 1447
  312 +#define IDC_PCB_STATE48 1448
  313 +#define IDC_PCB_STATE49 1449
  314 +#define IDC_PCB_STATE50 1450
  315 +#define IDC_PCB_STATE51 1451
  316 +#define IDC_PCB_STATE52 1452
  317 +#define IDC_PCB_STATE53 1453
  318 +#define IDC_PCB_STATE54 1454
  319 +#define IDC_PCB_STATE55 1455
  320 +#define IDC_PCB_STATE56 1456
  321 +#define IDC_PCB_STATE57 1457
  322 +#define IDC_PCB_STATE58 1458
  323 +#define IDC_PCB_STATE59 1459
  324 +#define IDC_PCB_STATE60 1460
  325 +#define IDC_PCB_STATE61 1461
  326 +#define IDC_PCB_STATE62 1462
  327 +#define IDC_PCB_STATE63 1463
  328 +#define IDC_PCB_STATE64 1464
  329 +#define IDC_PCB_STATE65 1465
  330 +#define IDC_PCB_STATE66 1466
  331 +#define IDC_PCB_STATE67 1467
  332 +#define IDC_PCB_STATE68 1468
  333 +#define IDC_PCB_STATE69 1469
  334 +#define IDC_PCB_STATE70 1470
  335 +#define IDC_PCB_STATE71 1471
  336 +#define IDC_PCB_STATE72 1472
  337 +#define IDC_PCB_STATE73 1473
  338 +#define IDC_PCB_STATE74 1474
  339 +#define IDC_PCB_STATE75 1475
  340 +#define IDC_PCB_STATE76 1476
  341 +#define IDC_PCB_STATE77 1477
  342 +#define IDC_PCB_STATE78 1478
  343 +#define IDC_PCB_STATE79 1479
  344 +#define IDC_PCB_STATE80 1480
  345 +#define IDC_PCB_STATE81 1481
  346 +#define IDC_PCB_STATE82 1482
  347 +#define IDC_PCB_STATE83 1483
  348 +#define IDC_PCB_STATE84 1484
  349 +#define IDC_PCB_STATE85 1485
  350 +#define IDC_PCB_STATE86 1486
  351 +#define IDC_PCB_STATE87 1487
  352 +#define IDC_PCB_STATE88 1488
  353 +#define IDC_PCB_STATE89 1489
  354 +#define IDC_PCB_STATE90 1490
  355 +#define IDC_PCB_STATE91 1491
  356 +#define IDC_PCB_STATE92 1492
  357 +#define IDC_PCB_STATE93 1493
  358 +#define IDC_PCB_STATE94 1494
  359 +#define IDC_PCB_STATE95 1495
  360 +#define IDC_PCB_STATE96 1496
  361 +#define IDC_PCB_STATE97 1497
  362 +#define IDC_PCB_STATE98 1498
  363 +#define IDC_PCB_STATE99 1499
  364 +#define IDC_UART_CONFIG0 1500
  365 +#define IDC_UART_CONFIG1 1501
  366 +#define IDC_UART_CONFIG2 1502
  367 +#define IDC_UART_CONFIG3 1503
  368 +#define IDC_UART_CONFIG4 1504
  369 +#define IDC_UART_CONFIG5 1505
  370 +#define IDC_UART_CONFIG6 1506
  371 +#define IDC_UART_CONFIG7 1507
  372 +#define IDC_UART_CONFIG8 1508
  373 +#define IDC_UART_CONFIG9 1509
  374 +#define IDC_UART_CONFIG10 1510
  375 +#define IDC_UART_CONFIG11 1511
  376 +#define IDC_UART_CONFIG12 1512
  377 +#define IDC_UART_CONFIG13 1513
  378 +#define IDC_UART_CONFIG14 1514
  379 +#define IDC_UART_CONFIG15 1515
  380 +#define IDC_UART_CONFIG16 1516
  381 +#define IDC_UART_CONFIG17 1517
  382 +#define IDC_UART_CONFIG18 1518
  383 +#define IDC_UART_CONFIG19 1519
  384 +#define IDC_UART_CONFIG20 1520
  385 +#define IDC_UART_CONFIG21 1521
  386 +#define IDC_UART_CONFIG22 1522
  387 +#define IDC_UART_CONFIG23 1523
  388 +#define IDC_UART_CONFIG24 1524
  389 +#define IDC_UART_CONFIG25 1525
  390 +#define IDC_UART_CONFIG26 1526
  391 +#define IDC_UART_CONFIG27 1527
  392 +#define IDC_UART_CONFIG28 1528
  393 +#define IDC_UART_CONFIG29 1529
  394 +#define IDC_UART_CONFIG30 1530
  395 +#define IDC_UART_CONFIG31 1531
  396 +#define IDC_UART_CONFIG32 1532
  397 +#define IDC_UART_CONFIG33 1533
  398 +#define IDC_UART_CONFIG34 1534
  399 +#define IDC_UART_CONFIG35 1535
  400 +#define IDC_UART_CONFIG36 1536
  401 +#define IDC_UART_CONFIG37 1537
  402 +#define IDC_UART_CONFIG38 1538
  403 +#define IDC_UART_CONFIG39 1539
  404 +#define IDC_UART_CONFIG40 1540
  405 +#define IDC_UART_CONFIG41 1541
  406 +#define IDC_UART_CONFIG42 1542
  407 +#define IDC_UART_CONFIG43 1543
  408 +#define IDC_UART_CONFIG44 1544
  409 +#define IDC_UART_CONFIG45 1545
  410 +#define IDC_UART_CONFIG46 1546
  411 +#define IDC_UART_CONFIG47 1547
  412 +#define IDC_UART_CONFIG48 1548
  413 +#define IDC_UART_CONFIG49 1549
  414 +#define IDC_UART_CONFIG50 1550
  415 +#define IDC_UART_CONFIG51 1551
  416 +#define IDC_UART_CONFIG52 1552
  417 +#define IDC_UART_CONFIG53 1553
  418 +#define IDC_UART_CONFIG54 1554
  419 +#define IDC_UART_CONFIG55 1555
  420 +#define IDC_UART_CONFIG56 1556
  421 +#define IDC_UART_CONFIG57 1557
  422 +#define IDC_UART_CONFIG58 1558
  423 +#define IDC_UART_CONFIG59 1559
  424 +#define IDC_UART_CONFIG60 1560
  425 +#define IDC_UART_CONFIG61 1561
  426 +#define IDC_UART_CONFIG62 1562
  427 +#define IDC_UART_CONFIG63 1563
  428 +#define IDC_UART_CONFIG64 1564
  429 +#define IDC_UART_CONFIG65 1565
  430 +#define IDC_UART_CONFIG66 1566
  431 +#define IDC_UART_CONFIG67 1567
  432 +#define IDC_UART_CONFIG68 1568
  433 +#define IDC_UART_CONFIG69 1569
  434 +#define IDC_UART_CONFIG70 1570
  435 +#define IDC_UART_CONFIG71 1571
  436 +#define IDC_UART_CONFIG72 1572
  437 +#define IDC_UART_CONFIG73 1573
  438 +#define IDC_UART_CONFIG74 1574
  439 +#define IDC_UART_CONFIG75 1575
  440 +#define IDC_UART_CONFIG76 1576
  441 +#define IDC_UART_CONFIG77 1577
  442 +#define IDC_UART_CONFIG78 1578
  443 +#define IDC_UART_CONFIG79 1579
  444 +#define IDC_UART_CONFIG80 1580
  445 +#define IDC_UART_CONFIG81 1581
  446 +#define IDC_UART_CONFIG82 1582
  447 +#define IDC_UART_CONFIG83 1583
  448 +#define IDC_UART_CONFIG84 1584
  449 +#define IDC_UART_CONFIG85 1585
  450 +#define IDC_UART_CONFIG86 1586
  451 +#define IDC_UART_CONFIG87 1587
  452 +#define IDC_UART_CONFIG88 1588
  453 +#define IDC_UART_CONFIG89 1589
  454 +#define IDC_UART_CONFIG90 1590
  455 +#define IDC_UART_CONFIG91 1591
  456 +#define IDC_UART_CONFIG92 1592
  457 +#define IDC_UART_CONFIG93 1593
  458 +#define IDC_UART_CONFIG94 1594
  459 +#define IDC_UART_CONFIG95 1595
  460 +#define IDC_UART_CONFIG96 1596
  461 +#define IDC_UART_CONFIG97 1597
  462 +#define IDC_UART_CONFIG98 1598
  463 +#define IDC_UART_CONFIG99 1599
  464 +#define IDC_STATIC_GROUP0 1600
  465 +#define IDC_STATIC_GROUP1 1601
  466 +#define IDC_STATIC_GROUP2 1602
  467 +#define IDC_STATIC_GROUP3 1603
  468 +#define IDC_STATIC_GROUP4 1604
  469 +#define IDC_STATIC_GROUP5 1605
  470 +#define IDC_STATIC_GROUP6 1606
  471 +#define IDC_STATIC_GROUP7 1607
  472 +#define IDC_STATIC_GROUP8 1608
  473 +#define IDC_STATIC_GROUP9 1609
  474 +#define IDC_STATIC_GROUP10 1610
  475 +#define IDC_STATIC_GROUP11 1611
  476 +#define IDC_STATIC_GROUP12 1612
  477 +#define IDC_STATIC_GROUP13 1613
  478 +#define IDC_STATIC_GROUP14 1614
  479 +#define IDC_STATIC_GROUP15 1615
  480 +#define IDC_STATIC_GROUP16 1616
  481 +#define IDC_STATIC_GROUP17 1617
  482 +#define IDC_STATIC_GROUP18 1618
  483 +#define IDC_STATIC_GROUP19 1619
  484 +#define IDC_STATIC_GROUP20 1620
  485 +#define IDC_STATIC_GROUP21 1621
  486 +#define IDC_STATIC_GROUP22 1622
  487 +#define IDC_STATIC_GROUP23 1623
  488 +#define IDC_STATIC_GROUP24 1624
  489 +#define IDC_STATIC_GROUP25 1625
  490 +#define IDC_STATIC_GROUP26 1626
  491 +#define IDC_STATIC_GROUP27 1627
  492 +#define IDC_STATIC_GROUP28 1628
  493 +#define IDC_STATIC_GROUP29 1629
  494 +#define IDC_STATIC_GROUP30 1630
  495 +#define IDC_STATIC_GROUP31 1631
  496 +#define IDC_STATIC_GROUP32 1632
  497 +#define IDC_STATIC_GROUP33 1633
  498 +#define IDC_STATIC_GROUP34 1634
  499 +#define IDC_STATIC_GROUP35 1635
  500 +#define IDC_STATIC_GROUP36 1636
  501 +#define IDC_STATIC_GROUP37 1637
  502 +#define IDC_STATIC_GROUP38 1638
  503 +#define IDC_STATIC_GROUP39 1639
  504 +#define IDC_STATIC_GROUP40 1640
  505 +#define IDC_STATIC_GROUP41 1641
  506 +#define IDC_STATIC_GROUP42 1642
  507 +#define IDC_STATIC_GROUP43 1643
  508 +#define IDC_STATIC_GROUP44 1644
  509 +#define IDC_STATIC_GROUP45 1645
  510 +#define IDC_STATIC_GROUP46 1646
  511 +#define IDC_STATIC_GROUP47 1647
  512 +#define IDC_STATIC_GROUP48 1648
  513 +#define IDC_STATIC_GROUP49 1649
  514 +#define IDC_STATIC_GROUP50 1650
  515 +#define IDC_STATIC_GROUP51 1651
  516 +#define IDC_STATIC_GROUP52 1652
  517 +#define IDC_STATIC_GROUP53 1653
  518 +#define IDC_STATIC_GROUP54 1654
  519 +#define IDC_STATIC_GROUP55 1655
  520 +#define IDC_STATIC_GROUP56 1656
  521 +#define IDC_STATIC_GROUP57 1657
  522 +#define IDC_STATIC_GROUP58 1658
  523 +#define IDC_STATIC_GROUP59 1659
  524 +#define IDC_STATIC_GROUP60 1660
  525 +#define IDC_STATIC_GROUP61 1661
  526 +#define IDC_STATIC_GROUP62 1662
  527 +#define IDC_STATIC_GROUP63 1663
  528 +#define IDC_STATIC_GROUP64 1664
  529 +#define IDC_STATIC_GROUP65 1665
  530 +#define IDC_STATIC_GROUP66 1666
  531 +#define IDC_STATIC_GROUP67 1667
  532 +#define IDC_STATIC_GROUP68 1668
  533 +#define IDC_STATIC_GROUP69 1669
  534 +#define IDC_STATIC_GROUP70 1670
  535 +#define IDC_STATIC_GROUP71 1671
  536 +#define IDC_STATIC_GROUP72 1672
  537 +#define IDC_STATIC_GROUP73 1673
  538 +#define IDC_STATIC_GROUP74 1674
  539 +#define IDC_STATIC_GROUP75 1675
  540 +#define IDC_STATIC_GROUP76 1676
  541 +#define IDC_STATIC_GROUP77 1677
  542 +#define IDC_STATIC_GROUP78 1678
  543 +#define IDC_STATIC_GROUP79 1679
  544 +#define IDC_STATIC_GROUP80 1680
  545 +#define IDC_STATIC_GROUP81 1681
  546 +#define IDC_STATIC_GROUP82 1682
  547 +#define IDC_STATIC_GROUP83 1683
  548 +#define IDC_STATIC_GROUP84 1684
  549 +#define IDC_STATIC_GROUP85 1685
  550 +#define IDC_STATIC_GROUP86 1686
  551 +#define IDC_STATIC_GROUP87 1687
  552 +#define IDC_STATIC_GROUP88 1688
  553 +#define IDC_STATIC_GROUP89 1689
  554 +#define IDC_STATIC_GROUP90 1690
  555 +#define IDC_STATIC_GROUP91 1691
  556 +#define IDC_STATIC_GROUP92 1692
  557 +#define IDC_STATIC_GROUP93 1693
  558 +#define IDC_STATIC_GROUP94 1694
  559 +#define IDC_STATIC_GROUP95 1695
  560 +#define IDC_STATIC_GROUP96 1696
  561 +#define IDC_STATIC_GROUP97 1697
  562 +#define IDC_STATIC_GROUP98 1698
  563 +#define IDC_STATIC_GROUP99 1699
561 564 #define IDC_START_ALL 2000
562 565 #define IDC_STOP_ALL 2001
563 566 #define IDC_BUTTON_SETTING 2002
... ... @@ -575,10 +578,15 @@
575 578 #define IDC_BUTTON_SECPATH_EAR 2014
576 579 #define IDC_BUTTON_SECPATH_USB 2015
577 580 #define IDC_BUTTON_SAVE 2016
  581 +#define IDC_CHECK_SAME_BTNAME 2016
578 582 #define IDC_BUTTON_INIT_COMPORT 2017
  583 +#define IDC_EDIT_BTNAME_START 2017
579 584 #define IDC_EDIT1 2018
  585 +#define IDC_EDIT_SN_END2 2018
  586 +#define IDC_EDIT_BTNAME_END 2018
580 587 #define IDC_EDIT_SN_HEADER 2019
581 588 #define IDC_FLASH_READAY 2020
  589 +#define IDC_EDIT_BTNAME_HEADER 2020
582 590
583 591 // Next default values for new objects
584 592 //
... ... @@ -586,7 +594,7 @@
586 594 #ifndef APSTUDIO_READONLY_SYMBOLS
587 595 #define _APS_NEXT_RESOURCE_VALUE 135
588 596 #define _APS_NEXT_COMMAND_VALUE 32771
589   -#define _APS_NEXT_CONTROL_VALUE 1148
  597 +#define _APS_NEXT_CONTROL_VALUE 1151
590 598 #define _APS_NEXT_SYMED_VALUE 101
591 599 #endif
592 600 #endif
... ...
Please register or login to post a comment