LED patterns

(Lysti Format Engine Patterns)
(N900)
Line 12: Line 12:
The patterns in the /etc/mce/mce.ini are broken down as follows:
The patterns in the /etc/mce/mce.ini are broken down as follows:
-
PatternName=Priority;ScreenOn;Timeout;LEDsToMap;Engine1Pattern;Engine2Pattern
+
:<tt>PatternName=Priority;ScreenOn;Timeout;LEDsToMap;Engine1Pattern;Engine2Pattern</tt>
=== Pattern Format ===
=== Pattern Format ===
==== Priority ====
==== Priority ====
 +
0-255, 0 is highest, 255 is lowest.
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.
+
Since currently only a single pattern at a time can be displayed, this is used to assign importance to the LED patterns. Although only a single LED pattern can be displayed at any time, multiple patterns may be active, 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.
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 ====
==== ScreenOn ====
 +
* 0: only show pattern when the display is off
* 0: only show pattern when the display is off
* 1: show pattern even when the display is on
* 1: show pattern even when the display is on
Line 32: Line 34:
==== TimeOut ====
==== TimeOut ====
 +
This is the time-out of the LED pattern in seconds. 0 for infinite, i.e. until the notification is dismissed.
This is the time-out of the LED pattern in seconds. 0 for infinite, i.e. until the notification is dismissed.
Line 47: Line 50:
You should avoid mapping the same LED to both engines.
You should avoid mapping the same LED to both engines.
 +
 +
==== Engine 1/2 Pattern ====
 +
 +
This is a series of text that describes the speed and intensity of changes in the LED(s) beign managed by that particular engine. See below for a breakdown of the patterns. Each can be at most 16 commands long.
=== Lysti Format Engine Patterns ===
=== Lysti Format Engine Patterns ===
 +
The LED patterns are of the form
 +
:<tt>9d8040007f007f0040ff7f007f000000</tt>
 +
Breaking this down for ease of reading we get a list of 8 commands, each of which is four characters long.
 +
:<tt>9d80 4000 7f00 7f00 40ff 7f00 7f00 0000</tt>
-
# Engine 1 pattern in Lysti format (16 commands at most)
+
==== List of Commands ====
-
# Engine 2 pattern in Lysti format (16 commands at most)
+
 
-
#
+
<tt>9d80</tt> - Refresh Engine Multiplexor
-
# 0000 -- Jump to the start of the pattern for the channel
+
 
-
# 40xx -- Set channel brightness
+
:This is to be used as the first command of every pattern). If this is excluded from the pattern, the led won't flash.
-
# 9d80 -- Refresh Mux (use as first command in every pattern!)
+
 
-
# xxyy -- Increment/decrement
+
<tt>40xx</tt> - Set channel brightness
-
#      xx determines the speed;
+
 
-
#        02-3f -- short step time (granularity 0.49ms)
+
:Where xx are two hexadecimal digits, e.g. 00 (for a brightness of 0) or ff (for a brightness of 255).
-
#        42-7f -- long step time (granularity 15.6ms)
+
 
-
#
+
<tt>xxyy</tt> - Increment or decrement the channel brightness over a period of time (xx) and number of steps (yy)
-
#   If xx is even, increment
+
 
-
#        If xx is odd, decrement
+
:Where xx and yy are hexadecimal digits
 +
Time per step (xx)
 +
:If xx is even, the steps are increment steps and brightness will increase.
 +
:If xx is odd, the steps are decrement steps and brightness will decrease.
 +
:If xx is between 02 and 3f, a short step time is used (granularity 0.49ms)
 +
:If xx is between 42 and 7f, a long step time is used (granularity 15.6ms)
 +
Number of steps (yy)
 +
:yy can be any value between 00 and ff (0 to 255)
 +
 
 +
<nowiki>
#      yy determines the increment/decrement steps
#      yy determines the increment/decrement steps
#        00-ff -- in/decrement steps
#        00-ff -- in/decrement steps
Line 71: Line 91:
#        Two consecutive increment/decrement sequences are needed
#        Two consecutive increment/decrement sequences are needed
#        to cover the entire range from 0-255
#        to cover the entire range from 0-255
 +
 +
# 0000 -- Jump to the start of the pattern for the channel
 +
# c000 -- End pattern execution
# c000 -- End pattern execution
 +
# e002 -- Send engine 1 trigger
# e002 -- Send engine 1 trigger
# e004 -- Send engine 2 trigger
# e004 -- Send engine 2 trigger
Line 78: Line 102:
# e100 -- Wait for engine 2 trigger
# e100 -- Wait for engine 2 trigger
# e200 -- Wait for engine 3 trigger <used by key backlight!>
# e200 -- Wait for engine 3 trigger <used by key backlight!>
 +
</nowiki>
 +
{{Reflist}}
{{Reflist}}

Revision as of 14:11, 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

Pattern Format

Priority

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

Since currently only a single pattern at a time can be displayed, this is used to assign importance to the LED patterns. Although only a single LED pattern can be displayed at any time, multiple patterns may be active, 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

There are two engines that can be used to make custom LED patterns.[1]

r, g, or b maps the corresponding LED to Engine 1.

R, G, or B maps the corresponding LED to Engine 2.

For example, "rG" maps the red LED to Engine 1, and the green LED to Engine 2.

You should avoid mapping the same LED to both engines.

Engine 1/2 Pattern

This is a series of text that describes the speed and intensity of changes in the LED(s) beign managed by that particular engine. See below for a breakdown of the patterns. Each can be at most 16 commands long.

Lysti Format Engine Patterns

The LED patterns are of the form

9d8040007f007f0040ff7f007f000000

Breaking this down for ease of reading we get a list of 8 commands, each of which is four characters long.

9d80 4000 7f00 7f00 40ff 7f00 7f00 0000

List of Commands

9d80 - Refresh Engine Multiplexor

This is to be used as the first command of every pattern). If this is excluded from the pattern, the led won't flash.

40xx - Set channel brightness

Where xx are two hexadecimal digits, e.g. 00 (for a brightness of 0) or ff (for a brightness of 255).

xxyy - Increment or decrement the channel brightness over a period of time (xx) and number of steps (yy)

Where xx and yy are hexadecimal digits

Time per step (xx)

If xx is even, the steps are increment steps and brightness will increase.
If xx is odd, the steps are decrement steps and brightness will decrease.
If xx is between 02 and 3f, a short step time is used (granularity 0.49ms)
If xx is between 42 and 7f, a long step time is used (granularity 15.6ms)

Number of steps (yy)

yy can be any value between 00 and ff (0 to 255)

# 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 # 0000 -- Jump to the start of the pattern for the channel # 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!>


Template:Reflist


Cite error: <ref> tags exist, but no <references/> tag was found