Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Problem with writing own remote plugin



Hi,

I'm writing a joystick remote plugin, and have the following problem.
When starting vdr with my plugin, controlling it with joystick
works very well, but with LIRC remote it just sometimes reacts. When
starting vdr without my plugin LIRC remote works withour problems.

I am deriving my cJoystickRemote class from cRemote and cThread. In
my constructor the joystick device is opened with:
    fd = open("/dev/js0", O_RDONLY);
This is main part of my Action method:
    struct js_event e;

    for (; fd >= 0;)
    {
        LOCK_THREAD;
        if (cFile::FileReady(fd, 100))
        {
            if (safe_read(fd, &e, sizeof(struct js_event)) == sizeof(struct js_event))
            {
                 // Tests which axis or buttons have
                 changed and calls Put(...)
            }
            else
            {
                LOG_ERROR;
            }
        }
    }

Any idea someone?

Andreas



-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index