-
Notifications
You must be signed in to change notification settings - Fork 2
Description
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