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:
parent
b190d0a5dc
commit
e9d4da93e3
7 changed files with 67 additions and 81 deletions
|
@ -8,20 +8,23 @@ Attention: some files will be overwritten!
|
||||||
It adds:
|
It adds:
|
||||||
- 2 profiles: headset and headset_silent
|
- 2 profiles: headset and headset_silent
|
||||||
- a new .state file: silent.state
|
- a new .state file: silent.state
|
||||||
- an menu for the auxbutton
|
- an menu for the auxbutton (since rev 213 disabled)
|
||||||
|
|
||||||
Improvements:
|
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)
|
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
|
during a call gsmhandset.state or gsmheadset.state is loaded
|
||||||
|
|
||||||
|
|
||||||
Known Issues:
|
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.
|
-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
|
-You will hear nothing, if you plug in or remove the headset during an call
|
||||||
|
|
||||||
Changelog:
|
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)
|
Rev 212: changed some files to newer versions (tested with shr)
|
||||||
|
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
#copy *.state files from ./scenarios/ to /usr/share/openmoko/scenarios
|
|
||||||
|
|
||||||
cp scenarios/* /usr/share/openmoko/scenarios/
|
cp scenarios/* /usr/share/openmoko/scenarios/
|
||||||
cp oevents/* /etc/freesmartphone/oevents/
|
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 profiles/* /etc/freesmartphone/opreferences/conf/profiles/
|
||||||
cp rules/* /etc/freesmartphone/opreferences/conf/rules/
|
cp rules/* /etc/freesmartphone/opreferences/conf/rules/
|
||||||
|
|
||||||
#auxmenu:
|
#auxmenu:
|
||||||
mkdir -p /usr/share/auxmenu
|
# mkdir -p /usr/share/auxmenu
|
||||||
|
#
|
||||||
cp auxmenu/auxmenu.py /usr/share/auxmenu/auxmenu.py
|
# cp auxmenu/auxmenu.py /usr/share/auxmenu/auxmenu.py
|
||||||
cp auxmenu/auxmenu.edj /usr/share/auxmenu/auxmenu.edj
|
# cp auxmenu/auxmenu.edj /usr/share/auxmenu/auxmenu.edj
|
||||||
cp auxmenu/auxmenu.sh /usr/bin/auxmenu
|
# cp auxmenu/auxmenu.sh /usr/bin/auxmenu
|
||||||
|
|
||||||
exit 1
|
exit 1
|
|
@ -21,19 +21,16 @@
|
||||||
# - RingTone(cmd) : cmd can be 'start' or 'stop'
|
# - RingTone(cmd) : cmd can be 'start' or 'stop'
|
||||||
# - Time(hour, min) : create a trigger activated at the given time
|
# - Time(hour, min) : create a trigger activated at the given time
|
||||||
# - Debug(msg) : Action that prints a debug message (only for debuging)
|
# - Debug(msg) : Action that prints a debug message (only for debuging)
|
||||||
-
|
# -
|
||||||
trigger: Time(12,29)
|
# #
|
||||||
actions: Debug("A Test")
|
# # Suspend Handling
|
||||||
-
|
# #
|
||||||
#
|
# trigger: InputEvent()
|
||||||
# Suspend Handling
|
# filters:
|
||||||
#
|
# - HasAttr(switch, "POWER")
|
||||||
trigger: InputEvent()
|
# - HasAttr(event, "released")
|
||||||
filters:
|
# - HasAttr(duration, 0)
|
||||||
- HasAttr(switch, "POWER")
|
# actions: Suspend()
|
||||||
- HasAttr(event, "released")
|
|
||||||
- HasAttr(duration, 0)
|
|
||||||
actions: Suspend()
|
|
||||||
-
|
-
|
||||||
#
|
#
|
||||||
# Call -> Audio Scenario Handling
|
# Call -> Audio Scenario Handling
|
||||||
|
@ -46,21 +43,31 @@
|
||||||
filters: Not(CallListContains("active"))
|
filters: Not(CallListContains("active"))
|
||||||
actions:
|
actions:
|
||||||
- RingTone()
|
- RingTone()
|
||||||
- SetDisplayBrightness("pcf50633_bl", 90)
|
- Command('xset -display localhost:0 s reset')
|
||||||
|
- OccupyResource(CPU)
|
||||||
-
|
-
|
||||||
name: 'handset'
|
name: 'handset'
|
||||||
while: CallStatus()
|
while: CallStatus()
|
||||||
filters: Or(HasAttr(status, "outgoing"), HasAttr(status, "active"))
|
filters: Or(HasAttr(status, "outgoing"), HasAttr(status, "active"))
|
||||||
actions: SetScenario(gsmhandset)
|
actions:
|
||||||
|
- SetScenario(gsmhandset)
|
||||||
|
- OccupyResource(CPU)
|
||||||
-
|
-
|
||||||
name: 'headset'
|
name: 'headset'
|
||||||
while: CallStatus()
|
while: CallStatus()
|
||||||
filters: Or(HasAttr(status, "outgoing"), HasAttr(status, "active"))
|
filters: Or(HasAttr(status, "outgoing"), HasAttr(status, "active"))
|
||||||
actions: SetScenario(gsmheadset)
|
actions:
|
||||||
|
- SetScenario(gsmheadset)
|
||||||
|
- OccupyResource(CPU)
|
||||||
-
|
-
|
||||||
while: PowerStatus()
|
while: PowerStatus()
|
||||||
filters: HasAttr(status, "charging")
|
filters: HasAttr(status, "charging")
|
||||||
actions: SetLed("gta02_power_orange", "light")
|
actions: SetLed("gta02_power_orange", "light")
|
||||||
|
#-
|
||||||
|
# while: PowerStatus()
|
||||||
|
# filters: Not(HasAttr(status, "discharging"))
|
||||||
|
# actions: OccupyResource(Display)
|
||||||
|
|
||||||
-
|
-
|
||||||
while: PowerStatus()
|
while: PowerStatus()
|
||||||
filters: HasAttr(status, "critical")
|
filters: HasAttr(status, "critical")
|
||||||
|
@ -114,44 +121,40 @@
|
||||||
- SetScenario(silent)
|
- SetScenario(silent)
|
||||||
- SetProfile(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 :
|
# 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')
|
trigger: DbusTrigger(system, 'org.freesmartphone.odeviced', 0, 'org.freesmartphone.Device.IdleNotifier', 'State')
|
||||||
actions: Debug("dbus trigger test")
|
actions: Debug("dbus trigger test")
|
||||||
-
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Idleness Brightness Handling
|
# 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()
|
trigger: IdleState()
|
||||||
filters: HasAttr(status, "busy")
|
filters: HasAttr(status, "busy")
|
||||||
actions: SetDisplayBrightness("pcf50633_bl", 90)
|
actions: Command('xset -display localhost:0 s reset')
|
||||||
-
|
-
|
||||||
trigger: IdleState()
|
trigger: IdleState()
|
||||||
filters: HasAttr(status, "idle_dim")
|
filters: HasAttr(status, "idle_dim")
|
||||||
actions: SetDisplayBrightness("pcf50633_bl", 20)
|
actions: Command('xset -display localhost:0 s activate')
|
||||||
-
|
#-
|
||||||
trigger: IdleState()
|
# trigger: IdleState()
|
||||||
filters: HasAttr(status, "idle_prelock")
|
# filters: HasAttr(status, "idle_prelock")
|
||||||
actions: SetDisplayBrightness("pcf50633_bl", 0)
|
# actions: SetDisplayBrightness("0", 0)
|
||||||
|
|
||||||
#
|
#
|
||||||
# usb and aux Handling
|
# usb and aux Handling
|
||||||
#
|
#
|
||||||
-
|
-
|
||||||
|
@ -160,11 +163,11 @@
|
||||||
- HasAttr(switch, "USB")
|
- HasAttr(switch, "USB")
|
||||||
- HasAttr(event, "pressed")
|
- HasAttr(event, "pressed")
|
||||||
actions: Command('pybat')
|
actions: Command('pybat')
|
||||||
-
|
# -
|
||||||
trigger: InputEvent()
|
# trigger: InputEvent()
|
||||||
|
#
|
||||||
filters:
|
# filters:
|
||||||
- HasAttr(switch, "AUX")
|
# - HasAttr(switch, "AUX")
|
||||||
- HasAttr(event, "pressed")
|
# - HasAttr(event, "pressed")
|
||||||
|
#
|
||||||
actions: Command('auxmenu')
|
# actions: Command('auxmenu')
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
ring-tone: "Arkanoid_PSID.sid"
|
ring-tone: "klingelton.mp3"
|
||||||
ring-volume: 10
|
ring-volume: 10
|
||||||
# SID tunes have no concept of length
|
# 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
|
message-volume: 10
|
||||||
# SID tunes have no concept of length
|
# SID tunes have no concept of length
|
||||||
message-length: 3
|
message-length: 3
|
||||||
|
|
||||||
|
|
|
@ -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
|
|
|
@ -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
|
|
|
@ -1,3 +0,0 @@
|
||||||
|
|
||||||
ring-volume: 0
|
|
||||||
message-volume: 0
|
|
Loading…
Reference in a new issue