Code Monkey home page Code Monkey logo

python-jsl's Introduction

python-jsl

Python Wrapper for JoyShockLibrary using ctypes

How to use

Just import JoyShockLibrary in your project or use from JoyShockLibrary import * if you prefer. For API documentation please refer to JoyShockLibrary project page. Since this is pure ctypes wrapper, there is slight usage differences.

  1. To use JslGetConnectedDeviceHandles function you need to pass int array. You can create int array using (ctypes.c_int * arrayLength)()
  2. To use JslGetCalibrationOffset function you need to pass three C float pointers. You can create C floats using variableName = ctypes.c_float(). They can be used directly to pass pointers of them. For example JslGetCalibrationOffset(deviceID, variableName1, variableName2, variableName3)
  3. To create C compatible callback function pointer you need to pass your callback function to JslCallback or JslTouchCallback functions. They will return C compatible pointer of your functions. You can pass them directly to JslSetCallback or JslSetTouchCallback functions.

You can find examples for these differences above in JoyShockLibrary wrapper source.

Requirements

You need to copy JoyShockLibrary.dll (for Windows) to one of your PATH folders or where your script is running.
Both JoyShockLibrary and this python wrapper tested on Windows. They might work on other OSes.

python-jsl's People

Contributors

nullmember avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.