public KiirooGen2Vibe([NotNull] IButtplugLogManager aLogManager, [NotNull] IBluetoothDeviceInterface aInterface, [NotNull] IBluetoothDeviceInfo aInfo) : base(aLogManager, "Kiiroo Unknown", aInterface, aInfo) { if (DevInfos.ContainsKey(aInterface.Name)) { Name = $"{DevInfos[aInterface.Name].Brand} {aInterface.Name}"; _devInfo = DevInfos[aInterface.Name]; } else { BpLogger.Warn($"Cannot identify device {Name}, defaulting to Pearl2 settings."); _devInfo = DevInfos["Unknown"]; } AddMessageHandler <StopDeviceCmd>(HandleStopDeviceCmd); AddMessageHandler <VibrateCmd>(HandleVibrateCmd, new MessageAttributes { FeatureCount = _devInfo.VibeCount }); AddMessageHandler <SingleMotorVibrateCmd>(HandleSingleMotorVibrateCmd); }
public KiirooGen2Vibe([NotNull] IButtplugLogManager aLogManager, [NotNull] IBluetoothDeviceInterface aInterface, [NotNull] IBluetoothDeviceInfo aInfo) : base(aLogManager, $"{DevInfos[aInterface.Name].Brand} {aInterface.Name}", aInterface, aInfo) { _devInfo = DevInfos[aInterface.Name]; MsgFuncs.Add(typeof(StopDeviceCmd), new ButtplugDeviceWrapper(HandleStopDeviceCmd)); MsgFuncs.Add(typeof(VibrateCmd), new ButtplugDeviceWrapper(HandleVibrateCmd, new MessageAttributes { FeatureCount = _devInfo.VibeCount })); MsgFuncs.Add(typeof(SingleMotorVibrateCmd), new ButtplugDeviceWrapper(HandleSingleMotorVibrateCmd)); }