Skip to content

Commit c52ec04

Browse files
blackspherefollowerqdot
authored andcommitted
Adding friendly names to the Lovense class
The client's now see the device's name rather than the BLE name. Fixes #203
1 parent 4a390e4 commit c52ec04

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

Buttplug.Server/Bluetooth/Devices/Lovense.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using System.Threading.Tasks;
44
using Buttplug.Core;
55
using Buttplug.Core.Messages;
6+
using System.Collections.Generic;
67

78
namespace Buttplug.Server.Bluetooth.Devices
89
{
@@ -117,10 +118,21 @@ public IButtplugDevice CreateDevice(IButtplugLogManager aLogManager,
117118

118119
internal class Lovense : ButtplugBluetoothDevice
119120
{
121+
private static Dictionary<string, string> FriendlyNames = new Dictionary<string, string>()
122+
{
123+
{ "LVS-A011", "Nora" },
124+
{ "LVS-C011", "Nora" },
125+
{ "LVS-B011", "Max" },
126+
{ "LVS-L009", "Ambi" },
127+
{ "LVS-S001", "Lush" },
128+
{ "LVS-Z001", "Hush" },
129+
{ "LVS-P36", "Edge" },
130+
};
131+
120132
public Lovense(IButtplugLogManager aLogManager,
121133
IBluetoothDeviceInterface aInterface)
122134
: base(aLogManager,
123-
$"Lovense Device ({aInterface.Name})",
135+
$"Lovense Device ({FriendlyNames[aInterface.Name]})",
124136
aInterface)
125137
{
126138
MsgFuncs.Add(typeof(SingleMotorVibrateCmd), HandleSingleMotorVibrateCmd);

0 commit comments

Comments
 (0)