Skip to content

Commit 278f51a

Browse files
committed
fix: Only call SubscribeToUpdates from Lovense
We don't use characteristic reads anywhere else yet, so this keeps things locked to the toys that will use it for now.
1 parent 1f2b8b4 commit 278f51a

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

Buttplug.Server.Managers.UWPBluetoothManager/UWPBluetoothDeviceFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ from y in _deviceInfo.Services
129129
}
130130

131131
var bleInterface = new UWPBluetoothDeviceInterface(_buttplugLogManager, _deviceInfo, aDevice, chrs);
132-
await bleInterface.SubscribeToUpdates();
132+
133133
var device = _deviceInfo.CreateDevice(_buttplugLogManager, bleInterface);
134134

135135
// If initialization fails, don't actually send the message back. Just return null, we'll

Buttplug.Server/Bluetooth/Devices/Lovense.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ public Lovense(IButtplugLogManager aLogManager,
9595
public override async Task<ButtplugMessage> Initialize()
9696
{
9797
BpLogger.Trace($"Initializing {Name}");
98+
99+
// Subscribing to read updates
100+
await Interface.SubscribeToUpdates();
101+
102+
// Retreiving device type info for identification.
98103
var writeMsg = await Interface.WriteValue(ButtplugConsts.SystemMsgId, Encoding.ASCII.GetBytes($"DeviceType;"), true);
99104
if (writeMsg is Error)
100105
{

0 commit comments

Comments
 (0)