maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   N900 Video focus and led light, python script (https://talk.maemo.org/showthread.php?t=46427)

M A S T E R 2010-05-27 17:47

Re: N900 Video focus and led light, python script
 
Quote:

Originally Posted by m2cm2c (Post 682999)
lfocus_0.527-1
fixed the problem with keyboard led shortcuts not syncing with the buttons
the lfocus dialog can now be turned on by using the proximity sensor instead of tapping the screen and clicking on the logo
added a new row of toggle buttons for (remember led state when capturing)(auto turn off red led when capturing)(timer red led blinking)
please read the first post on this thread for more info.
Now available in Extras-testing



I'm in need of testers, thank you.

WOW this is already in Extras Testing?! this is moving faster than i thought. Great F-ing Job bro and everyone else who is contributing. I am assuming there is no hiccups with PR1.2? If so you guys are the bomb.com!

-MASTER

eitama 2010-05-27 18:04

Re: N900 Video focus and led light, python script
 
Quote:

Originally Posted by m2cm2c (Post 682999)
lfocus_0.527-1
fixed the problem with keyboard led shortcuts not syncing with the buttons
the lfocus dialog can now be turned on by using the proximity sensor instead of tapping the screen and clicking on the logo
added a new row of toggle buttons for (remember led state when capturing)(auto turn off red led when capturing)(timer red led blinking)
please read the first post on this thread for more info.
Now available in Extras-testing



I'm in need of testers, thank you.

Yey! you implemented my proximity sensor advice!!! You are the man.
Installing.

m2cm2c 2010-05-28 11:54

Re: N900 Video focus and led light, python script
 
lfocus_0.528-1
lfocus is now optified.
Now available in Extras-testing

I'm in need of testers, thank you.

eitama 2010-05-28 12:16

Re: N900 Video focus and led light, python script
 
Quote:

Originally Posted by m2cm2c (Post 685439)
lfocus_0.528-1
lfocus is now optified.
Now available in Extras-testing

I'm in need of testers, thank you.

m2cm2c, can you please explain to me how does iFocus forces a certain forcus, even if I do a half press and then press the shutter button?

Also, if I hide the UI, does it keep forcing a certain focus?

I am asking cause I have many mechanical noises since last version, but I am not sure it's related to it.

m2cm2c 2010-05-28 12:41

Re: N900 Video focus and led light, python script
 
Quote:

Originally Posted by eitama (Post 685477)
m2cm2c, can you please explain to me how does iFocus forces a certain forcus, even if I do a half press and then press the shutter button?

Also, if I hide the UI, does it keep forcing a certain focus?

I am asking cause I have many mechanical noises since last version, but I am not sure it's related to it.

lfocus doesn't force a focus it only applies it through v4l2-ctl, but for the stop autofocus function it uses the stop-focus.py script which intercepts a "True" half-press button signal and returns "False" instead. as for the mechanical noise I think it is caused by remember led state function which is being sent by lfocus after pressing on the camera button [edit] and tries to turn on the led while the camera is in stand by state which causes the camera to turn on and off hence the lense going into action position and idle position. I think I'll apply a fix for this plus keep the remember led state button turned off and the user turns it on only when he has to take a video since keeping led on after taking a picture doesn't make any sense.

m2cm2c 2010-05-28 15:36

Re: N900 Video focus and led light, python script
 
lfocus_0.528-3
fixed led remember state button and made it always off, so it needs to be turned on by the user only when taking a video
Now available in Extras-testing

I'm in need of testers, thank you.

akaSM 2010-05-28 15:45

Re: N900 Video focus and led light, python script
 
It seems everything works fine but, is there a way to keep the image clear while using LFocus' menu? also, an option to use the volume keys to manual focus would be very uselul. Digital zoom isn't that nice either :P

m2cm2c 2010-05-28 15:49

Re: N900 Video focus and led light, python script
 
Quote:

Originally Posted by akaSM (Post 685975)
It seems everything works fine but, is there a way to keep the image clear while using LFocus' menu? also, an option to use the volume keys to manual focus would be very uselul. Digital zoom isn't that nice either :P

you can use the volume keys for focusing, please read my first post on this thread for more information. As for removing the dimming that happens when a dialog pops up I'm not sure if it is "hackable" or not but I'll do some research on that.

akaSM 2010-05-28 15:57

Re: N900 Video focus and led light, python script
 
Quote:

Originally Posted by m2cm2c (Post 685990)
you can use the volume keys for focusing, please read my first post on this thread for more information. As for removing the dimming that happens when a dialog pops up I'm not sure if it is "hackable" or not but I'll do some research on that.

I meant by default, but now that I think about it, it's not such a great idea, as it disables the autofocus. but maybe it would worrk fine while taking a video

eitama 2010-05-28 17:02

Re: N900 Video focus and led light, python script
 
Quote:

Originally Posted by m2cm2c (Post 685949)
lfocus_0.528-3
fixed led remember state button and made it always off, so it needs to be turned on by the user only when taking a video
Now available in Extras-testing

I'm in need of testers, thank you.

Installed, my comments :
1. proximity sensor only brings up the interface, it does not hide it,
which is a bit annoying, but that my personal opinion, and you can just tap elsewhere.
2. While the interface is being displayed, the camera shutter button does NOT work, You need to go back to camera interface and take the shot, in this case, the half press is not intercepted by lFocus, and the manual focus is replaced by auto focus.

Suggestions :
1. Make proximity sensor toggle the UI on/off.
2. Add a checkbox to the left of the manual focus progress bar which will control the functionality of intercepting the half press.
This will allow one to set manual focus, remove the UI to get fullscreen without dimming / blurring - take the shot without auto-focus getting in the way.

Good job mate,
I enjoy doing QA for you.
Eitam.

Edit :
1 more bug, which existed in all versions as far as I remember.
- The hw keyboard shortcuts do not always work on the 1st hit, they sometimes require double click, even if you just toggle red light on off on hw keyboard this happens.

m2cm2c 2010-05-28 17:18

Re: N900 Video focus and led light, python script
 
Quote:

Originally Posted by eitama (Post 686113)
Installed, my comments :
1. proximity sensor only brings up the interface, it does not hide it,
which is a bit annoying, but that my personal opinion, and you can just tap elsewhere.
2. While the interface is being displayed, the camera shutter button does NOT work, You need to go back to camera interface and take the shot, in this case, the half press is not intercepted by lFocus, and the manual focus is replaced by auto focus.

Suggestions :
1. Make proximity sensor toggle the UI on/off.
2. Add a checkbox to the left of the manual focus progress bar which will control the functionality of intercepting the half press.
This will allow one to set manual focus, remove the UI to get fullscreen without dimming / blurring - take the shot without auto-focus getting in the way.

Good job mate,
I enjoy doing QA for you.
Eitam.

Edit :
1 more bug, which existed in all versions as far as I remember.
- The hw keyboard shortcuts do not always work on the 1st hit, they sometimes require double click, even if you just toggle red light on off on hw keyboard this happens.

thank you for your observations :D
1. when I first wrote the code for the proximity it was for showing and hiding the dialog but it got annoying when I put my thumb on the proximity by mistake and hide the dialog, then I thought it would be better just to tap on the screen to hide it instead.
2.lfocus does not turn off autofocus by default you only do that by turning on the keyboard shortcuts, as for taking a picture while the menu is shown, the solution I could think of right now is to automatically hide the menu and start capturing immediately, I think it is a good Idea and I will implement it in a future release.
3. yes the keyboard shortcuts are a bit laggy right now and you should hold on the shortcut for a little while for it to activate. I think I will find a solution for that in a future release also.
[Edit]
for #1 I think I could add a toggle button for the proximity showing/hiding the dialog :D

eitama 2010-05-28 17:40

Re: N900 Video focus and led light, python script
 
Quote:

Originally Posted by m2cm2c (Post 686160)
thank you for your observations :D
1. when I first wrote the code for the proximity it was for showing and hiding the dialog but it got annoying when I put my thumb on the proximity by mistake and hide the dialog, then I thought it would be better just to tap on the screen to hide it instead.
2.lfocus does not turn off autofocus by default you only do that by turning on the keyboard shortcuts, as for taking a picture while the menu is shown, the solution I could think of right now is to automatically hide the menu and start capturing immediately, I think it is a good Idea and I will implement it in a future release.
3. yes the keyboard shortcuts are a bit laggy right now and you should hold on the shortcut for a little while for it to activate. I think I will find a solution for that in a future release also.
[Edit]
for #1 I think I could add a toggle button for the proximity showing/hiding the dialog :D

I am glad to help, you are doing fine work.
1. I understand about the proximity sensor, it's cool if you leave it as show UI only.
2. After reading what you wrote, I will change my suggestion :
when the UI pops up, it should automatically turn on keyboard shortcuts, this way you can close the UI, and still enjoy the manual focus you configured. Then, to go back to autofocus, the user needs to tap the proximity sensor again, and uncheck the checkbox I suggested earlier you should add.
3. Cool (;

Edit :
- The blinking red in timer mode is working great!

Crogge 2010-05-28 17:45

Re: N900 Video focus and led light, python script
 
It would be nice to add a delay to the proximity sensor, like a requirement to hold it 2 seconds before the menu appears. Its reacting sometimes on "false alarms" too quick.

Disabling the entire zoom could be also quite handy, replacing the zoom buttons with the manual focus also in the default camera mode would be better. (I saw that it works only in keyboard mode)

Except that I really like the plugin and use it very often :)

m2cm2c 2010-05-28 17:47

Re: N900 Video focus and led light, python script
 
Quote:

Originally Posted by eitama (Post 686216)
I am glad to help, you are doing fine work.
1. I understand about the proximity sensor, it's cool if you leave it as show UI only.
2. After reading what you wrote, I will change my suggestion :
when the UI pops up, it should automatically turn on keyboard shortcuts, this way you can close the UI, and still enjoy the manual focus you configured. Then, to go back to autofocus, the user needs to tap the proximity sensor again, and uncheck the checkbox I suggested earlier you should add.
3. Cool (;

Edit :
- The blinking red in timer mode is working great!

how about this:
move the toggle keyboard button from the status menu to the lfocus dialog ??? :cool:

[edit]
Quote:

Originally Posted by Crogge (Post 686236)
It would be nice to add a delay to the proximity sensor, like a requirement to hold it 2 seconds before the menu appears. Its reacting sometimes on "false alarms" too quick.

Disabling the entire zoom could be also quite handy, replacing the zoom buttons with the manual focus also in the default camera mode would be better. (I saw that it works only in keyboard mode)

Except that I really like the plugin and use it very often :)

the proximity idea is good and I will consider it in a future release.
as for the zoom situation I think putting the keyboard toggle button in the lfocus dialog should do the trick!

zimon 2010-05-28 17:56

Re: N900 Video focus and led light, python script
 
Does not work for me. Disabled shortcutd (which was using proximity sensor) but still didn't work.

If one keeps camera lens cover open all the time (mine is and cannot shut it down), will the program work?

Also tried to manually start lfocus.py on xterminal (sudo ...). Starts, but when camera button is pressed and camera application comes in front, I still cannot see anything which would tell there is some extra (lfocus).

m2cm2c 2010-05-28 18:04

Re: N900 Video focus and led light, python script
 
Quote:

Originally Posted by zimon (Post 686276)
Does not work for me. Disabled shortcutd (which was using proximity sensor) but still didn't work.

If one keeps camera lens cover open all the time (mine is and cannot shut it down), will the program work?

lfocus will not open up until it gets the signal from the lens cover.

whats on my mind now is that you can play with the stop_focus.py script to make it force the lens cover signal.

[edit]
or :D

you can hash out (comment out "#") the "self.hide_all()" located in line 130 of lfocuswi.py and replace it with "self.show_all()"

[edit]
Quote:

Originally Posted by zimon (Post 686276)
Also tried to manually start lfocus.py on xterminal (sudo ...). Starts, but when camera button is pressed and camera application comes in front, I still cannot see anything which would tell there is some extra (lfocus).

do not run lfocus.py directly
instead use:
sudo lfocus start
that will activate the keyboard script for you
and when you're done type in:
sudo lfocus stop

zimon 2010-05-29 10:59

Re: N900 Video focus and led light, python script
 
Made the self.show_all() modification.

Got it working by manually starting from terminal. However, I have to CTRL+C to quit "sudo lfocus start" in the end?

Couldn't see any icon/information in the camera/video window though, with or without covering proximity sensor with my left thumb.

m2cm2c 2010-05-29 11:38

Re: N900 Video focus and led light, python script
 
Quote:

Originally Posted by zimon (Post 687748)
Made the self.show_all() modification.

Got it working by manually starting from terminal. However, I have to CTRL+C to quit "sudo lfocus start" in the end?

Couldn't see any icon/information in the camera/video window though, with or without covering proximity sensor with my left thumb.

I've forgotten to mention that you have to execute the following as root after modifying the line:
pkill -f /usr/bin/hildon-status-menu
if you want to use the proximity sensor type in the following as a normal user in the terminal:
sudo lfocus start_proximity
and when you're done
sudo lfocus stop_proximity

m2cm2c 2010-05-29 11:42

Re: N900 Video focus and led light, python script
 
lfocus_0.528-4
fixed stop RLED toggle button and made it always off, so it needs to be turned on by the user only when taking a video
Now available in Extras-testing

I'm in need of testers, thank you.

zimon 2010-05-29 17:58

Re: N900 Video focus and led light, python script
 
start_proximity helped. Now I can see the controls when proximity sensor is covered.

However, is it normal, "sudo lfocus start" never returns until quit with CTRL+C?

If one keeps camera in the stand by, not closing the lens cover or camera application, but just leaving it to the backgroung; then using keyboard to type a message for example will adjust the focus and turn LEDs on/off? Maybe you could make a change, that if Camera application is not in the foreground, then do nothing although the keys are pressed.

m2cm2c 2010-05-30 02:32

Re: N900 Video focus and led light, python script
 
Quote:

Originally Posted by zimon (Post 688426)
start_proximity helped. Now I can see the controls when proximity sensor is covered.

However, is it normal, "sudo lfocus start" never returns until quit with CTRL+C?

If one keeps camera in the stand by, not closing the lens cover or camera application, but just leaving it to the backgroung; then using keyboard to type a message for example will adjust the focus and turn LEDs on/off? Maybe you could make a change, that if Camera application is not in the foreground, then do nothing although the keys are pressed.

since you have the controls showing up, I suggest that you use the interface instead of the command line, so you should use the keyboard icon in the status menu to toggle the keyboard script.

zimon 2010-05-30 18:21

Re: N900 Video focus and led light, python script
 
Seems to work fine just from status menu, without needing keyboard or to reserve proximity sensor for this job. Good!
The problem with proximity sensor was, that even when Camera application was closed, covering proximity sensor brought the lfocus controls in front, for example in Desktop view, Browser view or anywhere.

I do not know if it is possible to know which program is on the foreground, but maybe lfocus could ignore both proximity sensor and keyboard when Camera is not on the foreground, whether or not they are enabled from the status menu.
That way one could use proximity sensor also for other jobs, but for lfocus when Camera is in front. (Would have to ask shortcutd then again ignore proximity sensor when Camera is front.)

The reason I have no lens cover, is because I use the old version of Mugen battery back cover. The old version has space available under the cover. I have microSD-USB-adapter, 2nd microSD card and tiny Bluetooth-adapter all hidden under the cover, for all kind of sudden data transfer needs on the road. ;) Yet to find small enough microUSB-USB adapter to fit inside also to have emergency charge ability wherever is a USB-slot available.

But I can also see that someone would want to keep lens cover and camera application open in the background, to make it quicker available for next use or to continue previously paused video recording.

m2cm2c 2010-05-31 10:04

Re: N900 Video focus and led light, python script
 
Quote:

Originally Posted by zimon (Post 690293)
Seems to work fine just from status menu, without needing keyboard or to reserve proximity sensor for this job. Good!
The problem with proximity sensor was, that even when Camera application was closed, covering proximity sensor brought the lfocus controls in front, for example in Desktop view, Browser view or anywhere.

I do not know if it is possible to know which program is on the foreground, but maybe lfocus could ignore both proximity sensor and keyboard when Camera is not on the foreground, whether or not they are enabled from the status menu.
That way one could use proximity sensor also for other jobs, but for lfocus when Camera is in front. (Would have to ask shortcutd then again ignore proximity sensor when Camera is front.)

The reason I have no lens cover, is because I use the old version of Mugen battery back cover. The old version has space available under the cover. I have microSD-USB-adapter, 2nd microSD card and tiny Bluetooth-adapter all hidden under the cover, for all kind of sudden data transfer needs on the road. ;) Yet to find small enough microUSB-USB adapter to fit inside also to have emergency charge ability wherever is a USB-slot available.

But I can also see that someone would want to keep lens cover and camera application open in the background, to make it quicker available for next use or to continue previously paused video recording.

Hey, thanks for the good idea, right now the script was made to take advantage of the lens cover signals, but I'll take into count your idea for newer releases :D

anaskr 2010-06-03 17:49

Re: N900 Video focus and led light, python script
 
is there a way to just remove the red light ?!! cuz whenever i open the camera the ifocus automatically pops outs !! and sometime while taking a pictures it dosn save and the camera application closes!!

maxximuscool 2010-06-03 21:46

Re: N900 Video focus and led light, python script
 
LIVE FOCUS BUGs!!

The live focus slide bar keep on appearing on the screen automatically whenever the camera lense is opened!

An annoyance sound when sliding the bar!!


I would like the BAR to be gone and replace it with + and - button with a display number of focus box instead.

This way we always get the best manual focus point by point. The slide bar is just not accurate enough.

m2cm2c 2010-06-04 03:10

Re: N900 Video focus and led light, python script
 
Quote:

Originally Posted by anaskr (Post 698077)
is there a way to just remove the red light ?!! cuz whenever i open the camera the ifocus automatically pops outs !! and sometime while taking a pictures it dosn save and the camera application closes!!


Quote:

Originally Posted by maxximuscool (Post 698471)
LIVE FOCUS BUGs!!

The live focus slide bar keep on appearing on the screen automatically whenever the camera lense is opened!

An annoyance sound when sliding the bar!!


I would like the BAR to be gone and replace it with + and - button with a display number of focus box instead.

This way we always get the best manual focus point by point. The slide bar is just not accurate enough.

I recommend that you both read the first post on this thread for information on how lfocus works now and what I'm planning to do, read the changelog for my notes on lfocus releases and read the latest posts on this thread :D

NokiaRocks 2010-06-10 14:52

Re: N900 Video focus and led light, python script
 
I can't really find a solution for the always upcoming bar when opening the camera, even when I just want to use it as flashlight.
Could someone help me, cause I don't want to uninstall this great app !

eitama 2010-06-10 14:55

Re: N900 Video focus and led light, python script
 
Quote:

Originally Posted by NokiaRocks (Post 708882)
I can't really find a solution for the always upcoming bar when opening the camera, even when I just want to use it as flashlight.
Could someone help me, cause I don't want to uninstall this great app !

It's a newly added feature, using the proximity sensor as a shortcut to open the bar, don't put your finger on it, and it won't happen

NokiaRocks 2010-06-10 15:18

Re: N900 Video focus and led light, python script
 
Quote:

Originally Posted by eitama (Post 708887)
It's a newly added feature, using the proximity sensor as a shortcut to open the bar, don't put your finger on it, and it won't happen

loool. :p failed
Thx 4 your hint !

fw190 2010-06-11 09:26

Re: N900 Video focus and led light, python script
 
There is some sort of a conflict with blessn900 app. Could this be solved somehow? When I start blessn900 the focus app pops out. Would there be a possibility to add a livefocus menu to settings and the ability to turn it off completely for some time to avoid conflict?

dymaxion 2010-06-12 16:04

Re: N900 Video focus and led light, python script
 
For some reason this doesn't seem to work for me.
I set (Stop RLED) then tapped off, to go back to the main camera live view.

When starting video, the red light comes on, goes off and then comes back on & stays on. I've tried various permutations of settings with no luck.

After starting recording, I can disable the RLED by tapping the RLED button, however I have to do this everytime I record which kinda defeats the auto disable option.

Any ideas why? Is there an incompatibility with PR1.2 ?

Can't we patch the kernel with a /proc/sys flag to never display the red LED! Sigh.

dashti 2010-06-19 13:47

Re: N900 Video focus and led light, python script
 
i wont the old update
lfocus_0.528-1
or
lfocus_0.528-3
...
the last one is noise me . evrytime they show me the menu WTF

RafaLL92 2010-06-22 19:03

Re: N900 Video focus and led light, python script
 
Quote:

Originally Posted by fw190 (Post 710104)
There is some sort of a conflict with blessn900 app. Could this be solved somehow? When I start blessn900 the focus app pops out. Would there be a possibility to add a livefocus menu to settings and the ability to turn it off completely for some time to avoid conflict?

Yeah that would be really useful, but is it only me or the live focus dialog box seems to be preety useless not only because it is very hard to see the actual outcome (as n900 'blurs' the area outside the 'live focus' dialog box ) but because of the fact that the focus can be changed either by 'a-s' keys and also with the zoom buttons (volume control keys). I know that it might be caused by the fact that some may use the digital zoom function.

I would suggest to use the proximity sensor to toggle between volume keys changing zoom and changing focus. I think it would be preety handy.

Just my 2 cents...

bertolt 2010-06-24 18:18

Re: N900 Video focus and led light, python script
 
what am i doing wrong? every time i start capturing video, the LED light turns off. doesn't the remember LED suppose to keep the LED on?

2 ways i can make the LED light useful is when i turn it on while recording, which kinda waste some darkened recordings, or i turn on the LED then the rem.led., i half press the camera button until the LED turns off. then i fully press the camera button to start recording and lo and behold, the LED turns on too and i get the result i wanted.

is it suppose to work that way? any feedback is appreciated.

dashti 2010-06-26 20:14

Re: N900 Video focus and led light, python script
 
i removed it :( ...the app is noise me with the menu
waiting for update :(

Raubtier 2010-06-27 08:36

Re: N900 Video focus and led light, python script
 
i have the following problem:

if i manually focus and either place the cam app in the dashboard or dont do anything for a while, the cam goes into standby mode and by doing so the manual focus gets lost, meaning that i have to manually focus again..

is there no way from stopping it from "resetting" when going into standby or is there a way of preventing the cam from going into standby if i am not filming/doing anything?

help would be appreciated, its urgent!

Crogge 2010-07-18 06:15

Re: N900 Video focus and led light, python script
 
I still wait for the next update which adds hopefully a option to disable the proximity sensor, its really annoying that it always activate the manual focus bar when the light changes a bit.

Kechit 2010-07-27 20:10

Re: N900 Video focus and led light, python script
 
The video recording crashed several times.... had to uninstall the app...:(...Waiting for the update

jd4200 2010-08-03 02:37

Re: N900 Video focus and led light, python script
 
How does this application disable the red LED light?

Surely it is possible to set it as a default option natively (in the kernel, config file?).
I have no use for this 'application' besides disabling the record light, so is there anyway to just disable it.

hschmitt 2010-08-04 14:54

Re: N900 Video focus and led light, python script
 
Is this project still alive? The package in Extras-testing is unlocked for 4 weeks and does not get rejected or promoted.


All times are GMT. The time now is 00:06.

vBulletin® Version 3.8.8