Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,15 @@ impl ProtocolHandler for HoneyPlayBox {
self.send_command(feature_index, speed.unsigned_abs())
}

fn handle_output_constrict_cmd(
&self,
feature_index: u32,
_feature_id: Uuid,
level: u32,
) -> Result<Vec<HardwareCommand>, ButtplugDeviceError> {
Comment thread
wwwfeng marked this conversation as resolved.
self.send_command(feature_index, if level == 0 { 0 } else { level + 100 })
}

fn handle_battery_level_cmd(
&self,
device_index: u32,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": {
"major": 5,
"minor": 30
"minor": 31
},
"protocols": {
"activejoy": {
Expand Down Expand Up @@ -4878,6 +4878,7 @@
"btle": {
"names": [
"JXT002",
"HPB-274",
"HPB-393-1",
"HPB-0520",
"HONEY-835",
Expand Down Expand Up @@ -4932,6 +4933,59 @@
],
"name": "Honey Play Box Pleasure Pivot"
},
{
"features": [
{
"description": "Vibrator",
"id": "06456fc9-9ab6-425b-9cf1-9f875d21bcf3",
"index": 0,
"output": {
"vibrate": {
"value": [
0,
100
]
}
}
},
{
"description": "Suction Pump",
"id": "09817707-f6b8-44de-8708-58101999396a",
"index": 1,
"output": {
"constrict": {
"value": [
0,
4
]
}
}
},
{
"description": "Battery Level",
"id": "97528990-df35-4fa1-8f3c-f6f78b1b8538",
"index": 2,
"input": {
"battery": {
"command": [
"Read"
],
"value": [
[
0,
100
]
]
}
}
}
],
"id": "b33a5de9-d0c6-448b-8150-e402dd29ed4d",
"identifier": [
"HPB-274"
],
"name": "Honey Play Box Kaipro"
},
{
"id": "0a9c43fb-2d58-4af9-aef2-60f48c6e7707",
"identifier": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,37 @@ configurations:
- HPB-398
name: Honey Play Box Pleasure Pivot
id: c205e707-9561-4016-97aa-0bde609b0edc
- identifier:
- HPB-274
name: Honey Play Box Kaipro
features:
- description: Vibrator
id: 06456fc9-9ab6-425b-9cf1-9f875d21bcf3
output:
vibrate:
value:
- 0
- 100
index: 0
- description: Suction Pump
id: 09817707-f6b8-44de-8708-58101999396a
output:
constrict:
value:
- 0

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets set the range to 100 to 104, then there's no need for the +100 bump in the protocol implementation.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a default offset of 100 instead. Not sure if this is the preferred approach, but we need to support 0 and 101–104.

- 4
index: 1
- description: Battery Level
id: 97528990-df35-4fa1-8f3c-f6f78b1b8538
input:
battery:
value:
- - 0
- 100
command:
- Read
index: 2
id: b33a5de9-d0c6-448b-8150-e402dd29ed4d
- identifier:
- HPB-296
name: Honey Play Box Anello
Expand Down Expand Up @@ -485,6 +516,7 @@ communication:
- btle:
names:
- JXT002
- HPB-274
- HPB-393-1
- HPB-0520
- HONEY-835
Expand All @@ -509,4 +541,4 @@ communication:
tx: 0000ff03-0000-1000-8000-00805f9b34fb
rx: 0000ff02-0000-1000-8000-00805f9b34fb
0000180f-0000-1000-8000-00805f9b34fb:
rxblebattery: 00002a19-0000-1000-8000-00805f9b34fb
rxblebattery: 00002a19-0000-1000-8000-00805f9b34fb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
version:
major: 5
minor: 30
minor: 31