From b356ce2d9f8dc9c5adffecc25a54e9468c490088 Mon Sep 17 00:00:00 2001 From: Lerking Date: Mon, 5 May 2025 09:24:46 +0200 Subject: [PATCH] Update pygameControls/logitech_f310_controller.py --- pygameControls/logitech_f310_controller.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/pygameControls/logitech_f310_controller.py b/pygameControls/logitech_f310_controller.py index 678b9e9..3a80d95 100644 --- a/pygameControls/logitech_f310_controller.py +++ b/pygameControls/logitech_f310_controller.py @@ -14,19 +14,15 @@ This controller is a usb controller, with the following features. import pygame from pygameControls.controlsbase import ControlsBase -from enum import Enum +from enums import ConnectionType -class InputMode(Enum): - DirectInput = 1 - XInput = 2 - class LogitechF310Controller(ControlsBase): def __init__(self, joy, connection_type): self.device = joy self.instance_id: int = self.device.get_instance_id() self.name = self.device.get_name() self.guid = self.device.get_guid() - self.connection_type = connection_type + self.connection_type = ConnectionType(connection_type.values()) self.powerlevel = self.device.get_power_level() self.numaxis: int = self.device.get_numaxes() self.axis: list = [self.device.get_axis(a) for a in range(self.numaxis)] @@ -49,6 +45,7 @@ class LogitechF310Controller(ControlsBase): "logo button": 8 } print(f"{self.name} connected.") + print(f"Connection type: {connection_type.capitalize()}") def close(self): pass