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)

m2cm2c 2010-03-06 01:23

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

Originally Posted by sophocha (Post 557473)
IMPORTANT!

My camera lense makes a weird 'click' noise when I use the script and when the camera goes into or out of standby!....don`t want to destroy anything, but is that common?It only does it when I use the script

try this, hold the camera key and make it autofocus, then close the lens cover, the same sound comes from the lens, I think its only the lens resetting its position to default when it goes idle.

Rapparee 2010-03-06 19:18

Re: N900 Video focus and led light, python script
 
Is there a way to mute the Camera shutter sound?

m2cm2c 2010-03-07 03:55

Re: N900 Video focus and led light, python script
 
lfocus_0.307-1
a widget that will make you control the led and the focus from the touchscreen is added
*note, you don't need to turn on the keyboard script to use the widget

Crogge 2010-03-07 04:34

Re: N900 Video focus and led light, python script
 
Now that looks like a nice script, can't wait to see it as app :)

michael196 2010-03-07 09:36

Re: N900 Video focus and led light, python script
 
wow its very nice as a widget, its just great to see how this script evolves day by day!
Great job, keep it up!
(btw, if you want to start up a site or need hosting, just contact me, ill set you up with one, for free of course!)

carlit0x 2010-03-07 10:28

Re: N900 Video focus and led light, python script
 
can you make some easy install instructions to test it please? im not an advanced linux user :( not even normal :o

fw190 2010-03-07 11:23

Re: N900 Video focus and led light, python script
 
If we have the icon in the status bar menu do we need the ico in the apps menu anymore?

m2cm2c 2010-03-07 17:24

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

Originally Posted by carlit0x (Post 558570)
can you make some easy install instructions to test it please? im not an advanced linux user :( not even normal :o

open up this thread from your phone and download the latest
package and remember where you saved the package to

open up your file manager and open up the package from there and you'll start the installation process.

Quote:

Originally Posted by fw190 (Post 558617)
If we have the icon in the status bar menu do we need the ico in the apps menu anymore?

the widget is to control the camera from the touch screen for now.
but to use the keyboard shortcuts you still need to open up the icon in the apps menu.

I might add an option to toggle the keyboard shortcuts from the widget in the future.

saveas 2010-03-07 17:37

Re: N900 Video focus and led light, python script
 
wow! the script has evolved into an excellent app... congratulations mate!

steve4130 2010-03-07 18:00

Re: N900 Video focus and led light, python script
 
Thanks m2cm2c. Excellent app, it really is! The only negative that I can see is that when you use the onscreen bar to focus it greys out the main image (as menu's do) making it harder to see when the image is actually in focus. I'd imagine this is a limitation of pop up menus in maemo 5 though is it? Not that its a big problem for me though because I prefer to use the volume buttons to focus anyway :)

carlit0x 2010-03-07 19:17

Re: N900 Video focus and led light, python script
 
Thanks for install instructions m2cm2c! lol! y tought it was a package to install trough xterminal blablabla.... but it was so easy :) i like this app too much, it just miss autofocus and it will be best app ever for n900 :P gogogo :)

michael196 2010-03-07 20:02

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

Originally Posted by carlit0x (Post 558988)
Thanks for install instructions m2cm2c! lol! y tought it was a package to install trough xterminal blablabla.... but it was so easy :) i like this app too much, it just miss autofocus and it will be best app ever for n900 :P gogogo :)

I agree :)

dashti 2010-03-07 22:47

Re: N900 Video focus and led light, python script
 
thanks niicee
but i have to start recording then press switch off red light

m2cm2c 2010-03-08 00:48

Re: N900 Video focus and led light, python script
 
lfocus_0.308-1
I've merged the keyboard script and got rid of the application menu shortcut.
read the information at the beginning of the thread for more information.

Crogge 2010-03-08 01:16

Re: N900 Video focus and led light, python script
 
I'm using lfocus_0.308-1 and really like it so far. It was installed in a second and worked flawlessly from the first moment, the manual focus is a great feature and in my opinion the bright LED light is also very useful.

What I dont like so much is that fact that it gets hidden if you got quite a few other status app's, it would be useful to have it at the top but that's no real issue once its enabled. Another problem is that the focus goes nuts when you try to use the app in the normal photo mode, it sounds not healthy at all and should be disable or the auto-focus on the camera disabled to use it also for photos (That would be awesome).

So far I found only one bug, when you enable the keyboard control then it will disable the vibration reaction of the screen. So when you tap the screen it doesn't vibrate anymore even if you enable and disable it in the menu. Once you disable the keyboard control it works fine again. I haven't tested yet if other functions of the phone are also affected.

Keep up your good work, i really miss more app's like this one on the N900!

m2cm2c 2010-03-08 01:33

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

Originally Posted by Crogge (Post 559324)
I'm using lfocus_0.308-1 and really like it so far. It was installed in a second and worked flawlessly from the first moment, the manual focus is a great feature and in my opinion the bright LED light is also very useful.

What I dont like so much is that fact that it gets hidden if you got quite a few other status app's, it would be useful to have it at the top but that's no real issue once its enabled. Another problem is that the focus goes nuts when you try to use the app in the normal photo mode, it sounds not healthy at all and should be disable or the auto-focus disabled.

So far I found only one bug, when you enable the keyboard control then it will disable the vibration reaction of the screen. So when you tap the screen it doesn't vibrate anymore even if you enable and disable it in the menu. Once you disable the keyboard control it works fine again. I haven't tested yet if other functions of the phone are also affected.

Keep up your good work, i really miss more app's like this one on the N900!


thanks for the information.
for the normal photo mode you can bypass the auto focus by pressing the camera button with a full push instead of a half push waiting for it to autofocus, I got really cool macro pictures with the normal mode.

and for the positioning of the icon of the widget I'll see what can be done there.

as for the disappearing vibration, I've done that on purpose when you toggle the keyboard on since theres a bug in the maemo-xinput-sounds when you adjust the keyboard binding and the fix for that bug will be available in the next firmware update, so you'll have to turn the keyboard off for the vibration to work again.

sajidc 2010-03-08 12:31

Re: N900 Video focus and led light, python script
 
I downloaded the latest version (0.308-1) but when I click on it in file manager, nothing happens.

The file manager details recognises it's type as a debian package though. Anyone have any suggestions where I go from here to get it installed?

di1in 2010-03-08 12:45

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

Originally Posted by sajidc (Post 559787)
I downloaded the latest version (0.308-1) but when I click on it in file manager, nothing happens.

The file manager details recognises it's type as a debian package though. Anyone have any suggestions where I go from here to get it installed?

open xterm and type: (u will need to have installed rootsh)
sudo gainroot

go to the folder location through xtern using 'cd'.

once you get to the containing folder type:
dpkg -i lfocus
and press tab on-screen to complete the file name. hit enter to install.

sophocha 2010-03-08 12:59

Re: N900 Video focus and led light, python script
 
Why does it grey out the video when the focus bar is at the bottom?I cannot see a thing!ehehe

Hoshiro 2010-03-08 14:38

Re: N900 Video focus and led light, python script
 
thanks for the script! it works really sweet!
keep up the good work!!!

tomaszf 2010-03-08 15:10

Re: N900 Video focus and led light, python script
 
Really interesting app. Good work.
It's particulary useful in situations when autofocus is not able to gain focus, although it should be possible. Happened to me few times. I try to take picture, autofocus kicks in, picture is clear for a moment, but in the end it's blurry.

@m2cm2c Would it be possible for you to show widget in status menu only when camera app is running (like Flashlight does) ?

di1in 2010-03-08 15:16

Re: N900 Video focus and led light, python script
 
If you try to change the focus of the camera while the shutter is closed, a jarring sound comes from the lens assembly.

could the script be updated so that the options of lfocus only shows up if the camera is active?

radiosw 2010-03-08 16:23

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

Originally Posted by m2cm2c (Post 558893)
open up this thread from your phone and download the latest
package and remember where you saved the package to

open up your file manager and open up the package from there and you'll start the installation process.



the widget is to control the camera from the touch screen for now.
but to use the keyboard shortcuts you still need to open up the icon in the apps menu.

I might add an option to toggle the keyboard shortcuts from the widget in the future.

Am I doing some thing wrong? I have downloaded it, found it using file manager then can't open it? Please help as have followed this and think this is a great demonstration of the brilliance of the open source that is the n900 and maemo!

m2cm2c 2010-03-08 16:42

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

Originally Posted by radiosw (Post 560139)
Am I doing some thing wrong? I have downloaded it, found it using file manager then can't open it? Please help as have followed this and think this is a great demonstration of the brilliance of the open source that is the n900 and maemo!

I'm not sure why this is happening, the installation runs fine on my phone, does this happen with all the packages or only the latest one ?

for now try to follow these steps please:

Quote:

Originally Posted by di1in (Post 559805)
open xterm and type: (u will need to have installed rootsh)
sudo gainroot

go to the folder location through xtern using 'cd'.

once you get to the containing folder type:
dpkg -i lfocus
and press tab on-screen to complete the file name. hit enter to install.


Crogge 2010-03-08 19:48

Re: N900 Video focus and led light, python script
 
I noticed another bug today, when you enable and disable the keyboard feature often then it is possible that the keyboard layout stucks in the US one. I got a N900 with a German QWERTZ keyboard and noticed that it get set to QWERTY when I enable the plugin.

That is actually no big deal but it gets annoying when the keyboard stays as US one, disabling the app doesn't helps then. The only way to solve it is to set the keyboard to a different language and back to the original one again.


@Radiosw: So far the issues which I saw in this topic are totally normal for alpha / beta software, if you dont like it then wait a while till there will be a stable release.

m2cm2c 2010-03-08 19:53

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

Originally Posted by Crogge (Post 560382)
I noticed another bug today, when you enable and disable the keyboard feature often then it is possible that the keyboard layout stucks in the US one. I got a N900 with a German QWERTZ keyboard and noticed that it get set to QWERTY when I enable the plugin.

That is actually no big deal but it gets annoying when the keyboard stays as US one, disabling the app doesn't helps then. The only way to solve it is to set the keyboard to a different language and back to the original one again.

hey :D
I really appreciate your input man, I'll see what I can do about your problem, also I'm working on removing the icons when the camera cover is closed, and "maybe" a way to disable auto focus :)

boss007 2010-03-08 20:43

Re: N900 Video focus and led light, python script
 
guys, im new in N900, can anyone tell me how to install this script, step by step please, and how to start, it would be apprecciated to help me with this issue, cause i didnt understand how to install it, thankd

That One Guy 2010-03-08 20:48

Re: N900 Video focus and led light, python script
 
Seems to work well. I'll probably forget about it when I will actually have a need for it. But it's installed and staying so. Thank you.

michael196 2010-03-08 21:04

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

Originally Posted by boss007 (Post 560450)
guys, im new in N900, can anyone tell me how to install this script, step by step please, and how to start, it would be apprecciated to help me with this issue, cause i didnt understand how to install it, thankd

Could you please tell us what is your firmware version?

phuongymy 2010-03-08 21:24

Re: N900 Video focus and led light, python script
 
are you going to make this as a status bar widget? im not good with this scrip and command line stuff. im all new to this. So when can we expect a status bar widget or some sort of a widget?

radiosw 2010-03-08 21:45

Re: N900 Video focus and led light, python script
 
thanks for the time taken guys i have gone thru loading it via xterm then it doesn't seem to be there so I think it is because i am awaiting the uk firmware update. Loving the support on this community I am starting to learn !!

That One Guy 2010-03-08 21:54

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

Originally Posted by phuongymy (Post 560493)
are you going to make this as a status bar widget? im not good with this scrip and command line stuff. im all new to this. So when can we expect a status bar widget or some sort of a widget?

Ah, yes. Because learning a few basic commands is just so damned hard.

And there IS a front end for this script. I think you would call it an application. Reading a whole thread before posting... again, learn a little before you let your fingers do the typing.

/grumpy

maxximuscool 2010-03-09 00:52

Re: N900 Video focus and led light, python script
 
I found a bug with the Keyboard focusing. When you press on the keyboard it won't focus but it will if you hold it. But when you let the key go the focus is still going. Impossible to get the focus right. Also widget applet is unusable to focusing. Why? because You cant see how the focus work on screen. Everything is greyout.. Is not there a way to disable the greyarea when the widget is loaded? So we can see how the video focusing works? I think focus using button is much better. So please create or change to button focus widget instead.

m2cm2c 2010-03-09 01:35

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

Originally Posted by maxximuscool (Post 560673)
I found a bug with the Keyboard focusing. When you press on the keyboard it won't focus but it will if you hold it. But when you let the key go the focus is still going. Impossible to get the focus right. Also widget applet is unusable to focusing. Why? because You cant see how the focus work on screen. Everything is greyout.. Is not there a way to disable the greyarea when the widget is loaded? So we can see how the video focusing works? I think focus using button is much better. So please create or change to button focus widget instead.

Yow!,

the first issue you mentioned seems to me like your phone can't handle the commands given to change the focus, this means:
either you have high cpu load, like too many applications opened or an application is hogging the cpu.
or there could be many instances of the keyboard script open, to fix that type this in the terminal:
sudo lfocus stop

as for the focus bar, I'm with you on that, if I can't find a way to get rid of the blur from the window manager, I could just get rid of it in the future. I'm still researching :D
I'm also open to any opinions about the coding. thanks!

maxximuscool 2010-03-09 01:54

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

Originally Posted by m2cm2c (Post 560699)
Yow!,

the first issue you mentioned seems to me like your phone can't handle the commands given to change the focus, this means:
either you have high cpu load, like too many applications opened or an application is hogging the cpu.
or there could be many instances of the keyboard script open, to fix that type this in the terminal:
sudo lfocus stop

as for the focus bar, I'm with you on that, if I can't find a way to get rid of the blur from the window manager, I could just get rid of it in the future. I'm still researching :D
I'm also open to any opinions about the coding. thanks!

Nop i'm not using any application on my device only recording. The previous version is sweet but no applet. This version is seem to be a bit delay. My device is freshly reflashed.

m2cm2c 2010-03-09 01:58

Re: N900 Video focus and led light, python script
 
lfocus_0.309-1
The widget now only shows up when you open the camera cover!
the keyboard toggle now disables autofocus.

cipper 2010-03-09 19:30

Re: N900 Video focus and led light, python script
 
great! just what I looked for: disabling the red-led while recording videos.
It would be more useful to have a button that turns off the red-led, instead of the autofocus button (why would I turn off the AF?)

Crogge 2010-03-09 21:18

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

Originally Posted by m2cm2c (Post 560717)
lfocus_0.309-1
The widget now only shows up when you open the camera cover!
the keyboard toggle now disables autofocus.

Nice changes, works so far fine :)

maxximuscool 2010-03-09 21:27

Re: N900 Video focus and led light, python script
 
I found more bug.. M2CM2C

Please fix this:

The applet slide bar is way off the bottom of the screen to use efficiently, the LED button mode doesn't tell you which button/function has been seleted.

When you scrolling the bar and hold it at a certain point, the bar just scrolling itself to the end and repeat again to go automatically move to the beginning.

I tried last night and it was very annoying that the bar doesn't seem to response to my touch position.

Everytime the applet is opened, the camera frame rate dropped!

If the keyboard is set to "ON" the camera unit will crash and will not do automatic focusing, when pressed capture button, it crashed. So disable the keyboard focus when the camera lense is closed would be the best efficient way.

m2cm2c 2010-03-09 22:41

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

Originally Posted by cipper (Post 561622)
great! just what I looked for: disabling the red-led while recording videos.
It would be more useful to have a button that turns off the red-led, instead of the autofocus button (why would I turn off the AF?)

hey :)

I'm happy you found the script usefull, I've made it turn autofocus off only when you press the keyboard on button you can turn it back on when you turn the keyboard off, this helps you get the focus you've set to take pictures or videos instead of the autofocus messing up your focus. you can turn off the red led either from the keyboard or the buttons, please read the first post on this thread for more info.


Quote:

Originally Posted by maxximuscool (Post 561793)
I found more bug.. M2CM2C

Please fix this:

The applet slide bar is way off the bottom of the screen to use efficiently, the LED button mode doesn't tell you which button/function has been seleted.

When you scrolling the bar and hold it at a certain point, the bar just scrolling itself to the end and repeat again to go automatically move to the beginning.

I tried last night and it was very annoying that the bar doesn't seem to response to my touch position.

Everytime the applet is opened, the camera frame rate dropped!

If the keyboard is set to "ON" the camera unit will crash and will not do automatic focusing, when pressed capture button, it crashed. So disable the keyboard focus when the camera lense is closed would be the best efficient way.


hello there :)
I've set the bar so far at the bottom so you'll be able to see the picture, but due to the dimming happening in the background I might fully remove the slide bar. as for the LEDs, it is written on the buttons which LED function you're selecting, I don't know if you have customized fonts or not I think that could be the problem.
as for how to use the scroll bar, please read the instructions at the first post on how to use it, I've just tested the slide bar on my phone and it moves smoothly when I drag it with my finger I don't really know why it isn't responding to you when you drag it, as I said I might remove it completely.

and for the framerate drop I think this could be related to the slider not responding due to high cpu usage of some application, if you can run htop and see which application is consuming the highest cpu usage maybe you can tell me if it is the widget or not.

In htop you should see, only 1 lfocus.py and 1 stop_focus.py, if you have more than one instance open from these scripts when the lens cover is closed, please run the following in the terminal:
sudo lfocus stop
sudo lfocus stop_stop_focus

the keyboard on button automatically disables autofocus by default. I'm sorry but I don't understand what you mean by the camera unit, do you mean the camera application or the camera autofocus ?

they keyboard focus is set to automatically disable when you close the lens cover.

also make sure you have the latest package installed, if you do, try uninstalling it and reinstalling it again and run the commands I've given you at the top.

please tell me if the information I've provided is enough or not, and tell me about that htop cpu usage :D


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

vBulletin® Version 3.8.8