-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBack5.cs
104 lines (98 loc) · 2.49 KB
/
Back5.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace comTest
{
public class Back5 : Back
{
public byte[] DataBytes { get; set; }
public override int Length
{
get
{
return 58;
}
}
public byte codeId
{
get
{
return DataBytes[0];
}
}
//体重系统
public RATIO WeightRatio
{
get
{
RATIO ratio;
ratio.K = BitConverter.ToSingle(DataBytes, 1);
ratio.B = BitConverter.ToSingle(DataBytes, 5);
return ratio;
}
}
//通道类型,未使用
//通道1系统
public RATIO Resistance1Ratio
{
get
{
RATIO ratio;
ratio.K = BitConverter.ToSingle(DataBytes, 10);
ratio.B = BitConverter.ToSingle(DataBytes, 14);
return ratio;
}
}
public RATIO Resistance2Ratio
{
get
{
RATIO ratio;
ratio.K = BitConverter.ToSingle(DataBytes,18);
ratio.B = BitConverter.ToSingle(DataBytes,22);
return ratio;
}
}
public RATIO Resistance3Ratio
{
get
{
RATIO ratio;
ratio.K = BitConverter.ToSingle(DataBytes, 26);
ratio.B = BitConverter.ToSingle(DataBytes, 30);
return ratio;
}
}
public RATIO Resistance4Ratio
{
get
{
RATIO ratio;
ratio.K = BitConverter.ToSingle(DataBytes, 34);
ratio.B = BitConverter.ToSingle(DataBytes, 38);
return ratio;
}
}
public RATIO Resistance5Ratio
{
get
{
RATIO ratio;
ratio.K = BitConverter.ToSingle(DataBytes, 42);
ratio.B = BitConverter.ToSingle(DataBytes, 46);
return ratio;
}
}
public RATIO Resistance6Ratio
{
get
{
RATIO ratio;
ratio.K = BitConverter.ToSingle(DataBytes, 50);
ratio.B = BitConverter.ToSingle(DataBytes, 54);
return ratio;
}
}
}
}