Skip to content

Commit

Permalink
Cleaned up the MFD/Saitek directories. Cleaned up the Saitek X52 wrap…
Browse files Browse the repository at this point in the history
…per to verify that it's actually saitek's driver that's broken and not the wrapper.

You can confirm this by going to C:\Program Files\Saitek\DirectOutput\SDK\Examples\Test\ and running test.exe.
Double click the line for X52Pro, you should see a window that lets you poke with the MFD. Try pressing one of the soft buttons (the pg wheel or the reset button). And the 'buttons' display in test.exe never changes.
WTG Saitek.
  • Loading branch information
kfsone committed Sep 1, 2014
1 parent 42edb72 commit eebeab6
Show file tree
Hide file tree
Showing 5 changed files with 182 additions and 104 deletions.
18 changes: 14 additions & 4 deletions mfdwrapper.py → mfd/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,17 @@
# TradeDangerous :: Modules :: Multi-function display wrapper
#
# Multi-Function Display wrappers
#


######################################################################
# imports

import time


######################################################################
# classes

class DummyMFD(object):
"""
Base class for the MFD drivers, implemented as no-ops so that
Expand Down Expand Up @@ -44,15 +51,19 @@ def attention(self, duration):
print("\a")


# for now, I'm going to put the wrapper classes just here. till I
# have a few more to play with and can figure out how I want to
# organize them.

class X52ProMFD(DummyMFD):
"""
Wrapper for the Saitek X52 Pro MFD.
"""

def __init__(self):
try:
import saitek.X52Pro
self.doObj = saitek.X52Pro.SaitekX52Pro()
from . saitek import x52pro
self.doObj = x52pro.X52Pro()
except DLLError as e:
print("{}: error#{}: Unable to initialize the Saitek X52 Pro module: {}".format(__name__, e.error_code, e.msg), file=sys.stderr)
sys.exit(1)
Expand Down Expand Up @@ -80,4 +91,3 @@ def attention(self, duration):
iterNo += 1
time.sleep(0.02)


File renamed without changes.
Loading

0 comments on commit eebeab6

Please sign in to comment.