cengizozel / LogiDrivePy

A Python module for interfacing with Logitech steering wheels.
https://pypi.org/project/logidrivepy/
MIT License
32 stars 1 forks source link

Cannot place constant force #3

Open chirudeep001 opened 7 months ago

chirudeep001 commented 7 months ago

import pathlib

from LogiDrivePy.logidrivepy import LogitechControllerStructs from LogiDrivePy.logidrivepy import LogitechControllerConstants from LogiDrivePy.logidrivepy import LogitechControllerFunctions from logidrivepy import LogitechController

class LogitechController(LogitechControllerConstants, LogitechControllerStructs, LogitechControllerFunctions) : def init(self, dll_path=None) : if dll_path is None :

Get the location of the current file (controller.py)

        current_file_path = pathlib.Path(__file__)
        # Get the absolute path to the DLL
        dll_path = current_file_path.parent / 'dll' / 'LogitechSteeringWheelEnginesWrapper.dll'

    self.structs = LogitechControllerStructs()
    LogitechControllerFunctions.__init__(self, str(dll_path), self.structs)

controller = LogitechController() controller.logi_update() controller.LogiPlayConstantForce(0, 100)

print(f"steering_initialize: {controller.steering_initialize()}") print(f"logi_update: {controller.logi_update()}") print(f"is_connected: {controller.is_connected(0)}") print(f"has_force_feedback: {controller.has_force_feedback(0)}") print(f"play_dirt_road_effect: {controller.play_dirt_road_effect(0, 20)}")

controller.steering_shutdown()

This is the output:

steering_initialize: True logi_update: True is_connected: True has_force_feedback: True play_dirt_road_effect: True

but i could not see an effect on the steering wheel