| | |
| | | // --------- 工作模式 ---------------------------------------
|
| | | //工作模式,跳线功能等,good 指示灯
|
| | | //
|
| | |
|
| | | ((CComboBox*)GetDlgItem(IDC_COMBO_WORKMODE))->SetCurSel(psyscfg->workmode);
|
| | | // -----------------------------------------------------------
|
| | | //---------- 通讯端口1,RS232 -----------------------------
|
| | | /*
|
| | |
| | | // --- 输出端口映射 ----------------------------
|
| | |
|
| | | for (int i = 0; i < 6; i++) {
|
| | | unsigned short bytebitaddr = psyscfg->OutMappings[i];
|
| | | unsigned short bytebitaddr = psyscfg->OutMappings[i].value;
|
| | | s1.Format(_T("mappig %d %04x"), i, bytebitaddr);
|
| | | SysLog(s1);
|
| | | unsigned char ntype = (bytebitaddr & 0xf000) >> 12;
|
| | |
| | | CString s1;
|
| | | s1.Format(_T("GetParams"));
|
| | | SysLog(s1);
|
| | | psyscfg->workmode = ((CComboBox*)GetDlgItem(IDC_COMBO_WORKMODE))->GetCurSel();
|
| | |
|
| | | for (int i = 0; i < 6; i++) {
|
| | | unsigned char ntype = ((CComboBox *)GetDlgItem(type_ctrl_ids[i]))->GetCurSel();
|
| | | unsigned char byteaddr = ((CComboBox *)GetDlgItem(addr_ctrl_ids[i]))->GetCurSel();
|
| | | unsigned char bitoff = ((CComboBox *)GetDlgItem(bit_ctrl_ids[i]))->GetCurSel();
|
| | | unsigned short bytebitaddr = (ntype << 12) + (byteaddr << 4) + (bitoff);
|
| | | psyscfg->OutMappings[i] = bytebitaddr;
|
| | | psyscfg->OutMappings[i].value = bytebitaddr;
|
| | | s1.Format(_T("mappig %d %04x"), i, bytebitaddr);
|
| | | SysLog(s1);
|
| | | }
|