Skip to content

Commit dc5e104

Browse files
committed
remove single tap
1 parent 217461e commit dc5e104

File tree

5 files changed

+5
-22
lines changed

5 files changed

+5
-22
lines changed

driver/slimevr/resources/input/slimevr_controller_bindings.json

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,19 @@
2121
"type": "vibration",
2222
"binding_image_point": [50,50]
2323
},
24-
"/input/tap": {
25-
"type": "button",
26-
"click": true,
27-
"touch" : false,
28-
"binding_image_point": [50,50],
29-
"order" : 1
30-
},
3124
"/input/double_tap": {
3225
"type": "button",
3326
"click": true,
3427
"touch" : false,
3528
"binding_image_point": [50,50],
36-
"order" : 2
29+
"order" : 1
3730
},
3831
"/input/triple_tap": {
3932
"type": "button",
4033
"click": true,
4134
"touch" : false,
4235
"binding_image_point": [50,50],
43-
"order" : 3
36+
"order" : 2
4437
},
4538
"/input/skeleton/left" : {
4639
"type" : "skeleton",

driver/slimevr/resources/localization/localization.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
[
22
{
33
"language_tag": "en_US",
4-
"slimevr": "SlimeVR",
54
"slimevr_virtual_controller": "SlimeVR Virtual Controller",
6-
"/input/tap": "Single tap",
75
"/input/double_tap": "Double tap",
86
"/input/triple_tap": "Triple tap"
97
}

src/TrackerDevice.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,23 +75,19 @@ void SlimeVRDriver::TrackerDevice::PositionMessage(messages::Position &position)
7575
}
7676

7777
if (is_controller_) {
78-
bool tap = false;
7978
bool double_tap = false;
8079
bool triple_tap = false;
8180

8281
// Get inputs from protobuf
8382
for (int i = 0; i < position.input_size(); ++i) {
84-
if (position.input(i).type() == messages::Input_InputType_TAP) {
85-
tap = true;
86-
} else if (position.input(i).type() == messages::Input_InputType_DOUBLE_TAP) {
83+
if (position.input(i).type() == messages::Input_InputType_DOUBLE_TAP) {
8784
double_tap = true;
8885
} else if (position.input(i).type() == messages::Input_InputType_TRIPLE_TAP) {
8986
triple_tap = true;
9087
}
9188
}
9289

9390
// Set inputs
94-
GetDriver()->GetInput()->UpdateBooleanComponent(this->tap_component_, tap, 0);
9591
GetDriver()->GetInput()->UpdateBooleanComponent(this->double_tap_component_, double_tap, 0);
9692
GetDriver()->GetInput()->UpdateBooleanComponent(this->triple_tap_component_, triple_tap, 0);
9793
}
@@ -243,7 +239,6 @@ vr::EVRInitError SlimeVRDriver::TrackerDevice::Activate(uint32_t unObjectId) {
243239

244240
// Set inputs
245241
if (is_controller_) {
246-
GetDriver()->GetInput()->CreateBooleanComponent(props, "/input/tap", &this->tap_component_);
247242
GetDriver()->GetInput()->CreateBooleanComponent(props, "/input/double_tap", &this->double_tap_component_);
248243
GetDriver()->GetInput()->CreateBooleanComponent(props, "/input/triple_tap", &this->triple_tap_component_);
249244

src/TrackerDevice.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ namespace SlimeVRDriver {
5858
float vibrate_anim_state_ = 0.f;
5959

6060
vr::VRInputComponentHandle_t haptic_component_ = 0;
61-
vr::VRInputComponentHandle_t tap_component_ = 0;
6261
vr::VRInputComponentHandle_t double_tap_component_ = 0;
6362
vr::VRInputComponentHandle_t triple_tap_component_ = 0;
6463

src/bridge/ProtobufMessages.proto

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,8 @@ message FingerBoneRotation {
8585

8686
message Input {
8787
enum InputType {
88-
TAP = 0;
89-
DOUBLE_TAP = 1;
90-
TRIPLE_TAP = 2;
88+
DOUBLE_TAP = 0;
89+
TRIPLE_TAP = 1;
9190
}
9291
InputType type = 1;
9392
}
@@ -110,7 +109,6 @@ message Position {
110109
optional DataSource data_source = 9;
111110
repeated FingerBoneRotation finger_bone_rotations = 10;
112111
repeated Input input = 11;
113-
114112
}
115113

116114
message UserAction {

0 commit comments

Comments
 (0)