From 7086c88c6c080aa9ff15664c5c97aee7bbcdc55b Mon Sep 17 00:00:00 2001 From: wankeda <Administrator@DESKTOP-HAU3ST3> Date: 星期三, 05 三月 2025 16:56:11 +0800 Subject: [PATCH] 阻焊仓堆垛机对接 --- 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/Helper/ConvertHelper.cs | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/Helper/ConvertHelper.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/Helper/ConvertHelper.cs" index dc67877..6b1bac0 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/Helper/ConvertHelper.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/Helper/ConvertHelper.cs" @@ -8,9 +8,9 @@ namespace WIDESEAWCS_Common.Helper { - public class ConvertHelper + public static class ConvertHelper { - public static bool[] ByteToBoolArray(byte data) + public static bool[] ByteToBoolArray(this byte data) { bool[] result = new bool[8]; for (int i = 0; i < 8; i++) @@ -20,10 +20,12 @@ return result; } - public static T ByteToBoolObject<T>(byte data) + public static T ByteToBoolObject<T>(this byte data) { bool[] boolArray = ByteToBoolArray(data); + //Array.Reverse(boolArray); + Type type = typeof(T); object? obj = Activator.CreateInstance(type); if (obj == null) -- Gitblit v1.9.3