maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N810 (https://talk.maemo.org/forumdisplay.php?f=28)
-   -   Automatically lock whenever the N810 light sensor is covered (https://talk.maemo.org/showthread.php?t=19127)

Picklesworth 2008-04-16 14:39

Re: Automatically lock whenever the N810 light sensor is covered
 
Well, IcelandDreams, if it's any consolation:
My N810 seems to have woken up on its own some time last night, which ultimately killed its battery. At least, that's what I think happened. (Unless my battery is completely messed up, which I hope not).

That Autolock enabled / disabled popup, unfortunately, appears right underneath (depth-wise) the locked / unlocked popup. Libnotify popups should really be stacked so that I can actually read what's going on.

hvacengi 2008-04-16 14:50

Re: Automatically lock whenever the N810 light sensor is covered
 
Yeah, I barely caught it the first time, and then paid closer attention. The message is only shown for about a second (maybe less).

PinCushionQueen 2008-04-17 01:09

Re: Automatically lock whenever the N810 light sensor is covered
 
Quote:

Originally Posted by Picklesworth (Post 170520)
Well, IcelandDreams, if it's any consolation:
My N810 seems to have woken up on its own some time last night, which ultimately killed its battery. At least, that's what I think happened. (Unless my battery is completely messed up, which I hope not).

Sounds like another app - perhaps an alarm or something of the sort woke it up. I don't see how this app could wake it up during the night (unless of course you sleep with the lights on). Also, don't you still have automatic screen off after xx amt of time?

nilchak 2008-04-17 02:07

Re: Automatically lock whenever the N810 light sensor is covered
 
This is so simple and yet its such a useful and well though out app.

I always thought pressing the hardware button on top would wear it out fast - seems a bit too flaky. Now this option seems perfect and works like a charm.

But one thought here, I often carry the N810 in my shirt pocket and not always in its pouch.
Will sunlight streaming in thru flimsy shirt switch it on again ?

How do i keep it locked after covering the light sensr and then taking my finger off from it and putting it in shirt pocket ? The moment I take the figer off, it seems to come back on.

vinc17 2008-04-17 08:17

Re: Automatically lock whenever the N810 light sensor is covered
 
Quote:

Originally Posted by Picklesworth (Post 170520)
My N810 seems to have woken up on its own some time last night, which ultimately killed its battery.

I had a similar problem in a dark room this morning: my N810 was inactive and the light sensor uncovered, but I noticed that the N810 sometimes automatically woke up and messages concerning lock/unlock were displayed (fortunately my N810 was on sector during all night). I checked the value of the light sensor with
Code:

cat /sys/bus/i2c/devices/*/lux
and I got 1. So, I suppose that it could sometimes be 0 as well, hence the problem.

IMHO, there should be a way to disable automatic unlocks based on the light sensor, or perhaps to enable them only when the sensor value is above some threshold. And the autolock daemon should ensure that there are no possible lock/unlock cycles when there is no user activity.

vinc17 2008-04-17 08:25

Re: Automatically lock whenever the N810 light sensor is covered
 
Quote:

Originally Posted by PinCushionQueen (Post 170860)
I don't see how this app could wake it up during the night (unless of course you sleep with the lights on).

If the N810 is close enough to a window, external lights can be sufficient to make the sensor value different from 0, and this could happen several times during the night (e.g. car lights, the moonlight which could change due to clouds and wind, etc.), though I haven't tried.

nilchak 2008-04-17 13:44

Re: Automatically lock whenever the N810 light sensor is covered
 
Quote:

Originally Posted by vinc17 (Post 170950)
If the N810 is close enough to a window, external lights can be sufficient to make the sensor value different from 0, and this could happen several times during the night (e.g. car lights, the moonlight which could change due to clouds and wind, etc.), though I haven't tried.

But once the car passed away or the moon was shrouded up by the dark ominous night clouds, and the wind stopped howling like mad, and the night went back to its peaceful slumber, wouldn't the N810 go back to sleep like a child again ?
:D

Benson 2008-04-17 16:33

Re: Automatically lock whenever the N810 light sensor is covered
 
Not if you had the backlight turned up bright enough...

IcelandDreams 2008-04-17 17:02

Re: Automatically lock whenever the N810 light sensor is covered
 
It was a dark and stormy night......

Dusty 2008-04-17 17:31

Re: Automatically lock whenever the N810 light sensor is covered
 
Wow. A lot of discussion over my simple program :)

Thanks for the suggestions. I thought about adding something to prevent quick lock/unlock cycles, but it didn't seem worth it, as I didn't have any trouble with it, and it might not lock/unlock when you want it too (when slipping the NIT out too check the weather quickly). Right now it also turns the screen on when uncovered - maybe that wasn't a good idea.

The program was designed for people (me) who put the NIT in a thick cover (like the one that comes with it) when not using it - the light sensor reads 0 lux in all but direct sunlight when in the gray cover.

I also suggest anyone that uses it read the web page or check the source code (it's short).

There's two ways to disable autolock: either use the lock button or slide out the keyboard.

I consciously tried to avoid any configuration options to make it easy to use.

I also hope it works as a proof of concept to Nokia, so they include something like it in later OSs.


All times are GMT. The time now is 04:09.

vBulletin® Version 3.8.8