Here comes a LIRC patch with improved handling of the wheel/knob (turn
and press actions). The patch removes knob bouncing effects, and has
removed some subtle bugs when using wheel/knob and IR control in parallel.
It is available at
The change has been in use for quite a while now, and works fine.
Please consider this e-mail as submission to include this patch into
LIRC. I'd be glad if it were useful to some LIRC users.
-------- Original-Nachricht --------
Betreff: Extension of mplay-driver for MonCaso 312/320
Datum: Tue, 10 Jul 2012 02:05:24 +0200
Von: wmh <bcwmh@...>
This is a re-send of my e-mail from 2011-10-24, as there has been no
reaction so far...
Here comes a modification for the mplay-driver. It extends the LIRC
driver in order to support the case "MonCaso 312/320" with a built-in
IR. Now, the wheel is supported, and the record button is recognised
reliably. I have added a /patch/ containing the following /changes/:
* The IR receiver reports the wheel position by a two bit value, which
is given in Gray code. The code is transported via two status lines
of the serial port.
* The driver establishes a thread polling the status lines, thus
recognising wheel turn actions.
* The thread reads from the serial port the remote control button
presses, as it used to be the case before.
* Wheel turn actions produce button presses for counterwise (0x81) and
counter clockwise (0x80) turns.
* Detected button presses are piped into the LIRC framework. The
driver serves the write end, the LIRC framework has the read end.
* Once a wheel action has been found, the driver temporarily reduces
the polling period in order to get all wheel actions.
* The driver uses an option "nowheel" appended to the driver parameter
as in --driver="/dev/ttyUSB0,nowheel" or
DRIVER="/dev/ttyUSB0,nowheel". This option switches off the creation
of a polling thread. Instead, remote button presses are directly
read from the serial port, as it used to be the case before.
* In order to avoid copy and paste, there is an init function for both
mplay and mplay2.
The algorithms are explained in more detail in the source code comments.
I would be happy if the patch helps. Perhaps it is even a candidate to
be included into the LIRC package. In addition, I added the forum post
http://ubuntuforums.org/showpost.php?p=11385428&postcount=60, where you
could reply to if you like to.
Unfortunately, only Ubuntu 11.04 is available for me, which is also the
base for the patch.