Skip to content

Commit

Permalink
Quick fix for OBS refusing to build my stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
kozec committed Jan 16, 2017
1 parent f6716a0 commit 4c3e959
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 17 deletions.
14 changes: 14 additions & 0 deletions scc/aliases.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@
from scc.uinput import Axes, Keys
from scc.constants import ALL_BUTTONS, ALL_AXES

ALL_BUTTONS = ( Keys.BTN_START, Keys.BTN_MODE, Keys.BTN_SELECT, Keys.BTN_A,
Keys.BTN_B, Keys.BTN_X, Keys.BTN_Y, Keys.BTN_TL, Keys.BTN_TR,
Keys.BTN_THUMBL, Keys.BTN_THUMBR, Keys.BTN_WHEEL, Keys.BTN_GEAR_DOWN,
Keys.BTN_GEAR_UP, Keys.KEY_OK, Keys.KEY_SELECT, Keys.KEY_GOTO,
Keys.KEY_CLEAR, Keys.KEY_OPTION, Keys.KEY_INFO, Keys.KEY_TIME,
Keys.KEY_VENDOR, Keys.KEY_ARCHIVE, Keys.KEY_PROGRAM, Keys.KEY_CHANNEL,
Keys.KEY_FAVORITES, Keys.KEY_EPG )

ALL_AXES = ( Axes.ABS_X, Axes.ABS_Y, Axes.ABS_RX, Axes.ABS_RY, Axes.ABS_Z,
Axes.ABS_RZ, Axes.ABS_HAT0X, Axes.ABS_HAT0Y, Axes.ABS_HAT1X, Axes.ABS_HAT1Y,
Axes.ABS_HAT2X, Axes.ABS_HAT2Y, Axes.ABS_HAT3X, Axes.ABS_HAT3Y,
Axes.ABS_PRESSURE, Axes.ABS_DISTANCE, Axes.ABS_TILT_X, Axes.ABS_TILT_Y,
Axes.ABS_TOOL_WIDTH, Axes.ABS_VOLUME, Axes.ABS_MISC )

for i in xrange(0, len(ALL_BUTTONS)):
setattr(Keys, "BTN%i" % (i,), ALL_BUTTONS[i])

Expand Down
15 changes: 0 additions & 15 deletions scc/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
# THE SOFTWARE.

from scc.lib import IntEnum
from scc.uinput import Axes, Keys

"""
If SC-Controller is updated while daemon is running, DAEMON_VERSION send by
Expand Down Expand Up @@ -94,17 +93,3 @@ class HapticPos(IntEnum):
TRIGGER_HALF = 50
TRIGGER_CLICK = 254 # Values under this are generated until trigger clicks
TRIGGER_MAX = 255

ALL_BUTTONS = ( Keys.BTN_START, Keys.BTN_MODE, Keys.BTN_SELECT, Keys.BTN_A,
Keys.BTN_B, Keys.BTN_X, Keys.BTN_Y, Keys.BTN_TL, Keys.BTN_TR,
Keys.BTN_THUMBL, Keys.BTN_THUMBR, Keys.BTN_WHEEL, Keys.BTN_GEAR_DOWN,
Keys.BTN_GEAR_UP, Keys.KEY_OK, Keys.KEY_SELECT, Keys.KEY_GOTO,
Keys.KEY_CLEAR, Keys.KEY_OPTION, Keys.KEY_INFO, Keys.KEY_TIME,
Keys.KEY_VENDOR, Keys.KEY_ARCHIVE, Keys.KEY_PROGRAM, Keys.KEY_CHANNEL,
Keys.KEY_FAVORITES, Keys.KEY_EPG )

ALL_AXES = ( Axes.ABS_X, Axes.ABS_Y, Axes.ABS_RX, Axes.ABS_RY, Axes.ABS_Z,
Axes.ABS_RZ, Axes.ABS_HAT0X, Axes.ABS_HAT0Y, Axes.ABS_HAT1X, Axes.ABS_HAT1Y,
Axes.ABS_HAT2X, Axes.ABS_HAT2Y, Axes.ABS_HAT3X, Axes.ABS_HAT3Y,
Axes.ABS_PRESSURE, Axes.ABS_DISTANCE, Axes.ABS_TILT_X, Axes.ABS_TILT_Y,
Axes.ABS_TOOL_WIDTH, Axes.ABS_VOLUME, Axes.ABS_MISC )
4 changes: 2 additions & 2 deletions scc/mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
from collections import deque
from scc.lib import xwrappers as X
from scc.uinput import UInput, Keyboard, Mouse, Dummy, Rels
from scc.constants import FE_STICK, FE_TRIGGER, FE_PAD, GYRO, HapticPos
from scc.constants import SCButtons, LEFT, RIGHT, STICK, STICK_TILT
from scc.constants import FE_STICK, FE_TRIGGER, FE_PAD, GYRO
from scc.constants import HapticPos, ALL_AXES, ALL_BUTTONS
from scc.aliases import ALL_AXES, ALL_BUTTONS
from scc.controller import HapticData
from scc.actions import ButtonAction
from scc.config import Config
Expand Down

0 comments on commit 4c3e959

Please sign in to comment.