LED patterns

m (minor formatting)
(N900: Copied some info over from the comments in /etc/mce/mce.ini. Began to format and explain it.)
Line 10: Line 10:
== N900 ==
== N900 ==
 +
The patterns in the /etc/mce/mce.ini are broken down as follows:
-
The N900 has an RGB LED connected to a Lysti controller.
+
PatternName=Priority;ScreenOn;Timeout;LEDsToMap;Engine1Pattern;Engine2Pattern
 +
 
 +
=== Priority ===
 +
0-255, 0 is highest, 255 is lowest.
 +
 
 +
Since currently only a single pattern at a time can be displayed, this is important to assign importance to the led patterns. Although only a single LED pattern can be displayed at a time, multiple patterns may be active at any one time, the pattern with the highest priority being displayed.
 +
 
 +
A common example of this is where the n900 is on charge, the battery is full (starting PatternBatteryFull with a priority of 40), and an SMS message is received (PatternCommunicationSMS with a priority of 30). On receipt of the SMS, the LED begins to display the flashing blue led of an SMS. Once that SMS has been dismissed, the green LED of the full battery notification is again displayed.
 +
 
 +
=== ScreenOn ===
 +
* 0: only show pattern when the display is off
 +
* 1: show pattern even when the display is on
 +
* 2: only show pattern when the display is off, including acting dead
 +
* 3: show pattern even when the display is on, including acting dead
 +
* 4: only show pattern if the display is off, or if in acting dead
 +
* 5: always show pattern, even if LED disabled
 +
 
 +
=== TimeOut ===
 +
This is the time-out of the LED pattern in seconds. 0 for infinite, i.e. until the notification is dismissed.
 +
 
 +
If this is set to 20, the pattern will display for 20 seconds, and then stop.
 +
 
 +
=== LEDsToMap ===
 +
 
 +
# LED(s) to map to Engine 1/Engine 2
 +
#        "r", "g", "b" maps the LED to engine 1
 +
#        "R", "G", "B" maps the LED to engine 2
 +
#        Example:
 +
#            "rG" maps the red LED to engine 1,
 +
#                      the green LED to engine 2,
 +
#       and leaves the blue LED unmapped
 +
#        Avoid mapping the same LEDs to both engines...
 +
# Engine 1 pattern in Lysti format (16 commands at most)
 +
# Engine 2 pattern in Lysti format (16 commands at most)
 +
#
 +
# 0000 -- Jump to the start of the pattern for the channel
 +
# 40xx -- Set channel brightness
 +
# 9d80 -- Refresh Mux (use as first command in every pattern!)
 +
# xxyy -- Increment/decrement
 +
#      xx determines the speed;
 +
#        02-3f -- short step time (granularity 0.49ms)
 +
#        42-7f -- long step time (granularity 15.6ms)
 +
#
 +
#   If xx is even, increment
 +
#        If xx is odd, decrement
 +
#      yy determines the increment/decrement steps
 +
#        00-ff -- in/decrement steps
 +
#
 +
#        Use 0 steps to create pauses
 +
#        Two consecutive increment/decrement sequences are needed
 +
#        to cover the entire range from 0-255
 +
# c000 -- End pattern execution
 +
# e002 -- Send engine 1 trigger
 +
# e004 -- Send engine 2 trigger
 +
# e008 -- Send engine 3 trigger <used by key backlight!>
 +
# e080 -- Wait for engine 1 trigger
 +
# e100 -- Wait for engine 2 trigger
 +
# e200 -- Wait for engine 3 trigger <used by key backlight!>

Revision as of 10:56, 8 January 2010

(UNDER CONSTRUCTION)

Contents

N800

The N800 has a single-colour (blue) LED behind the dpad.

N810

The N810 has an RGB LED.

N900

The patterns in the /etc/mce/mce.ini are broken down as follows:

PatternName=Priority;ScreenOn;Timeout;LEDsToMap;Engine1Pattern;Engine2Pattern

Priority

0-255, 0 is highest, 255 is lowest.

Since currently only a single pattern at a time can be displayed, this is important to assign importance to the led patterns. Although only a single LED pattern can be displayed at a time, multiple patterns may be active at any one time, the pattern with the highest priority being displayed.

A common example of this is where the n900 is on charge, the battery is full (starting PatternBatteryFull with a priority of 40), and an SMS message is received (PatternCommunicationSMS with a priority of 30). On receipt of the SMS, the LED begins to display the flashing blue led of an SMS. Once that SMS has been dismissed, the green LED of the full battery notification is again displayed.

ScreenOn

  • 0: only show pattern when the display is off
  • 1: show pattern even when the display is on
  • 2: only show pattern when the display is off, including acting dead
  • 3: show pattern even when the display is on, including acting dead
  • 4: only show pattern if the display is off, or if in acting dead
  • 5: always show pattern, even if LED disabled

TimeOut

This is the time-out of the LED pattern in seconds. 0 for infinite, i.e. until the notification is dismissed.

If this is set to 20, the pattern will display for 20 seconds, and then stop.

LEDsToMap

  1. LED(s) to map to Engine 1/Engine 2
  2. "r", "g", "b" maps the LED to engine 1
  3. "R", "G", "B" maps the LED to engine 2
  4. Example:
  5. "rG" maps the red LED to engine 1,
  6. the green LED to engine 2,
  7. and leaves the blue LED unmapped
  8. Avoid mapping the same LEDs to both engines...
  9. Engine 1 pattern in Lysti format (16 commands at most)
  10. Engine 2 pattern in Lysti format (16 commands at most)
  11. 0000 -- Jump to the start of the pattern for the channel
  12. 40xx -- Set channel brightness
  13. 9d80 -- Refresh Mux (use as first command in every pattern!)
  14. xxyy -- Increment/decrement
  15. xx determines the speed;
  16. 02-3f -- short step time (granularity 0.49ms)
  17. 42-7f -- long step time (granularity 15.6ms)
  18. If xx is even, increment
  19. If xx is odd, decrement
  20. yy determines the increment/decrement steps
  21. 00-ff -- in/decrement steps
  22. Use 0 steps to create pauses
  23. Two consecutive increment/decrement sequences are needed
  24. to cover the entire range from 0-255
  25. c000 -- End pattern execution
  26. e002 -- Send engine 1 trigger
  27. e004 -- Send engine 2 trigger
  28. e008 -- Send engine 3 trigger <used by key backlight!>
  29. e080 -- Wait for engine 1 trigger
  30. e100 -- Wait for engine 2 trigger
  31. e200 -- Wait for engine 3 trigger <used by key backlight!>