UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. sixwheeledbeast
    3. Best
    S
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 4
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: For devices with no Notification LED is it possible to use flashlight instead?

      To progress further with the initial flashlight idea, controlling the flash directly appears to work fine in the following way.

      #!/usr/bin/env bash
      
      flashOff() {
      	printf '%s' "0" > /sys/class/leds/led:torch_0/brightness
      	printf '%s' "0" > /sys/class/leds/led:switch_0/brightness
      }
      
      flashOn() { # 2 appears to be the minimum brightness value possible
      	printf '%s' "2" > /sys/class/leds/led:torch_0/brightness
      	printf '%s' "1" > /sys/class/leds/led:switch_0/brightness
      }
      

      So with a loop I can have a nice flashing pattern at the minimum brightness.
      Just need to find what to hook into so I can have it only running only while there is a green notifications icon.

      As for using the screen, I think the green envelope icon, possibly slowly moving along the top edge of the screen (to minimise any burn in); would be a nice option there.

      posted in Fairphone 5
      S
      sixwheeledbeast
    • RE: For devices with no Notification LED is it possible to use flashlight instead?

      Comparing with flashlight on and off.

      Off
      /sys/class/led/led:switch_0/brightness = 0
      /sys/class/led/led:torch_0/brightness = 0
      /sys/class/led/led:torch_3/brightness = 0

      On
      /sys/class/led/led:switch_0/brightness = 1
      /sys/class/led/led:torch_0/brightness = 127
      /sys/class/led/led:torch_3/brightness = 127

      I'll need to test if changing these will trigger the light, certainly just making switch_0 = 1 doesn't work.
      Not sure if this is the correct way to interface with these.

      As for monitoring for new messages I'm wondering if dbus-monitor could be used...

      posted in Fairphone 5
      S
      sixwheeledbeast