replace thehandy with ive-connect#6783
replace thehandy with ive-connect#6783feederbox826 wants to merge 2 commits intostashapp:developfrom
Conversation
49fc996 to
74c4365
Compare
| const result = await loadScript({ | ||
| type: "funscript", | ||
| url: funscriptURL, | ||
| }); | ||
| if (result.error) { | ||
| throw new Error(result.error); |
There was a problem hiding this comment.
This just loads the funscript data you will still need to call device.prepareScript
There was a problem hiding this comment.
https://github.com/iveplay/ive-connect/blob/main/src/devices/handy/handy-device.ts#L287 ive-connect seems to just expose prepareScript which includes both?
|
|
||
| setServerTimeOffset(offset: number) { | ||
| this._handy.estimatedServerTimeOffset = offset; | ||
| sync() { |
There was a problem hiding this comment.
Could we still have this as async to allow plugins to have more flexibility to the underlying HapticDevice needs. I'm currently using this to support 3 different haptic interfaces (theHandy sdk we have now, ive-connect fw4 handy and ive-connect buttplug.io support). This will avoid having a breaking change.
There was a problem hiding this comment.
but ive-connect has it sync? Can wrap it in a promise, sure
|
|
||
| async play(position: number) { | ||
| if (!this._connected) { | ||
| async play(position: number, loop: boolean = false) { |
There was a problem hiding this comment.
if we are going to add this support I would also like to surface mimicking the play interface from HapticDevice which includes playbackRate
/**
* Play the loaded script at the specified time
* @param timeMs Current time in milliseconds
* @param playbackRate Playback rate (1.0 = normal speed)
* @param loop Whether to loop the script
*/
play(timeMs: number, playbackRate?: number, loop?: boolean): Promise<boolean>;There was a problem hiding this comment.
Sure. IIRC this was a patch since ive-connect has no loop() function, it's tied into play
|
Hi there, If you have some time I would like to direct you to some reference work on some quirks with
The basic idea is as so :
One last note, buttplug and handy data flow are completely different. I know on discord there where some talks to support this, the only way to do that would be to provide a way to switch out Anyways, thanks for taking a look into this and adding it to core, my only real concern is the drop of |
|
Thanks! I have absolutely no idea how any of this works so I wanted to get as close to drop-in as I could for integration testing. Once that's all clear then I'd be more comfortable making actual functional changes, otherwise we'd just be 4 steps back, 1 step forward. I'll try to keep that in mind for the next interation but i really just want to make sure this works first |
no integration testing done
server time offset is done automatically by ive-connect in private functions so it was removed from context, no LLMs were used so there might be leftovers that eslint didn't catch. The API is much simpler but has a smaller surface, does csv conversion automatically.
Kind of clobbered together as I don't have much context for thehandy and ive-connect docs are sparse and a bit out of place