Skip to content

update device_control.py to include Oscillate & error when running device_info.py #20

Description

@VayeBye

not major but when testing example device_control.py, it does not include OSCILLATE type devices. added below to confirm oscillate functionality on the v4 standard.

    # Oscillate
    if device.has_output(OutputType.OSCILLATE):
        print("  Starting oscillate at 25%...")
        await device.run_output(DeviceOutputCommand(OutputType.OSCILLATE, 0.25))
        await asyncio.sleep(1)

        print("  Increasing to 50%...")
        await device.run_output(DeviceOutputCommand(OutputType.OSCILLATE, 0.5))
        await asyncio.sleep(1)

        print("  Full power (100%)...")
        await device.run_output(DeviceOutputCommand(OutputType.OSCILLATE, 1.0))
        await asyncio.sleep(1)

Also with a Lovense Fucking Machine connected all examples ran except device_info.py gave the following:

Connecting to server...
Scanning for devices (5 seconds)...

==================================================
Device: Lovense Sex Machine
Index: 5
Display Name: (none)
Timing Gap: 100ms
==================================================

Features (2):

  Feature 0: Fucking Machine Oscillation Speed
    Outputs:
Traceback (most recent call last):
  File "buttplug-py\examples\device_info.py", line 79, in <module>
             asyncio.run(main())
             ~~~~~~~~~~~^^^^^^^^
  File "Python\pythoncore-3.14-64\Lib\asyncio\runners.py", line 204, in run
        return runner.run(main)
               ~~~~~~~~~~^^^^^^
  File "Python\pythoncore-3.14-64\Lib\asyncio\runners.py", line 127, in run
                          return self._loop.run_until_complete(task)
                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "Python\pythoncore-3.14-64\Lib\asyncio\base_events.py", line 719, in run_until_complete
              return future.result()
                    ~~~~~~~~~~~~~^^
  File "buttplug-py\examples\device_info.py", line 55, in main
    value_range = feature.get_output_range(output_type)
                           ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'DeviceFeature' object has no attribute 'get_output_range'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions