Commit 8cd5fc4
Honor server-specified duration for Vibrate haptics commands
GamepadBackend and ButtplugWasmBackend previously ignored `duration` on
continuous (non-Position) actuator commands, so actuators ran until the
HapticsService auto-stop timer (default 30s) kicked in. Both backends
now schedule a per-actuator setTimeout to stop at the given ms; a new
actuate replaces the prior timer, and stop/disconnect/emergencyStop
clear them.
Also makes ButtplugWasmBackend.stop() a no-op when not connected (and
for unknown actuator IDs), matching HapticsService's own tolerance.
This fixes the `Uncaught (in promise) Error: ButtplugWasmBackend: not
connected` that fired every time the auto-stop timer ran against a
registered-but-not-connected WASM backend.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 7596290 commit 8cd5fc4
3 files changed
Lines changed: 90 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
459 | 459 | | |
460 | 460 | | |
461 | 461 | | |
462 | | - | |
463 | | - | |
| 462 | + | |
| 463 | + | |
464 | 464 | | |
465 | 465 | | |
466 | 466 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| 237 | + | |
| 238 | + | |
237 | 239 | | |
238 | 240 | | |
239 | 241 | | |
| |||
282 | 284 | | |
283 | 285 | | |
284 | 286 | | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
285 | 290 | | |
286 | 291 | | |
287 | 292 | | |
| |||
373 | 378 | | |
374 | 379 | | |
375 | 380 | | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
376 | 384 | | |
377 | 385 | | |
378 | 386 | | |
| |||
401 | 409 | | |
402 | 410 | | |
403 | 411 | | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
404 | 444 | | |
405 | 445 | | |
406 | 446 | | |
407 | 447 | | |
| 448 | + | |
408 | 449 | | |
409 | | - | |
410 | | - | |
411 | | - | |
| 450 | + | |
412 | 451 | | |
413 | 452 | | |
414 | | - | |
415 | | - | |
416 | | - | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
417 | 456 | | |
418 | 457 | | |
419 | 458 | | |
| |||
471 | 510 | | |
472 | 511 | | |
473 | 512 | | |
| 513 | + | |
474 | 514 | | |
475 | 515 | | |
476 | 516 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
32 | 39 | | |
33 | 40 | | |
34 | 41 | | |
| |||
142 | 149 | | |
143 | 150 | | |
144 | 151 | | |
145 | | - | |
| 152 | + | |
146 | 153 | | |
147 | 154 | | |
148 | 155 | | |
| |||
160 | 167 | | |
161 | 168 | | |
162 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
163 | 185 | | |
164 | 186 | | |
165 | 187 | | |
166 | 188 | | |
167 | 189 | | |
168 | 190 | | |
169 | 191 | | |
| 192 | + | |
170 | 193 | | |
171 | 194 | | |
172 | 195 | | |
| |||
177 | 200 | | |
178 | 201 | | |
179 | 202 | | |
| 203 | + | |
180 | 204 | | |
181 | 205 | | |
182 | 206 | | |
| |||
202 | 226 | | |
203 | 227 | | |
204 | 228 | | |
| 229 | + | |
205 | 230 | | |
206 | 231 | | |
207 | 232 | | |
| |||
244 | 269 | | |
245 | 270 | | |
246 | 271 | | |
| 272 | + | |
247 | 273 | | |
248 | 274 | | |
249 | 275 | | |
| |||
255 | 281 | | |
256 | 282 | | |
257 | 283 | | |
| 284 | + | |
258 | 285 | | |
259 | 286 | | |
260 | 287 | | |
261 | 288 | | |
262 | 289 | | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
263 | 304 | | |
264 | 305 | | |
265 | 306 | | |
| |||
0 commit comments