buttplugio / buttplug

Rust Implementation of the Buttplug Sex Toy Control Protocol
https://buttplug.io
Other
894 stars 65 forks source link

Heater control as a ScalarCmd #666

Open blackspherefollower opened 1 month ago

blackspherefollower commented 1 month ago

I think that heaters are a good fit as a ScalarCmd actuator type; however, there's at least 2 kinds of control I've seen:

  1. 0 is off, 23-40 are target temperatures in Celsius (thinking about it, I'm actually surprised I've not spotted some cursed device using F)
  2. 0 is off, 1+ are increments without any clear mapping between value and target temperature (often it's just on/off)

In both cases, I think step range will suffice to describe the control (except for the 0=off in case 1?)

qdot commented 1 week ago

I feel like 0 = off, 1-17 maps to 23-40 for case 1 works well enough, since we're working in the abstract on this anyways?

blackspherefollower commented 1 week ago

Do all the client APIs still send 0.0-1.0 doubles? If so, then let's stick with any sort of offsetting in the protocol implementation for now, which means we just need a heater actuator type and we can iterate on things later if we want to do less abstract.

qdot commented 1 week ago

Yup, they all do, so it should be fine as an actuator type addition.