增加杨格锁私有属性编译和优化解析HEX文件逻辑
This commit is contained in:
@@ -35,7 +35,7 @@
|
|||||||
<MinimumRequiredVersion>4.0.0.5</MinimumRequiredVersion>
|
<MinimumRequiredVersion>4.0.0.5</MinimumRequiredVersion>
|
||||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||||
<WebPage>index.html</WebPage>
|
<WebPage>index.html</WebPage>
|
||||||
<ApplicationRevision>82</ApplicationRevision>
|
<ApplicationRevision>85</ApplicationRevision>
|
||||||
<ApplicationVersion>4.4.3.%2a</ApplicationVersion>
|
<ApplicationVersion>4.4.3.%2a</ApplicationVersion>
|
||||||
<UseApplicationTrust>false</UseApplicationTrust>
|
<UseApplicationTrust>false</UseApplicationTrust>
|
||||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||||
|
|||||||
@@ -8756,7 +8756,8 @@ Public Class FrmCSeriesConfig
|
|||||||
|
|
||||||
'偏移地址 0x04 数据类型指示偏移地址
|
'偏移地址 0x04 数据类型指示偏移地址
|
||||||
Dim LineAddOffestBase As Integer = 0
|
Dim LineAddOffestBase As Integer = 0
|
||||||
|
'’偏移地址 0x02 数据类型指示偏移地址
|
||||||
|
Dim LineAddOffestBase2 As Integer = 0
|
||||||
'结束地址
|
'结束地址
|
||||||
endAddr = 0
|
endAddr = 0
|
||||||
|
|
||||||
@@ -8802,7 +8803,7 @@ Public Class FrmCSeriesConfig
|
|||||||
|
|
||||||
'本行地址取出来放在 flashAddress中’
|
'本行地址取出来放在 flashAddress中’
|
||||||
StrToHex(tmpLineAdd, flashAddressBuf)
|
StrToHex(tmpLineAdd, flashAddressBuf)
|
||||||
flashAddress = LineAddOffestBase + tmpLineAdd
|
flashAddress = LineAddOffestBase + tmpLineAdd + LineAddOffestBase2
|
||||||
|
|
||||||
'B3:数据类型
|
'B3:数据类型
|
||||||
Dim dataType = StrToHex(hexBuffer(i + 8))
|
Dim dataType = StrToHex(hexBuffer(i + 8))
|
||||||
@@ -8822,8 +8823,19 @@ Public Class FrmCSeriesConfig
|
|||||||
Else
|
Else
|
||||||
Return True
|
Return True
|
||||||
End If
|
End If
|
||||||
Case 2, 3, 5 '扩展段地址, 开始段地址, 开始线性地址’
|
Case 3, 5 '扩展段地址, 开始段地址, 开始线性地址’ 4 '扩展线性地址
|
||||||
Continue For
|
Continue For
|
||||||
|
Case 2 ',
|
||||||
|
If dataLen = 2 Then
|
||||||
|
|
||||||
|
LineAddOffestBase2 = (dataValBuf(0) * 256 + dataValBuf(1))
|
||||||
|
|
||||||
|
LineAddOffestBase2 = LineAddOffestBase2 << 4
|
||||||
|
Else
|
||||||
|
'resultli.Analysis = "文件偏移地址异常!!"
|
||||||
|
Return False '确认DataLen必须是2,否则报错’
|
||||||
|
End If
|
||||||
|
|
||||||
Case 4 '扩展线性地址
|
Case 4 '扩展线性地址
|
||||||
If dataLen = 2 Then
|
If dataLen = 2 Then
|
||||||
LineAddOffestBase = (dataValBuf(0) * 256 + dataValBuf(1)) * 65536
|
LineAddOffestBase = (dataValBuf(0) * 256 + dataValBuf(1)) * 65536
|
||||||
|
|||||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
|||||||
'通过使用 "*",如下所示:
|
'通过使用 "*",如下所示:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("4.4.5.37")>
|
<Assembly: AssemblyVersion("4.4.5.40")>
|
||||||
<Assembly: AssemblyFileVersion("4.4.5.37")>
|
<Assembly: AssemblyFileVersion("4.4.5.40")>
|
||||||
|
|||||||
@@ -55,6 +55,8 @@ Public Class SetLoopInformation
|
|||||||
PB20_RELAY = 33
|
PB20_RELAY = 33
|
||||||
<Description("色温")>
|
<Description("色温")>
|
||||||
ColorTemp = 34
|
ColorTemp = 34
|
||||||
|
<Description("PB调光")>
|
||||||
|
PB_STRIP = 50
|
||||||
<Description("碳达人")>
|
<Description("碳达人")>
|
||||||
CarbonVIP = 54
|
CarbonVIP = 54
|
||||||
End Enum
|
End Enum
|
||||||
@@ -373,6 +375,8 @@ Public Class SetLoopInformation
|
|||||||
result = "色温"
|
result = "色温"
|
||||||
Case DeviceType.CarbonVIP
|
Case DeviceType.CarbonVIP
|
||||||
result = "碳达人"
|
result = "碳达人"
|
||||||
|
Case DeviceType.PB_STRIP
|
||||||
|
result = "PB调光"
|
||||||
Case Else
|
Case Else
|
||||||
result = "未知设备"
|
result = "未知设备"
|
||||||
|
|
||||||
|
|||||||
14
BLV_Studio/Test/GridTest/AddPeripherals.Designer.vb
generated
14
BLV_Studio/Test/GridTest/AddPeripherals.Designer.vb
generated
@@ -60,6 +60,7 @@ Partial Class AddPeripherals
|
|||||||
Me.Grid1 = New FlexCell.Grid()
|
Me.Grid1 = New FlexCell.Grid()
|
||||||
Me.Temp_Grid = New FlexCell.Grid()
|
Me.Temp_Grid = New FlexCell.Grid()
|
||||||
Me.Button1 = New System.Windows.Forms.Button()
|
Me.Button1 = New System.Windows.Forms.Button()
|
||||||
|
Me.ComboBox2 = New System.Windows.Forms.ComboBox()
|
||||||
CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
Me.SplitContainer1.Panel1.SuspendLayout()
|
Me.SplitContainer1.Panel1.SuspendLayout()
|
||||||
Me.SplitContainer1.Panel2.SuspendLayout()
|
Me.SplitContainer1.Panel2.SuspendLayout()
|
||||||
@@ -142,6 +143,7 @@ Partial Class AddPeripherals
|
|||||||
'
|
'
|
||||||
'SplitContainer2.Panel1
|
'SplitContainer2.Panel1
|
||||||
'
|
'
|
||||||
|
Me.SplitContainer2.Panel1.Controls.Add(Me.ComboBox2)
|
||||||
Me.SplitContainer2.Panel1.Controls.Add(Me.TextBox3)
|
Me.SplitContainer2.Panel1.Controls.Add(Me.TextBox3)
|
||||||
Me.SplitContainer2.Panel1.Controls.Add(Me.Label9)
|
Me.SplitContainer2.Panel1.Controls.Add(Me.Label9)
|
||||||
Me.SplitContainer2.Panel1.Controls.Add(Me.CheckBox6)
|
Me.SplitContainer2.Panel1.Controls.Add(Me.CheckBox6)
|
||||||
@@ -567,6 +569,17 @@ Partial Class AddPeripherals
|
|||||||
Me.Button1.Text = "确定"
|
Me.Button1.Text = "确定"
|
||||||
Me.Button1.UseVisualStyleBackColor = True
|
Me.Button1.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
|
'ComboBox2
|
||||||
|
'
|
||||||
|
Me.ComboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||||
|
Me.ComboBox2.Font = New System.Drawing.Font("宋体", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||||
|
Me.ComboBox2.FormattingEnabled = True
|
||||||
|
Me.ComboBox2.Location = New System.Drawing.Point(1134, 86)
|
||||||
|
Me.ComboBox2.Name = "ComboBox2"
|
||||||
|
Me.ComboBox2.Size = New System.Drawing.Size(54, 24)
|
||||||
|
Me.ComboBox2.TabIndex = 28
|
||||||
|
Me.ComboBox2.Visible = False
|
||||||
|
'
|
||||||
'AddPeripherals
|
'AddPeripherals
|
||||||
'
|
'
|
||||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
|
||||||
@@ -645,4 +658,5 @@ Partial Class AddPeripherals
|
|||||||
Friend WithEvents Button2 As Button
|
Friend WithEvents Button2 As Button
|
||||||
Friend WithEvents Label9 As Label
|
Friend WithEvents Label9 As Label
|
||||||
Friend WithEvents TextBox3 As TextBox
|
Friend WithEvents TextBox3 As TextBox
|
||||||
|
Friend WithEvents ComboBox2 As ComboBox
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ Public Class AddPeripherals
|
|||||||
Dev_ColorTemp
|
Dev_ColorTemp
|
||||||
BLEMUSIC
|
BLEMUSIC
|
||||||
RS485_Curtain
|
RS485_Curtain
|
||||||
|
LOCK
|
||||||
max
|
max
|
||||||
End Enum
|
End Enum
|
||||||
Enum Tcolname
|
Enum Tcolname
|
||||||
@@ -253,7 +254,7 @@ Public Class AddPeripherals
|
|||||||
Fdevtype.Visible = False
|
Fdevtype.Visible = False
|
||||||
FdevtypeCom.Visible = False
|
FdevtypeCom.Visible = False
|
||||||
SplitContainer6.Visible = False
|
SplitContainer6.Visible = False
|
||||||
|
ComboBox2.Visible = False
|
||||||
|
|
||||||
If Not String.IsNullOrEmpty(Resultmodel.Desc.DevDescription) Then
|
If Not String.IsNullOrEmpty(Resultmodel.Desc.DevDescription) Then
|
||||||
Dim Rchenk() As String = Resultmodel.Desc.DevDescription.Split(",")
|
Dim Rchenk() As String = Resultmodel.Desc.DevDescription.Split(",")
|
||||||
@@ -319,7 +320,26 @@ Public Class AddPeripherals
|
|||||||
|
|
||||||
CURTAIN_initTable(_despar)
|
CURTAIN_initTable(_despar)
|
||||||
CURTAIN_SetIDOpenDO()
|
CURTAIN_SetIDOpenDO()
|
||||||
|
Case FromDevType.LOCK
|
||||||
|
Dim DevDescription As String() = Resultmodel.Desc.DevDescription.Split(",")
|
||||||
|
Label9.Visible = True
|
||||||
|
Label9.Text = "开锁有效期"
|
||||||
|
TextBox3.Visible = True
|
||||||
|
TextBox3.Enabled = True
|
||||||
|
|
||||||
|
ComboBox2.Visible = True
|
||||||
|
ComboBox2.Items.Clear()
|
||||||
|
ComboBox2.Items.Add("不设置")
|
||||||
|
ComboBox2.Items.Add("秒")
|
||||||
|
ComboBox2.Items.Add("分")
|
||||||
|
If DevDescription.Length > 1 Then
|
||||||
|
TextBox3.Text = DevDescription(0)
|
||||||
|
ComboBox2.SelectedIndex = DevDescription(1)
|
||||||
|
Else
|
||||||
|
TextBox3.Text = "0"
|
||||||
|
ComboBox2.SelectedIndex = 0
|
||||||
|
End If
|
||||||
|
SplitContainer4.Panel2Collapsed = True
|
||||||
Case FromDevType.BLEMUSIC
|
Case FromDevType.BLEMUSIC
|
||||||
SplitContainer4.Panel2Collapsed = True
|
SplitContainer4.Panel2Collapsed = True
|
||||||
Label9.Visible = True
|
Label9.Visible = True
|
||||||
@@ -700,8 +720,10 @@ Public Class AddPeripherals
|
|||||||
CheckBox4.Visible = True
|
CheckBox4.Visible = True
|
||||||
Return FromDevType.Temp
|
Return FromDevType.Temp
|
||||||
Case "BLEMUSIC"
|
Case "BLEMUSIC"
|
||||||
|
|
||||||
Return FromDevType.BLEMUSIC
|
Return FromDevType.BLEMUSIC
|
||||||
|
Case "Lock"
|
||||||
|
Return FromDevType.LOCK
|
||||||
|
|
||||||
Case "RS485_Curtain"
|
Case "RS485_Curtain"
|
||||||
Return FromDevType.RS485_Curtain
|
Return FromDevType.RS485_Curtain
|
||||||
Case "CURTAIN"
|
Case "CURTAIN"
|
||||||
@@ -732,7 +754,7 @@ Public Class AddPeripherals
|
|||||||
Private Sub SelectiveDisplay()
|
Private Sub SelectiveDisplay()
|
||||||
g_DevType = DetermineDeviceType()
|
g_DevType = DetermineDeviceType()
|
||||||
|
|
||||||
|
ComboBox2.Visible = False
|
||||||
ComboBox1.Visible = False
|
ComboBox1.Visible = False
|
||||||
Label6.Visible = False
|
Label6.Visible = False
|
||||||
Table_Grid1.Visible = False
|
Table_Grid1.Visible = False
|
||||||
@@ -812,6 +834,26 @@ Public Class AddPeripherals
|
|||||||
Table_Grid1.Visible = True
|
Table_Grid1.Visible = True
|
||||||
SplitContainer4.Panel2Collapsed = True
|
SplitContainer4.Panel2Collapsed = True
|
||||||
CURTAIN_initTable(_despar)
|
CURTAIN_initTable(_despar)
|
||||||
|
Case FromDevType.LOCK
|
||||||
|
Dim DevDescription As String() = Resultmodel.Desc.DevDescription.Split(",")
|
||||||
|
Label9.Visible = True
|
||||||
|
Label9.Text = "开锁有效期"
|
||||||
|
TextBox3.Visible = True
|
||||||
|
TextBox3.Enabled = True
|
||||||
|
|
||||||
|
ComboBox2.Visible = True
|
||||||
|
ComboBox2.Items.Clear()
|
||||||
|
ComboBox2.Items.Add("不设置")
|
||||||
|
ComboBox2.Items.Add("秒")
|
||||||
|
ComboBox2.Items.Add("分")
|
||||||
|
If DevDescription.Length > 1 Then
|
||||||
|
TextBox3.Text = DevDescription(0)
|
||||||
|
ComboBox2.SelectedIndex = DevDescription(1)
|
||||||
|
Else
|
||||||
|
TextBox3.Text = "0"
|
||||||
|
ComboBox2.SelectedIndex = 0
|
||||||
|
End If
|
||||||
|
SplitContainer4.Panel2Collapsed = True
|
||||||
Case FromDevType.BLEMUSIC
|
Case FromDevType.BLEMUSIC
|
||||||
SplitContainer4.Panel2Collapsed = True
|
SplitContainer4.Panel2Collapsed = True
|
||||||
Label9.Visible = True
|
Label9.Visible = True
|
||||||
@@ -1317,6 +1359,29 @@ Public Class AddPeripherals
|
|||||||
Else
|
Else
|
||||||
Resultmodel.Desc.DevDescription = $"{ Resultmodel.Desc.DevDescription},0"
|
Resultmodel.Desc.DevDescription = $"{ Resultmodel.Desc.DevDescription},0"
|
||||||
End If
|
End If
|
||||||
|
Case FromDevType.LOCK
|
||||||
|
Dim ntstyr As String
|
||||||
|
'判断 TextBox3.Text是否为空,如果为空则赋值为"0",否则赋值为TextBox3.Text.Trim
|
||||||
|
If String.IsNullOrEmpty(TextBox3.Text) Then
|
||||||
|
ntstyr = "0"
|
||||||
|
Else
|
||||||
|
ntstyr = TextBox3.Text.Trim
|
||||||
|
End If
|
||||||
|
'获取ComboBox2的值如果为秒范围为 1-60,如果为分范围为 1-5,如果不设置则无范围
|
||||||
|
Dim range As String = ComboBox2.Text.Trim
|
||||||
|
If range = "秒" Then
|
||||||
|
If Not (1 <= ntstyr AndAlso ntstyr <= 60) Then
|
||||||
|
MsgBox("请输入1-60之间的数字")
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
ElseIf range = "分" Then
|
||||||
|
If Not (1 <= ntstyr AndAlso ntstyr <= 5) Then
|
||||||
|
MsgBox("请输入1-5之间的数字")
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Resultmodel.Desc.DevDescription = $"{ntstyr},{ComboBox2.SelectedIndex}"
|
||||||
|
|
||||||
Case FromDevType.PB_Bus
|
Case FromDevType.PB_Bus
|
||||||
ResdultPB_Bus()
|
ResdultPB_Bus()
|
||||||
|
|||||||
@@ -6558,6 +6558,7 @@ Public Class TableInteraction
|
|||||||
Dim tmpAddr As Byte = CInt(FindAttributeValueUnderModel2(pNode, "设备存在", "拨码地址")) '设备地址(1字节)
|
Dim tmpAddr As Byte = CInt(FindAttributeValueUnderModel2(pNode, "设备存在", "拨码地址")) '设备地址(1字节)
|
||||||
Dim hostAddr As Byte = CInt(FindNodeValueUnderModel(hostNode, "RS485", pNode.Desc.DevInterface)) '设备地址(1字节)
|
Dim hostAddr As Byte = CInt(FindNodeValueUnderModel(hostNode, "RS485", pNode.Desc.DevInterface)) '设备地址(1字节)
|
||||||
Dim TemptDevType As Byte = 0
|
Dim TemptDevType As Byte = 0
|
||||||
|
Dim T1TemptDevType As Byte = 0
|
||||||
Dim ParentDevType As Byte = 0
|
Dim ParentDevType As Byte = 0
|
||||||
Dim ParentDevAddr As Byte = 0
|
Dim ParentDevAddr As Byte = 0
|
||||||
Dim ParentDevPort As Byte = 0
|
Dim ParentDevPort As Byte = 0
|
||||||
@@ -6599,14 +6600,29 @@ Public Class TableInteraction
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
If Tcnode.Name.ToUpper.Equals("LOCK") And Not IsNothing(pNode.Desc.DevDescription) Then
|
||||||
|
Curtainbuf= pNode.Desc.DevDescription.split(",")
|
||||||
|
If Curtainbuf.Length > 1 Then
|
||||||
|
|
||||||
|
T1TemptDevType =CInt(Curtainbuf(1))
|
||||||
|
|
||||||
|
If T1TemptDevType=0 Then
|
||||||
|
TemptDevType = 0
|
||||||
|
Else
|
||||||
|
TemptDevType=CInt(Curtainbuf(0))
|
||||||
|
End If
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
keepParam(0) = ParentDevType
|
keepParam(0) = ParentDevType
|
||||||
keepParam(1) = ParentDevAddr
|
keepParam(1) = ParentDevAddr
|
||||||
keepParam(2) = ParentDevPort
|
keepParam(2) = ParentDevPort
|
||||||
keepParam(8) = TemptDevType
|
keepParam(8) =T1TemptDevType
|
||||||
|
keepParam(9) = TemptDevType
|
||||||
For indexi = 1 To 5
|
For indexi = 1 To 5
|
||||||
node = FindAttributeUnderModel(pNode, "设备存在", $"弱电输入{indexi}")
|
node = FindAttributeUnderModel(pNode, "设备存在", $"弱电输入{indexi}")
|
||||||
If node Then
|
If node Then
|
||||||
|
|||||||
Reference in New Issue
Block a user