Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (testpypi.python.org).
Help us improve Python packaging - Donate today!

Library to use Griffin PowerMate wheels

Project Description
:control\_knobs: lib-powermate
==============================

This Python library is intended to handle Griffin Powermate wheel(s)
events.

Index
-----

- `Installation <#installation>`__
- `Library documentation <#documentation>`__

- `Functions <#functions>`__
- `PowerMateWheel class <#powermatewheel-class>`__
- `Getters and setters <#getters-and-setters>`__

- `Getters <#getters>`__
- `Setters <#setters>`__

- `Methods <#methods>`__
- `Events <#events>`__

- `License <#license>`__

--------------

Installation
------------

.. code:: sh

pip install lib-powermate

Usage
-----

[To be explained]

--------------

Documentation
=============

Functions
---------

- **``find_wheels()``**

Returns an array of PowerMate wheel devices. Raises a
``DeviceNotFound`` exception if none found.

PowerMateWheel class
--------------------

Receives an evdev device as parameter, which can be obtained with the
``find_wheels()`` function.

Getters and setters
~~~~~~~~~~~~~~~~~~~

Getters
^^^^^^^

- **``get_device()``**

Returns the current instance's device.

- **``is_pressed()``**

``True`` if the wheel is currently pressed.

- **``has_twisted()``**

``True`` if the current instance is ignoring multiple twists (see
``ignore_multiple_twists`` method) and the wheel has been pressed,
then turned.

Setters
^^^^^^^

- **``set_logger``**\ ``(<logger new_logger>)``

Changes the logger used by the current instance. Mostly useful for
debugging purposes.

Methods
~~~~~~~

- **``ignore_all_events``**\ ``([<bool value=True>])``

Skips all events if True.

- **``ignore_mutiple_twists``**\ ``([<bool value=True>])``

Ignores twist events (in any direction) after the first one until the
wheel is unpressed. Useful for discrete operations.

- **``on``**\ ``(<str event_name>, <callable some_function>)``

Define which function (or any other callable) to call when an even
occurs. See *Events* for a list of events.

- **``listen()``**

Starts listening for events.

Events
~~~~~~

- **``press``**: Triggered when the wheel is pressed down.
- **``depress``**: Triggered when the wheel is unpressed/released.
(Alias: ``release``)
- **``turn_left``**: Triggered when the wheel is turned to the left
(counter-clockwise).
- **``turn_right``**: Triggered when the wheel is turned to the right
(clockwise).
- **``twist_left``**: Triggered when the wheel is turned to the left
(counter-clockwise) while being pressed down.
- **``twist_right``**: Triggered when the wheel is turned to the right
(clockwise) while being pressed down.

--------------

License
-------

GNU GPLv2 - Copyright 2017, Enrico Lamperti.

Please see `LICENSE <./LICENSE>`__ file for more details.
Release History

Release History

This version
History Node

0.1.2

History Node

0.1.1

History Node

0.1.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
lib-powermate-0.1.2.tar.gz (3.9 kB) Copy SHA256 Checksum SHA256 Source Apr 29, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting