readme update

This commit is contained in:
nikzori
2024-12-18 16:49:58 +03:00
parent 8070eb7b41
commit 6025288637
4 changed files with 20 additions and 17 deletions

View File

@@ -133,7 +133,7 @@ namespace Gidrolock_Modbus_Scanner
DGV_Device.Rows[activeEntryIndex].Cells[2].Value = e.Data[0] > 0x00 ? "true" : "false"; DGV_Device.Rows[activeEntryIndex].Cells[2].Value = e.Data[0] > 0x00 ? "true" : "false";
break; break;
case ("uint16"): case ("uint16"):
Array.Reverse(e.Data); // BitConverter.ToUInt is is little endian, so we need to flip the array //Array.Reverse(e.Data); // BitConverter.ToUInt is is little endian, so we need to flip the array
ushort test = BitConverter.ToUInt16(e.Data, 0); ushort test = BitConverter.ToUInt16(e.Data, 0);
Console.WriteLine("ushort parsed value: " + test); Console.WriteLine("ushort parsed value: " + test);
DGV_Device.Rows[activeEntryIndex].Cells[2].Value = test; DGV_Device.Rows[activeEntryIndex].Cells[2].Value = test;
@@ -149,6 +149,7 @@ namespace Gidrolock_Modbus_Scanner
if (e.Data[i] != 0) if (e.Data[i] != 0)
bytes.Add(e.Data[i]); bytes.Add(e.Data[i]);
} }
bytes.Reverse();
DGV_Device.Rows[activeEntryIndex].Cells[2].Value = System.Text.Encoding.UTF8.GetString(bytes.ToArray()); DGV_Device.Rows[activeEntryIndex].Cells[2].Value = System.Text.Encoding.UTF8.GetString(bytes.ToArray());
break; break;
default: default:

32
Main.Designer.cs generated
View File

@@ -33,12 +33,14 @@
this.TextBox_Log = new System.Windows.Forms.TextBox(); this.TextBox_Log = new System.Windows.Forms.TextBox();
this.groupBox2 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox();
this.panel6 = new System.Windows.Forms.Panel(); this.panel6 = new System.Windows.Forms.Panel();
this.TBox_RegValue = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label();
this.panel5 = new System.Windows.Forms.Panel(); this.panel5 = new System.Windows.Forms.Panel();
this.UpDown_RegLength = new System.Windows.Forms.NumericUpDown(); this.UpDown_RegLength = new System.Windows.Forms.NumericUpDown();
this.label5 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label();
this.Button_SendCommand = new System.Windows.Forms.Button(); this.Button_SendCommand = new System.Windows.Forms.Button();
this.panel3 = new System.Windows.Forms.Panel(); this.panel3 = new System.Windows.Forms.Panel();
this.TBox_RegAddress = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label();
this.panel4 = new System.Windows.Forms.Panel(); this.panel4 = new System.Windows.Forms.Panel();
this.CBox_Function = new System.Windows.Forms.ComboBox(); this.CBox_Function = new System.Windows.Forms.ComboBox();
@@ -84,8 +86,6 @@
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.CBox_Ports = new System.Windows.Forms.ComboBox(); this.CBox_Ports = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.TBox_RegAddress = new System.Windows.Forms.TextBox();
this.TBox_RegValue = new System.Windows.Forms.TextBox();
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
this.panel6.SuspendLayout(); this.panel6.SuspendLayout();
this.panel5.SuspendLayout(); this.panel5.SuspendLayout();
@@ -154,6 +154,13 @@
this.panel6.Size = new System.Drawing.Size(104, 43); this.panel6.Size = new System.Drawing.Size(104, 43);
this.panel6.TabIndex = 4; this.panel6.TabIndex = 4;
// //
// TBox_RegValue
//
this.TBox_RegValue.Location = new System.Drawing.Point(3, 17);
this.TBox_RegValue.Name = "TBox_RegValue";
this.TBox_RegValue.Size = new System.Drawing.Size(98, 20);
this.TBox_RegValue.TabIndex = 1;
//
// label6 // label6
// //
this.label6.AutoSize = true; this.label6.AutoSize = true;
@@ -207,6 +214,13 @@
this.panel3.Size = new System.Drawing.Size(63, 43); this.panel3.Size = new System.Drawing.Size(63, 43);
this.panel3.TabIndex = 2; this.panel3.TabIndex = 2;
// //
// TBox_RegAddress
//
this.TBox_RegAddress.Location = new System.Drawing.Point(3, 18);
this.TBox_RegAddress.Name = "TBox_RegAddress";
this.TBox_RegAddress.Size = new System.Drawing.Size(56, 20);
this.TBox_RegAddress.TabIndex = 1;
//
// label3 // label3
// //
this.label3.AutoSize = true; this.label3.AutoSize = true;
@@ -629,20 +643,6 @@
this.label1.TabIndex = 0; this.label1.TabIndex = 0;
this.label1.Text = "Порт"; this.label1.Text = "Порт";
// //
// TBox_RegAddress
//
this.TBox_RegAddress.Location = new System.Drawing.Point(3, 18);
this.TBox_RegAddress.Name = "TBox_RegAddress";
this.TBox_RegAddress.Size = new System.Drawing.Size(56, 20);
this.TBox_RegAddress.TabIndex = 1;
//
// TBox_RegValue
//
this.TBox_RegValue.Location = new System.Drawing.Point(3, 17);
this.TBox_RegValue.Name = "TBox_RegValue";
this.TBox_RegValue.Size = new System.Drawing.Size(98, 20);
this.TBox_RegValue.TabIndex = 1;
//
// App // App
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);

View File

@@ -350,6 +350,7 @@ namespace Gidrolock_Modbus_Scanner
else if (ce.dataType == "bool") else if (ce.dataType == "bool")
{ {
// why would you even do that lmao // why would you even do that lmao
} }
else if (ce.dataType == "uint16" || ce.dataType == "uint32") else if (ce.dataType == "uint16" || ce.dataType == "uint32")
{ {

View File

@@ -70,5 +70,6 @@ Modbus TCP
### To-Do ### To-Do
1. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> `bool` 1. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> `bool`
2. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
2. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Modbus TCP 2. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Modbus TCP