Skip to content
This repository was archived by the owner on Nov 23, 2019. It is now read-only.
This repository was archived by the owner on Nov 23, 2019. It is now read-only.

LED devices don't have delay_on/delay_off properties #62

Open

Description

@ensonic

The code in https://github.com/topikachu/python-ev3/blob/master/ev3/ev3dev.py#L464-465 exposes delay_on/off properties for the timing. Allthough:

ll /sys/class/leds/ev3-left0:red:ev3dev/
total 0
-rw-rw-r-- 1 root ev3dev 4096 Jul 21 15:15 brightness
lrwxrwxrwx 1 root root      0 Jan  1  2000 device -> ../../../leds_pwm
-r--r--r-- 1 root ev3dev 4096 Jan  1  2000 max_brightness
drwxr-xr-x 2 root root      0 Jan  1  2000 power
lrwxrwxrwx 1 root root      0 Jan  1  2000 subsystem -> ../../../../../class/leds
-rw-rw-r-- 1 root ev3dev 4096 Jul 21 15:15 trigger
-rw-rw-r-- 1 root ev3dev 4096 Jan  1  2000 uevent

Activity

  1. dlech commented on Jul 21, 2015

    @dlech

    You have to set trigger to timer in order to create the delay_on and delay_off attributes in sysfs. This has some unfortunate side effects. See ev3dev/ev3dev#225 for more information.

    My advice would be to implement your own blinking function rather than relying on the timer trigger.

  2. topikachu commented on Aug 3, 2015

    @topikachu
    Owner

    @dlech Is https://github.com/ev3dev/ev3dev/wiki/Using-the-LEDs out of date? It still has delay_on/off

  3. dlech commented on Aug 4, 2015

    @dlech

    The leds class is part of the mainline linux kernel, so it has not changed and is not likely to. You can use the timer trigger. I just don't recommend it because of permissions and race condition issues with the dynamic sysfs attributes (delay_on/delay_off).

  4. dlech commented on Aug 4, 2015

    @dlech

    I suppose we should add a link to the issue I mentioned above to that page though.

  5. added a commit that references this issue on Nov 7, 2015
  6. added a commit that references this issue on Jan 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions