Révision dd8bc79c
TestBLE/TestBLE/Models/ReponsePesee.cs | ||
---|---|---|
1 | 1 |
using System; |
2 | 2 |
using System.Collections.Generic; |
3 |
using System.Linq; |
|
3 | 4 |
using System.Text; |
4 | 5 |
|
5 | 6 |
namespace TestBLE.Models |
... | ... | |
22 | 23 |
set { typePlateau = value; } |
23 | 24 |
} |
24 | 25 |
|
25 |
private int poidsMesure;
|
|
26 |
private string poidsMesure;
|
|
26 | 27 |
|
27 |
public int PoidsMesure
|
|
28 |
public string PoidsMesure
|
|
28 | 29 |
{ |
29 | 30 |
get { return poidsMesure; } |
30 | 31 |
set { poidsMesure = value; } |
... | ... | |
43 | 44 |
NumPlateau = data[0]; |
44 | 45 |
TypePlateau = data[1]; |
45 | 46 |
IsNegative = data[3] == '-'; |
47 |
PoidsMesure = data.ToCharArray().Skip(7).ToArray().ToString(); |
|
46 | 48 |
} |
47 | 49 |
} |
48 | 50 |
} |
TestBLE/TestBLE/ViewModels/DeviceViewModel.cs | ||
---|---|---|
81 | 81 |
{ |
82 | 82 |
IsVisibleData = true; |
83 | 83 |
ReponsePesee resp = new ReponsePesee(recData); |
84 |
string cleanData = recData.Trim(); |
|
85 |
Data += cleanData + "\n"; |
|
84 |
Data += resp.PoidsMesure + "\n"; |
|
86 | 85 |
} |
87 | 86 |
|
88 | 87 |
} |
Formats disponibles : Unified diff