[pkg-fso-commits] [SCM] openmoko-files, various files for the Openmoko devices branch, master, updated. debian/20080912-1-1-gf27306c

Joachim Breitner mail at joachim-breitner.de
Tue Nov 11 18:15:43 UTC 2008


The following commit has been merged in the master branch:
commit f27306cf8ba13762f3b2ff5c6dd19767d5f19cc2
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Tue Nov 11 19:06:47 2008 +0100

    rules.yaml from milestone4

diff --git a/GTA02_Neo-FreeRunner/etc/freesmartphone/oevents/rules.yaml b/GTA02_Neo-FreeRunner/etc/freesmartphone/oevents/rules.yaml
index 13f672d..74bc6ef 100644
--- a/GTA02_Neo-FreeRunner/etc/freesmartphone/oevents/rules.yaml
+++ b/GTA02_Neo-FreeRunner/etc/freesmartphone/oevents/rules.yaml
@@ -21,60 +21,59 @@
 # - RingTone(cmd)           : cmd can be 'start' or 'stop'
 # - Time(hour, min)         : create a trigger activated at the given time
 # - Debug(msg)              : Action that prints a debug message (only for debuging)
-
--
-    trigger: IncomingMessage()
-    actions: MessageTone(play)
--
-    trigger: CallStatus()
-    filters: HasAttr(status, "incoming")
-    actions: RingTone(play)
--
-    trigger: CallStatus()
-    filters: Not(HasAttr(status, "incoming"))
-    actions: RingTone(stop)
 -
     trigger: Time(12,29)
     actions: Debug("A Test")
 -
-    trigger: CallStatus()
-    filters: HasAttr(status, "outgoing")
-    actions: SetScenario(gsmhandset)
--
-    trigger: CallStatus()
-    filters: HasAttr(status, "active")
-    actions: SetScenario(gsmhandset)
+    #
+    # Suspend Handling
+    #
+    trigger: InputEvent()
+    filters:
+             - HasAttr(switch, "POWER")
+             - HasAttr(event, "released")
+             - HasAttr(duration, 0)
+    actions: Suspend()
 -
-    trigger: CallStatus()
-    filters: HasAttr(status, "release")
-    actions: SetScenario(stereoout)
+    #
+    # Call -> Audio Scenario Handling
+    #
+    trigger: IncomingMessage()
+    actions: MessageTone(play)
+
 -
-    trigger: PowerStatus()
-    filters: HasAttr(status, "Charging")
+    while: CallListContains("incoming")
+    filters: Not(CallListContains("active"))
     actions: 
-            - SetLed("gta02_power_blue", "dark")
-            - SetLed("gta02_power_orange", "light")
+             - RingTone()
+             - SetDisplayBrightness("pcf50633_bl", 90)
 -
-    trigger: PowerStatus()
-    filters: HasAttr(status, "Discharging")
-    actions:
-            - SetLed("gta02_power_blue", "dark")
-            - SetLed("gta02_power_orange", "dark")
+    while: CallStatus()
+    filters: Or(HasAttr(status, "outgoing"), HasAttr(status, "active"))
+    actions: SetScenario(gsmhandset)
 -
-    trigger: PowerStatus()
-    filters: HasAttr(status, "Full")
-    actions: 
-             - SetLed("gta02_power_blue", "light")
-             - SetLed("gta02_power_orange", "dark")
+    while: PowerStatus()
+    filters: HasAttr(status, "charging")
+    actions: SetLed("gta02_power_orange", "light")
+-
+    while: PowerStatus()
+    filters: HasAttr(status, "critical")
+    actions: SetLed("gta02_power_orange", "blink")
+-
+    while: PowerStatus()
+    filters: HasAttr(status, "full")
+    actions: SetLed("gta02_power_blue", "light")
 -
     trigger: PowerStatus()
-    filters: HasAttr(status, "Critical")
-    actions:
-             - SetLed("gta02_power_blue","dark")
-             - SetLed("gta02_power_orange","blink")
+    filters: HasAttr(status, "empty")
+    actions: Command('poweroff')
+
+    #
+    # Headset Audio Scenario Support
+    #
 -
     trigger: InputEvent()
-    filters: 
+    filters:
              - HasAttr(switch, "HEADSET")
              - HasAttr(event, "pressed")
     actions: Command('amixer -d sset "Amp Spk" mute')
@@ -84,3 +83,40 @@
              - HasAttr(switch, "HEADSET")
              - HasAttr(event, "released")
     actions: Command('amixer -d sset "Amp Spk" unmute')
+
+    #
+    # A few testing rules :
+    #
+
+    # This rule will only be enabled in silent mode
+    # According to the preferences rules conf files.
+-
+    name: 'test-rule'
+    trigger: IdleState()
+    filters: HasAttr(status, "busy")
+    actions: Debug("Hello This is a test")
+-
+    trigger: Test("test")
+    actions: Debug("trigger test")
+-
+    while: Test("test2")
+    actions: RingTone()
+-
+    trigger: DbusTrigger(system, 'org.freesmartphone.odeviced', 0, 'org.freesmartphone.Device.IdleNotifier', 'State')
+    actions: Debug("dbus trigger test")
+- 
+
+    #
+    # Idleness Brightness Handling
+    #
+    trigger: IdleState()
+    filters: HasAttr(status, "busy")
+    actions: SetDisplayBrightness("pcf50633_bl", 90)
+-
+    trigger: IdleState()
+    filters: HasAttr(status, "idle_dim")
+    actions: SetDisplayBrightness("pcf50633_bl", 20)
+-
+    trigger: IdleState()
+    filters: HasAttr(status, "idle_prelock")
+    actions: SetDisplayBrightness("pcf50633_bl", 0)

-- 
openmoko-files, various files for the Openmoko devices



More information about the pkg-fso-commits mailing list