From 61deef5cdf96cbfdd6ad45be49e80d597c00ca65 Mon Sep 17 00:00:00 2001 From: QuakeGod <QuakeGod@sina.com> Date: 星期二, 24 十二月 2024 08:37:21 +0800 Subject: [PATCH] 2024-12-24 --- MTerm1/DialogSysRegSet.cpp | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/MTerm1/DialogSysRegSet.cpp b/MTerm1/DialogSysRegSet.cpp index 5f0c94c..9a9ed79 100644 --- a/MTerm1/DialogSysRegSet.cpp +++ b/MTerm1/DialogSysRegSet.cpp @@ -186,7 +186,7 @@ CMTerm1Doc* pDoc = (CMTerm1Doc *)GetDocument(); unsigned short DCount = 120; unsigned short nCount=0; - int res = pDoc->MyKLink1.ReadDataWord(1, KLDataSysCfg, 0, DCount, &nCount, m_databuf1); + int res = theApp.MyKLink1.ReadDataWord(1, KLDataSysCfg, 0, DCount, &nCount, m_databuf1); CString s1; s1.Format(_T("ReadDataWord = %d %d %p %p"), res,nCount, m_databuf1, &pSysCfg->PortParams[0]); SysLog(s1); @@ -200,7 +200,7 @@ } SysLog(s1); - pSysCfg = (pKMSysCfg)m_databuf1; + pSysCfg = (pstKMSysCfg)m_databuf1; m_listSel1.GetCount(); AddPropPage(_T("宸ヤ綔妯″紡璁剧疆1"), &m_propmodecfg1, IDD_PROP_MODE_CFG1, &pSysCfg->workmode); @@ -488,7 +488,8 @@ s1.Format(_T("sizeof (syscfg) %d"), sizeof(stKMSysCfg)); SysLog(s1); - int res = pDoc->MyKLink1.ReadSysCfgData(1, 0, DCount, &nCount, buf1); + UCHAR nType = 0; + int res = theApp.MyKLink1.ReadSysCfgData(1, nType, 0, DCount, &nCount, buf1); s1.Format(_T("ReadDataWord = %d %d"), res, nCount); SysLog(s1); s1.Empty(); s1.Append(_T("\r\n")); @@ -527,7 +528,8 @@ s1.Format(_T("sizeof (syscfg) %d"), sizeof(stKMSysCfg)); SysLog(s1); - int res = pDoc->MyKLink1.WriteSysCfgData(1, 0, DCount, m_databuf1); + UCHAR nType = 0; + int res = theApp.MyKLink1.WriteSysCfgData(1, nType, 0, DCount, m_databuf1); s1.Format(_T("Write syscfg = %d "), res); SysLog(s1); } @@ -544,7 +546,7 @@ s1.Format(_T("sizeof (syscfg) %d"), sizeof(stKMSysCfg)); SysLog(s1); - int res = pDoc->MyKLink1.ReadDataWord(1, KLDataSysCfg,0,DCount, &nCount, buf1); + int res = theApp.MyKLink1.ReadDataWord(1, KLDataSysCfg,0,DCount, &nCount, buf1); s1.Format(_T("ReadDataWord = %d %d"), res, nCount); SysLog(s1); s1.Empty(); s1.Append(_T("\r\n")); -- Gitblit v1.9.1