Permalink
Browse files

feat: Add new Lovense Hush Device Name/Service

Looks like Lovense is updating the Hush to run their new firmware, and
with that also changed the product name and service IDs.

Fixes #257
  • Loading branch information...
qdot committed Sep 4, 2017
1 parent 33b2282 commit cbc67e0e9ce3c6cc8126ec0e209e8576738a16b5
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using Buttplug.Core;
using Buttplug.Server;
using Buttplug.Server.Bluetooth.Devices;
using JetBrains.Annotations;
@@ -26,6 +25,7 @@ protected BluetoothSubtypeManager([NotNull] IButtplugLogManager aLogManager)
new LovenseRev2BluetoothInfo(),
new LovenseRev3BluetoothInfo(),
new LovenseRev4BluetoothInfo(),
new LovenseRev5BluetoothInfo(),
new MagicMotionBluetoothInfo(),
new VibratissimoBluetoothInfo(),
new VorzeA10CycloneInfo(),
@@ -144,6 +144,39 @@ public enum Chrs : uint
return new Lovense(aLogManager, aInterface, this);
}
}
internal class LovenseRev5BluetoothInfo : IBluetoothDeviceInfo
{
public enum Chrs : uint
{
Tx = 0,
Rx,
}
public Guid[] Services { get; } = { new Guid("5a300001-0024-4bd4-bbd5-a6920e4c5653") };
public string[] Names { get; } =
{
// Hush. Again.
"LVS-Z36",
};
public Guid[] Characteristics { get; } =
{
// tx characteristic
new Guid("5a300002-0024-4bd4-bbd5-a6920e4c5653"),
// rx characteristic
new Guid("5a300003-0024-4bd4-bbd5-a6920e4c5653"),
};
public IButtplugDevice CreateDevice(IButtplugLogManager aLogManager,
IBluetoothDeviceInterface aInterface)
{
return new Lovense(aLogManager, aInterface, this);
}
}
internal class Lovense : ButtplugBluetoothDevice
{
private static Dictionary<string, string> FriendlyNames = new Dictionary<string, string>()
@@ -155,6 +188,7 @@ internal class Lovense : ButtplugBluetoothDevice
{ "LVS-S001", "Lush" },
{ "LVS-Z001", "Hush" },
{ "LVS-P36", "Edge" },
{ "LVS-Z36", "Hush" },
{ "LVS-Domi37", "Domi" },
};
@@ -1,5 +1,4 @@
using System;
using System.Text;
using System.Threading.Tasks;
using Buttplug.Core;
using Buttplug.Core.Messages;

0 comments on commit cbc67e0

Please sign in to comment.