forbid PySide2 5.15.x versions / start without joystick devive

This commit is contained in:
n-e-y-s 2020-06-15 15:54:30 +02:00
parent 689bf7b71c
commit d72058326a
2 changed files with 6 additions and 3 deletions

View File

@ -426,7 +426,10 @@ def main():
gui.setWindowTitle("G27 Pedalsand Shifter")
coll = Collector(vars["tty"])
coll.valuesChanged.connect(gui.newVals)
if vars["jsdev"] is not None:
js = JoystickSink(vars["jsdev"])
else:
js = None
gui.sendModeCmd.connect(coll.sendModeCmd)
gui.show()
if main_widget is not None: main_widget.hide()
@ -455,7 +458,7 @@ def main():
for i,d in enumerate(inputs.devices.gamepads):
jsCombo.addItem(d.name, userData=d)
k += 1
btnStart.setEnabled(n > 0 and k > 0)
btnStart.setEnabled(n > 0)
def startgui():
idx = ttyCombo.currentIndex()
vars["tty"] = ttyCombo.itemText(ttyCombo.currentIndex())

View File

@ -8,6 +8,6 @@ setup(name='G27_Pedals_and_Shifter_GUI',
author='functionreturnfunction,NEYS',
url='https://github.com/n-e-y-s/G27_Pedals_and_Shifter_GUI',
packages=['g27_pedals_and_shifter_gui'],
install_requires=['PySide2>=5.12.0', 'pyqtgraph>=0.11.0', 'pyserial>=3.4', "numpy>=1.16.2", "inputs>=0.5"],
install_requires=['PySide2 >=5.12.0,<5.15', 'pyqtgraph>=0.11.0', 'pyserial>=3.4', "numpy>=1.16.2", "inputs>=0.5"],
entry_points = {"gui_scripts" : ['g27calib = g27_pedals_and_shifter_gui.calib:main']},
)