View Single Post
Posts: 149 | Thanked: 134 times | Joined on Jul 2007 @ Florida
#5
Ugh! I thought we had a winner here, but unfortunately, simply unlocking or locking the screen fires off the same dbus events (twice!) as opening or closing the camera cover!
Code:
=================================
Arg 1: :1.13
Arg 2: null
Arg 3: org.freedesktop.Hal.Device
Arg 4: PropertyModified
=================================
Arg 1: :1.13
Arg 2: null
Arg 3: org.freedesktop.Hal.Device
Arg 4: Condition
Arg 5: ButtonPressed
Arg 6: cover
=================================
I guess I should elaborate a bit on what I'm trying to do here.
I've set my N900 up to overclock (only 750) when I unlock the screen, then drop back to the default profile when I lock the screen (I plan to drop to a low voltage/slow profile after I get the rest finished).
This part works wonderfully with the following triggers:
Code:
/usr/local/bin/screenunlocked * * com.nokia.mce.signal tklock_mode_ind unlocked
/usr/local/bin/screenlocked * * com.nokia.mce.signal tklock_mode_ind locked
Unfortunately, my N900, though quite stable when overclocked with the voltage profile I'm using, will crash or lock up if I try and record video with those settings (obviously my DSP isn't as tolerant as my CPU). So, I want to have it drop down to the default profile when the camera door is open, but clock back up when the camera door closes again.

My current dbus-scripts setting for the camera trigger is:
Code:
/usr/local/bin/camerashutter * * org.freedesktop.Hal.Device Condition ButtonPressed cover
I decided to log each time each of the scripts were called and noticed this every time I unlocked the screen:
Code:
camerashutter called
screenunlocked called
camerashutter called
Similarly, every time I locked the screen:
Code:
camerashutter called
screenlocked called
camerashutter called
If I simply opened or closed the camera door, the expected happened:
Code:
camerashutter
I guess I still need a signal that can be reliably tied to the camera cover.
Any ideas?