upgraded rules.yaml, changed rington (change the file phone/default.yaml)

git-svn-id: http://www.neo1973-germany.de/svn@245 46df4e5c-bc4e-4628-a0fc-830ba316316d
This commit is contained in:
Paulus 2009-02-16 17:07:27 +00:00
parent b190d0a5dc
commit e9d4da93e3
7 changed files with 67 additions and 81 deletions

View file

@ -8,20 +8,23 @@ Attention: some files will be overwritten!
It adds:
- 2 profiles: headset and headset_silent
- a new .state file: silent.state
- an menu for the auxbutton
- an menu for the auxbutton (since rev 213 disabled)
Improvements:
When you mute the phone in the auxmenu (don't use the profile switcher from zhone!), silent.state is loaded and the silent profile is choosen.
[When you mute the phone in the auxmenu (don't use the profile switcher from zhone!), silent.state is loaded and the silent profile is choosen.]
If you plug in the headset, headset.state is loaded, an the profile switches to headset or headset_silent(they are the same, just to remember if the phone is muted or not)
during a call gsmhandset.state or gsmheadset.state is loaded
Known Issues:
-the "lock-funktion" don't work yet
[-the "lock-funktion" don't work yet]
-the install script will overwrite your /etc/freesmartphone/oevents/rules.yaml and some other files.
-You will hear nothing, if you plug in or remove the headset during an call
Changelog:
Rev 245: upgraded rules.yaml, changed rington (change the file phone/default.yaml)
Rev 213: removed auxmenu,
Rev 212: changed some files to newer versions (tested with shr)

View file

@ -1,18 +1,18 @@
#!/bin/sh
#copy *.state files from ./scenarios/ to /usr/share/openmoko/scenarios
cp scenarios/* /usr/share/openmoko/scenarios/
cp oevents/* /etc/freesmartphone/oevents/
cp phone/* /etc/freesmartphone/opreferences/conf/phone/
cp phone/default.yaml /etc/freesmartphone/opreferences/conf/phone/default.yaml
cp phone/default.yaml /etc/freesmartphone/opreferences/conf/phone/headset.yaml
cp phone/default.yaml /etc/freesmartphone/opreferences/conf/phone/headset_silent.yaml
cp profiles/* /etc/freesmartphone/opreferences/conf/profiles/
cp rules/* /etc/freesmartphone/opreferences/conf/rules/
#auxmenu:
mkdir -p /usr/share/auxmenu
cp auxmenu/auxmenu.py /usr/share/auxmenu/auxmenu.py
cp auxmenu/auxmenu.edj /usr/share/auxmenu/auxmenu.edj
cp auxmenu/auxmenu.sh /usr/bin/auxmenu
# mkdir -p /usr/share/auxmenu
#
# cp auxmenu/auxmenu.py /usr/share/auxmenu/auxmenu.py
# cp auxmenu/auxmenu.edj /usr/share/auxmenu/auxmenu.edj
# cp auxmenu/auxmenu.sh /usr/bin/auxmenu
exit 1

View file

@ -21,19 +21,16 @@
# - 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: Time(12,29)
actions: Debug("A Test")
-
#
# Suspend Handling
#
trigger: InputEvent()
filters:
- HasAttr(switch, "POWER")
- HasAttr(event, "released")
- HasAttr(duration, 0)
actions: Suspend()
# -
# #
# # Suspend Handling
# #
# trigger: InputEvent()
# filters:
# - HasAttr(switch, "POWER")
# - HasAttr(event, "released")
# - HasAttr(duration, 0)
# actions: Suspend()
-
#
# Call -> Audio Scenario Handling
@ -46,21 +43,31 @@
filters: Not(CallListContains("active"))
actions:
- RingTone()
- SetDisplayBrightness("pcf50633_bl", 90)
- Command('xset -display localhost:0 s reset')
- OccupyResource(CPU)
-
name: 'handset'
while: CallStatus()
filters: Or(HasAttr(status, "outgoing"), HasAttr(status, "active"))
actions: SetScenario(gsmhandset)
actions:
- SetScenario(gsmhandset)
- OccupyResource(CPU)
-
name: 'headset'
while: CallStatus()
filters: Or(HasAttr(status, "outgoing"), HasAttr(status, "active"))
actions: SetScenario(gsmheadset)
actions:
- SetScenario(gsmheadset)
- OccupyResource(CPU)
-
while: PowerStatus()
filters: HasAttr(status, "charging")
actions: SetLed("gta02_power_orange", "light")
#-
# while: PowerStatus()
# filters: Not(HasAttr(status, "discharging"))
# actions: OccupyResource(Display)
-
while: PowerStatus()
filters: HasAttr(status, "critical")
@ -114,44 +121,40 @@
- SetScenario(silent)
- SetProfile(silent)
#change scenarios on profile change
-
trigger: DbusTrigger(system, 'org.freesmartphone.opreferencesd', 0, 'org.freesmartphone.Preferences.Service', 'Notify')
filters:
- HasAttr(key, "enabled-rules")
- HasAttr(variant, "silent")
actions: Debug("dbus trigger test")
#
# 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
#
# (activating the user's screen saver from a central daemon is quite hacky
# we really want some user's application to listen for the right signals)
-
trigger: IdleState()
filters: HasAttr(status, "busy")
actions: SetDisplayBrightness("pcf50633_bl", 90)
actions: Command('xset -display localhost:0 s reset')
-
trigger: IdleState()
filters: HasAttr(status, "idle_dim")
actions: SetDisplayBrightness("pcf50633_bl", 20)
-
trigger: IdleState()
filters: HasAttr(status, "idle_prelock")
actions: SetDisplayBrightness("pcf50633_bl", 0)
actions: Command('xset -display localhost:0 s activate')
#-
# trigger: IdleState()
# filters: HasAttr(status, "idle_prelock")
# actions: SetDisplayBrightness("0", 0)
#
#
# usb and aux Handling
#
-
@ -160,11 +163,11 @@
- HasAttr(switch, "USB")
- HasAttr(event, "pressed")
actions: Command('pybat')
-
trigger: InputEvent()
filters:
- HasAttr(switch, "AUX")
- HasAttr(event, "pressed")
actions: Command('auxmenu')
# -
# trigger: InputEvent()
#
# filters:
# - HasAttr(switch, "AUX")
# - HasAttr(event, "pressed")
#
# actions: Command('auxmenu')

View file

@ -1,9 +1,10 @@
ring-tone: "Arkanoid_PSID.sid"
ring-tone: "klingelton.mp3"
ring-volume: 10
# SID tunes have no concept of length
ring-length: 60
ring-length: 15
message-tone: "Arkanoid_PSID.sid;tune=3"
message-tone: "ringtone_ringnroll.ogg"
message-volume: 10
# SID tunes have no concept of length
message-length: 3

View file

@ -1,9 +0,0 @@
ring-tone: "Arkanoid_PSID.sid"
ring-volume: 10
# SID tunes have no concept of length
ring-length: 60
message-tone: "Arkanoid_PSID.sid;tune=3"
message-volume: 10
# SID tunes have no concept of length
message-length: 3

View file

@ -1,9 +0,0 @@
ring-tone: "Arkanoid_PSID.sid"
ring-volume: 10
# SID tunes have no concept of length
ring-length: 60
message-tone: "Arkanoid_PSID.sid;tune=3"
message-volume: 10
# SID tunes have no concept of length
message-length: 3

View file

@ -1,3 +0,0 @@
ring-volume: 0
message-volume: 0