Skip to content

Commit

Permalink
GUI - part 2 + BLE part 1
Browse files Browse the repository at this point in the history
  • Loading branch information
iDiabDev committed Sep 3, 2019
1 parent 0b02816 commit 29d58e2
Show file tree
Hide file tree
Showing 8 changed files with 958 additions and 465 deletions.
1,032 changes: 594 additions & 438 deletions eDroplet/eDroplet.Android/Resources/Resource.designer.cs

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions eDroplet/eDroplet.Android/eDroplet.Android.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,20 @@
<PackageReference Include="Acr.UserDialogs">
<Version>7.0.4</Version>
</PackageReference>
<PackageReference Include="Plugin.BLE">
<Version>2.1.1</Version>
</PackageReference>
<PackageReference Include="Realm">
<Version>4.1.0</Version>
</PackageReference>
<PackageReference Include="Syncfusion.Xamarin.Buttons">
<Version>17.2.0.47</Version>
<Version>17.2.0.49</Version>
</PackageReference>
<PackageReference Include="Syncfusion.Xamarin.SfChart">
<Version>17.2.0.47</Version>
<Version>17.2.0.49</Version>
</PackageReference>
<PackageReference Include="Syncfusion.Xamarin.SfNumericUpDown">
<Version>17.2.0.47</Version>
<Version>17.2.0.49</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms" Version="4.2.0.709249" />
<PackageReference Include="Xamarin.Android.Support.Design" Version="28.0.0.1" />
Expand Down
3 changes: 2 additions & 1 deletion eDroplet/eDroplet.iOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
<string>location</string>
<string>external-accessory</string>
<string>bluetooth-central</string>
<string>bluetooth-peripheral</string>
<string>fetch</string>
<string>remote-notification</string>
</array>
Expand All @@ -64,5 +63,7 @@
<string>Assets.xcassets/AppIcon.appiconset</string>
<key>XSLaunchImageAssets</key>
<string>Assets.xcassets/LaunchImages.launchimage</string>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>Droplet</string>
</dict>
</plist>
9 changes: 6 additions & 3 deletions eDroplet/eDroplet.iOS/eDroplet.iOS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -183,17 +183,20 @@
<PackageReference Include="Acr.UserDialogs">
<Version>7.0.4</Version>
</PackageReference>
<PackageReference Include="Plugin.BLE">
<Version>2.1.1</Version>
</PackageReference>
<PackageReference Include="Realm">
<Version>4.1.0</Version>
</PackageReference>
<PackageReference Include="Syncfusion.Xamarin.Buttons">
<Version>17.2.0.47</Version>
<Version>17.2.0.49</Version>
</PackageReference>
<PackageReference Include="Syncfusion.Xamarin.SfChart">
<Version>17.2.0.47</Version>
<Version>17.2.0.49</Version>
</PackageReference>
<PackageReference Include="Syncfusion.Xamarin.SfNumericUpDown">
<Version>17.2.0.47</Version>
<Version>17.2.0.49</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms" Version="4.2.0.709249" />
<PackageReference Include="Prism.Unity.Forms" Version="7.2.0.1367" />
Expand Down
39 changes: 39 additions & 0 deletions eDroplet/eDroplet/Services/General.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace eDroplet.Services
{
public class General
{
public static string ByteArrayToString(byte[] ba)
{
StringBuilder hex = new StringBuilder(ba.Length * 2);
foreach (byte b in ba)
hex.AppendFormat("{0:X2} ", b);
return hex.ToString();
}

public static string ByteArrayToStringCont(byte[] ba)
{
StringBuilder hex = new StringBuilder(ba.Length * 2);
foreach (byte b in ba)
hex.AppendFormat("{0:X2}", b);
return hex.ToString();
}
public static string ByteArrayToStringCont1(byte[] ba)
{
StringBuilder hex = new StringBuilder(ba.Length * 2);
int count = 0;
foreach (byte b in ba)
{
if (count > 0 && count < 17)
{
hex.AppendFormat("{0:X2}", b);
}
count++;
}
return hex.ToString();
}
}
}
Loading

0 comments on commit 29d58e2

Please sign in to comment.