commit 60882b56eb7529bec70367edb026dd72a89126b9
Author: Martin Toutant <martin.toutant@inrae.fr>
Date:   Tue Aug 2 17:01:22 2022 +0200

    Ajout toutes les commandes Teo

diff --git a/.vs/TestBLE/v16/.suo b/.vs/TestBLE/v16/.suo
index 7873c73..8880ad5 100644
Binary files a/.vs/TestBLE/v16/.suo and b/.vs/TestBLE/v16/.suo differ
diff --git a/TestBLE/TestBLE.Android/bin/Debug/TestBLE.Android.dll b/TestBLE/TestBLE.Android/bin/Debug/TestBLE.Android.dll
index 7e6778d..ac3c9df 100644
Binary files a/TestBLE/TestBLE.Android/bin/Debug/TestBLE.Android.dll and b/TestBLE/TestBLE.Android/bin/Debug/TestBLE.Android.dll differ
diff --git a/TestBLE/TestBLE.Android/bin/Debug/TestBLE.Android.pdb b/TestBLE/TestBLE.Android/bin/Debug/TestBLE.Android.pdb
index 51abc42..f60d129 100644
Binary files a/TestBLE/TestBLE.Android/bin/Debug/TestBLE.Android.pdb and b/TestBLE/TestBLE.Android/bin/Debug/TestBLE.Android.pdb differ
diff --git a/TestBLE/TestBLE.Android/bin/Debug/TestBLE.dll b/TestBLE/TestBLE.Android/bin/Debug/TestBLE.dll
index 6f08de0..96a77ef 100644
Binary files a/TestBLE/TestBLE.Android/bin/Debug/TestBLE.dll and b/TestBLE/TestBLE.Android/bin/Debug/TestBLE.dll differ
diff --git a/TestBLE/TestBLE.Android/bin/Debug/TestBLE.pdb b/TestBLE/TestBLE.Android/bin/Debug/TestBLE.pdb
index a08e229..2a07188 100644
Binary files a/TestBLE/TestBLE.Android/bin/Debug/TestBLE.pdb and b/TestBLE/TestBLE.Android/bin/Debug/TestBLE.pdb differ
diff --git a/TestBLE/TestBLE.Android/obj/Debug/110/TestBLE.Android.csproj.AssemblyReference.cache b/TestBLE/TestBLE.Android/obj/Debug/110/TestBLE.Android.csproj.AssemblyReference.cache
index cbf0f87..b7ab7fa 100644
Binary files a/TestBLE/TestBLE.Android/obj/Debug/110/TestBLE.Android.csproj.AssemblyReference.cache and b/TestBLE/TestBLE.Android/obj/Debug/110/TestBLE.Android.csproj.AssemblyReference.cache differ
diff --git a/TestBLE/TestBLE.Android/obj/Debug/110/TestBLE.Android.dll b/TestBLE/TestBLE.Android/obj/Debug/110/TestBLE.Android.dll
index 7e6778d..ac3c9df 100644
Binary files a/TestBLE/TestBLE.Android/obj/Debug/110/TestBLE.Android.dll and b/TestBLE/TestBLE.Android/obj/Debug/110/TestBLE.Android.dll differ
diff --git a/TestBLE/TestBLE.Android/obj/Debug/110/TestBLE.Android.pdb b/TestBLE/TestBLE.Android/obj/Debug/110/TestBLE.Android.pdb
index 51abc42..f60d129 100644
Binary files a/TestBLE/TestBLE.Android/obj/Debug/110/TestBLE.Android.pdb and b/TestBLE/TestBLE.Android/obj/Debug/110/TestBLE.Android.pdb differ
diff --git a/TestBLE/TestBLE.Android/obj/Debug/110/_TelemetryProps b/TestBLE/TestBLE.Android/obj/Debug/110/_TelemetryProps
index 463768d..390d968 100644
--- a/TestBLE/TestBLE.Android/obj/Debug/110/_TelemetryProps
+++ b/TestBLE/TestBLE.Android/obj/Debug/110/_TelemetryProps
@@ -22,7 +22,7 @@ CodegenTarget=
 AndroidDexTool=d8
 AndroidLinkTool=
 AndroidEnableProfiledAot=
-AndroidInstallAfterBuild=True
-AndroidSessionId=bd18f6e1-ac31-4cd1-a87a-7f35fc9fe283
+AndroidInstallAfterBuild=False
+AndroidSessionId=
 BuildConfiguration=Debug
 TemplateName={c9e5eea5-ca05-42a1-839b-61506e0a37df}
diff --git a/TestBLE/TestBLE.Android/obj/Debug/110/android/assets/TestBLE.Android.dll b/TestBLE/TestBLE.Android/obj/Debug/110/android/assets/TestBLE.Android.dll
index 7e6778d..ac3c9df 100644
Binary files a/TestBLE/TestBLE.Android/obj/Debug/110/android/assets/TestBLE.Android.dll and b/TestBLE/TestBLE.Android/obj/Debug/110/android/assets/TestBLE.Android.dll differ
diff --git a/TestBLE/TestBLE.Android/obj/Debug/110/android/assets/TestBLE.Android.pdb b/TestBLE/TestBLE.Android/obj/Debug/110/android/assets/TestBLE.Android.pdb
index 51abc42..f60d129 100644
Binary files a/TestBLE/TestBLE.Android/obj/Debug/110/android/assets/TestBLE.Android.pdb and b/TestBLE/TestBLE.Android/obj/Debug/110/android/assets/TestBLE.Android.pdb differ
diff --git a/TestBLE/TestBLE.Android/obj/Debug/110/android/assets/TestBLE.dll b/TestBLE/TestBLE.Android/obj/Debug/110/android/assets/TestBLE.dll
index 6f08de0..96a77ef 100644
Binary files a/TestBLE/TestBLE.Android/obj/Debug/110/android/assets/TestBLE.dll and b/TestBLE/TestBLE.Android/obj/Debug/110/android/assets/TestBLE.dll differ
diff --git a/TestBLE/TestBLE.Android/obj/Debug/110/android/assets/TestBLE.pdb b/TestBLE/TestBLE.Android/obj/Debug/110/android/assets/TestBLE.pdb
index a08e229..2a07188 100644
Binary files a/TestBLE/TestBLE.Android/obj/Debug/110/android/assets/TestBLE.pdb and b/TestBLE/TestBLE.Android/obj/Debug/110/android/assets/TestBLE.pdb differ
diff --git a/TestBLE/TestBLE/Models/TeoBluetoothCommands.cs b/TestBLE/TestBLE/Models/TeoBluetoothCommands.cs
index bb123fc..c2a00c5 100644
--- a/TestBLE/TestBLE/Models/TeoBluetoothCommands.cs
+++ b/TestBLE/TestBLE/Models/TeoBluetoothCommands.cs
@@ -11,6 +11,7 @@ namespace TestBLE.Models
             // Voir documentation TEO INRAE 
             // Codes ASCII
             ModeOrdre,
+            EmissionPoids,
             SortieOrdreGardeBluetooth,
             SortieOrdreEtBluetooth,
             ModePeseeSimple,
@@ -22,7 +23,6 @@ namespace TestBLE.Models
             ZeroP1,
             ZeroP2,
             InfosMetrologie,
-            EmissionPoids
         }
 
         // Retourne la chaine d'octets d'une commande Teo (prog INRAE)
diff --git a/TestBLE/TestBLE/Models/WeightingResponse.cs b/TestBLE/TestBLE/Models/WeightingResponse.cs
index 240f246..18ce5a7 100644
--- a/TestBLE/TestBLE/Models/WeightingResponse.cs
+++ b/TestBLE/TestBLE/Models/WeightingResponse.cs
@@ -22,15 +22,25 @@ namespace TestBLE.Models
             set { trayType = value; }
         }
 
-        private int myVar;
+        private int measuredWeight;
 
-        public int MyProperty
+        public int MeasuredWeight
         {
-            get { return myVar; }
-            set { myVar = value; }
+            get { return measuredWeight; }
+            set { measuredWeight = value; }
         }
 
+        private bool isNegative;
 
+        public bool IsNegative
+        {
+            get { return isNegative; }
+            set { isNegative = value; }
+        }
 
+        public WeightingResponse(string data)
+        {
+
+        }
     }
 }
diff --git a/TestBLE/TestBLE/ViewModels/CommandItemViewModel.cs b/TestBLE/TestBLE/ViewModels/CommandItemViewModel.cs
index 541fdfa..7102d0f 100644
--- a/TestBLE/TestBLE/ViewModels/CommandItemViewModel.cs
+++ b/TestBLE/TestBLE/ViewModels/CommandItemViewModel.cs
@@ -13,10 +13,12 @@ namespace TestBLE.ViewModels
         private string name;
         private TeoBluetoothCommand.CommandType toSendCommand;
 
-        public TeoBluetoothCommand.CommandType ToSendCommand
+        private string commandBytes;
+
+        public string CommandBytes
         {
-            get { return toSendCommand; }
-            set { SetProperty( ref toSendCommand, value); }
+            get { return commandBytes; }
+            set { SetProperty( ref commandBytes, value); }
         }
 
         public string Name
@@ -25,6 +27,12 @@ namespace TestBLE.ViewModels
             set { SetProperty(ref name, value); }
         }
 
+        public TeoBluetoothCommand.CommandType ToSendCommand
+        {
+            get { return toSendCommand; }
+            set { SetProperty( ref toSendCommand, value); }
+        }
+
         private async Task<bool> SendValue()
         {
             await BluetoothService.SendHexValues(TeoBluetoothCommand.GetCommandCode(ToSendCommand));
@@ -35,7 +43,9 @@ namespace TestBLE.ViewModels
 
         public CommandItemViewModel(TeoBluetoothCommand.CommandType cmd)
         {
+            ToSendCommand = cmd;
             Name = TeoBluetoothCommand.GetCommandName(cmd);
+            CommandBytes = TeoBluetoothCommand.GetCommandCode(cmd).ToString();
             BluetoothService = DependencyService.Get<IBluetoothService>();
             SendValueCommand = new Command(async () => await SendValue());
         }
diff --git a/TestBLE/TestBLE/ViewModels/DeviceViewModel.cs b/TestBLE/TestBLE/ViewModels/DeviceViewModel.cs
index 185c6ae..9f2708b 100644
--- a/TestBLE/TestBLE/ViewModels/DeviceViewModel.cs
+++ b/TestBLE/TestBLE/ViewModels/DeviceViewModel.cs
@@ -66,9 +66,9 @@ namespace TestBLE.ViewModels
 
             // Ajout manuel des commandes
             AvailableCommandsList = new ObservableCollection<CommandItemViewModel>();
-            foreach (CommandType _cmd in Enum.GetValues(typeof(CommandType))
+            foreach (CommandType _cmd in Enum.GetValues(typeof(CommandType)))
             {
-
+                AvailableCommandsList.Add(new CommandItemViewModel(_cmd));
             }
         }
 
diff --git a/TestBLE/TestBLE/Views/DeviceView.xaml b/TestBLE/TestBLE/Views/DeviceView.xaml
index 298c8d1..3318bfd 100644
--- a/TestBLE/TestBLE/Views/DeviceView.xaml
+++ b/TestBLE/TestBLE/Views/DeviceView.xaml
@@ -6,7 +6,11 @@
     xmlns:xe="clr-namespace:XamEffects;assembly=XamEffects"
     Title="Device Page">
     <ContentPage.Content>
-        <StackLayout BackgroundColor="#001729" VerticalOptions="FillAndExpand">
+
+        <StackLayout
+            Padding="10"
+            BackgroundColor="#001729"
+            VerticalOptions="FillAndExpand">
             <StackLayout VerticalOptions="CenterAndExpand">
                 <Frame
                     Padding="0"
@@ -16,7 +20,7 @@
                     HasShadow="False"
                     HorizontalOptions="Center"
                     VerticalOptions="CenterAndExpand"
-                    WidthRequest="200">
+                    WidthRequest="250">
                     <StackLayout Spacing="0">
                         <StackLayout Margin="0,10">
                             <Label
@@ -59,32 +63,37 @@
                             HorizontalOptions="FillAndExpand"
                             IsVisible="{Binding IsConnected}"
                             Color="#4f5a64" />
-                        <StackLayout
-                            x:Name="commandsList"
-                            Margin="0,10"
-                            Padding="0"
-                            BindableLayout.ItemsSource="{Binding AvailableCommandsList}"
-                            HorizontalOptions="FillAndExpand"
-                            IsVisible="{Binding IsConnected}"
-                            Orientation="Vertical"
-                            Spacing="0">
-                            <BindableLayout.ItemTemplate>
-                                <DataTemplate>
-                                    <StackLayout
-                                        Padding="0,5"
-                                        xe:Commands.Tap="{Binding SendValueCommand}"
-                                        xe:TouchEffect.Color="#34a9ff"
-                                        Spacing="0">
-                                        <Label
-                                            FontAttributes="Bold"
-                                            HorizontalTextAlignment="Center"
-                                            Text="{Binding Name}"
-                                            TextColor="White" />
-                                    </StackLayout>
-                                </DataTemplate>
-                            </BindableLayout.ItemTemplate>
-                        </StackLayout>
+                        <ScrollView Padding="0,10" IsVisible="{Binding IsConnected}">
+                            <StackLayout
+                                x:Name="commandsList"
+                                Padding="0"
+                                BindableLayout.ItemsSource="{Binding AvailableCommandsList}"
+                                HorizontalOptions="FillAndExpand"
+                                Orientation="Vertical"
+                                Spacing="4">
+                                <BindableLayout.ItemTemplate>
+                                    <DataTemplate>
+                                        <StackLayout
+                                            Padding="0,5"
+                                            xe:Commands.Tap="{Binding SendValueCommand}"
+                                            xe:TouchEffect.Color="#34a9ff"
+                                            Spacing="0">
+                                            <Label
+                                                FontAttributes="Bold"
+                                                HorizontalTextAlignment="Center"
+                                                Text="{Binding Name}"
+                                                TextColor="White" />
+                                            <Label
+                                                FontAttributes="Italic"
+                                                HorizontalTextAlignment="Center"
+                                                Text="{Binding CommandBytes}"
+                                                TextColor="DarkGray" />
+                                        </StackLayout>
+                                    </DataTemplate>
+                                </BindableLayout.ItemTemplate>
+                            </StackLayout>
 
+                        </ScrollView>
                     </StackLayout>
 
                 </Frame>
diff --git a/TestBLE/TestBLE/bin/Debug/netstandard2.0/TestBLE.dll b/TestBLE/TestBLE/bin/Debug/netstandard2.0/TestBLE.dll
index 6f08de0..96a77ef 100644
Binary files a/TestBLE/TestBLE/bin/Debug/netstandard2.0/TestBLE.dll and b/TestBLE/TestBLE/bin/Debug/netstandard2.0/TestBLE.dll differ
diff --git a/TestBLE/TestBLE/bin/Debug/netstandard2.0/TestBLE.pdb b/TestBLE/TestBLE/bin/Debug/netstandard2.0/TestBLE.pdb
index a08e229..2a07188 100644
Binary files a/TestBLE/TestBLE/bin/Debug/netstandard2.0/TestBLE.pdb and b/TestBLE/TestBLE/bin/Debug/netstandard2.0/TestBLE.pdb differ
diff --git a/TestBLE/TestBLE/bin/Debug/netstandard2.0/ref/TestBLE.dll b/TestBLE/TestBLE/bin/Debug/netstandard2.0/ref/TestBLE.dll
index b63d368..d43fd3e 100644
Binary files a/TestBLE/TestBLE/bin/Debug/netstandard2.0/ref/TestBLE.dll and b/TestBLE/TestBLE/bin/Debug/netstandard2.0/ref/TestBLE.dll differ
diff --git a/TestBLE/TestBLE/obj/Debug/netstandard2.0/TestBLE.csproj.AssemblyReference.cache b/TestBLE/TestBLE/obj/Debug/netstandard2.0/TestBLE.csproj.AssemblyReference.cache
index d2ab48f..58b3bf6 100644
Binary files a/TestBLE/TestBLE/obj/Debug/netstandard2.0/TestBLE.csproj.AssemblyReference.cache and b/TestBLE/TestBLE/obj/Debug/netstandard2.0/TestBLE.csproj.AssemblyReference.cache differ
diff --git a/TestBLE/TestBLE/obj/Debug/netstandard2.0/TestBLE.dll b/TestBLE/TestBLE/obj/Debug/netstandard2.0/TestBLE.dll
index 6f08de0..96a77ef 100644
Binary files a/TestBLE/TestBLE/obj/Debug/netstandard2.0/TestBLE.dll and b/TestBLE/TestBLE/obj/Debug/netstandard2.0/TestBLE.dll differ
diff --git a/TestBLE/TestBLE/obj/Debug/netstandard2.0/TestBLE.pdb b/TestBLE/TestBLE/obj/Debug/netstandard2.0/TestBLE.pdb
index a08e229..2a07188 100644
Binary files a/TestBLE/TestBLE/obj/Debug/netstandard2.0/TestBLE.pdb and b/TestBLE/TestBLE/obj/Debug/netstandard2.0/TestBLE.pdb differ
diff --git a/TestBLE/TestBLE/obj/Debug/netstandard2.0/ref/TestBLE.dll b/TestBLE/TestBLE/obj/Debug/netstandard2.0/ref/TestBLE.dll
index b63d368..d43fd3e 100644
Binary files a/TestBLE/TestBLE/obj/Debug/netstandard2.0/ref/TestBLE.dll and b/TestBLE/TestBLE/obj/Debug/netstandard2.0/ref/TestBLE.dll differ
