Browse Source

fixed modbus

master
Z 5 months ago
parent
commit
cd9d8f97d8
  1. 1
      Example/Gateway/ModbusGateway.tscn
  2. 3
      Example/Gateway/Script/View/ViewModbusGateway.cs

1
Example/Gateway/ModbusGateway.tscn

@ -3,6 +3,7 @@
[ext_resource type="Script" path="res://Example/Gateway/Script/View/ViewModbusGateway.cs" id="1_34uaa"] [ext_resource type="Script" path="res://Example/Gateway/Script/View/ViewModbusGateway.cs" id="1_34uaa"]
[node name="ModbusGateway" type="Control"] [node name="ModbusGateway" type="Control"]
visible = false
layout_mode = 3 layout_mode = 3
anchors_preset = 15 anchors_preset = 15
anchor_right = 1.0 anchor_right = 1.0

3
Example/Gateway/Script/View/ViewModbusGateway.cs

@ -23,6 +23,9 @@ namespace EGFramework.Examples.Gateway{
// GD.Print(fData.ToDoubleArray()[0]); // GD.Print(fData.ToDoubleArray()[0]);
// double t = 54.32f; // double t = 54.32f;
// GD.Print(BitConverter.GetBytes(fData.ToDoubleArray()[0]).ToStringByHex()); // GD.Print(BitConverter.GetBytes(fData.ToDoubleArray()[0]).ToStringByHex());
// byte[] fData = {0x42,0x0D,0x33,0x33};
// GD.Print(fData.Reverse().ToFloatArray()[0]);
} }
// Called every frame. 'delta' is the elapsed time since the previous frame. // Called every frame. 'delta' is the elapsed time since the previous frame.

Loading…
Cancel
Save