From 6462586a5c9338ca946ede2599208e0b55bd1ade Mon Sep 17 00:00:00 2001 From: linjin1130 Date: Thu, 6 Jul 2017 16:03:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=AF=BBDA=E8=8A=AF=E7=89=87?= =?UTF-8?q?=E6=B8=A9=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- USTCDAC.m | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/USTCDAC.m b/USTCDAC.m index 4a19766..6511847 100644 --- a/USTCDAC.m +++ b/USTCDAC.m @@ -530,6 +530,22 @@ function SetBoardcast(obj,isBoardcast,period) end end + function temp = GetDA1_temp(obj) + tt1 = obj.ReadAD9136_1(hex2dec('132')); + tt2 = obj.ReadAD9136_1(hex2dec('133')); + tt1 = mod(tt1,256); + tt2 = mod(tt2,256); + temp = 30+7.3*(tt2*256+tt1-39200)/1000.0; + end + + function temp = GetDA2_temp(obj) + tt1 = obj.ReadAD9136_2(hex2dec('132')); + tt2 = obj.ReadAD9136_2(hex2dec('133')); + tt1 = mod(tt1,256); + tt2 = mod(tt2,256); + temp = 30+7.3*(tt2*256+tt1-39200)/1000.0; + end + function value = get(obj,properties) switch lower(properties) case 'isblock';value = obj.isblock ;