webOS Nation Forums
> webOS apps and software
> webOS developer forums
> Vertigo Studios
>
My Flashlight
1 2 3
4 5 6 7 8 13
...
Last
Member:
wli224
at: 06:50 PM 06/21/2009
PreGame, great work! How did you end up finding the shell commands to turn on the light?
Originally Posted by wli224:
PreGame, great work! How did you end up finding the shell commands to turn on the light?
It's on the wiki page called torch-flash. Good work PreGame.
Member:
Eguy
at: 08:11 PM 06/21/2009
Edit: Nevermind, I fixed it.
Great app PreGame(Brian)!!! Score another one for webOS hacking!
Pre Developer:
PreGame
at: 08:59 PM 06/21/2009
I updated it icon with the flashlight. THanks!
Member:
Eguy
at: 01:37 AM 06/22/2009
Ok, now I have a problem. When I reboot out of dev mode, the app stops working. Does it need to be rooted to work?
Originally Posted by Eguy:
Ok, now I have a problem. When I reboot out of dev mode, the app stops working. Does it need to be rooted to work?
No, read my post a couple posts back. You just have to go back and restart the service and it'll start working again.
Member:
Eguy
at: 02:30 AM 06/22/2009
Originally Posted by backslide:
No, read my post a couple posts back. You just have to go back and restart the service and it'll start working again.
Yes but it still has to be rooted to get back in. If you reboot to get out of dev mode you can't get back in to restart the service. The service has to be set to startup automatically.
PreGame, could you release the code for the java class file? Is it possible for the serviceRequest to palm://com.pregame.prelease return something like an exit code?
Member:
dimfeld
at: 03:14 AM 06/22/2009
Originally Posted by electrofreak66:
PreGame, could you release the code for the java class file? Is it possible for the serviceRequest to palm://com.pregame.prelease return something like an exit code?
Hopefully PreGame won't mind me saying this, but you can just run it through a Java decompiler. I like JD-Gui. Obviously you don't get source comments, but it produces surprisingly readable code. Nice for looking into Palm's Java classes too.
Member:
jack87
at: 03:35 AM 06/22/2009
so i got it running very cool! so here is the question.. when i reboot the pre will i have to run
[CODE]
chmod 744 /usr/palm/applications/com.pregame.app.flashlight/app/scripts/lighton.sh
and
chmod 744 /usr/palm/applications/com.pregame.app.flashlight/app/scripts/lightoff.sh
[/CODE]
again so the switch works?
Member:
dimfeld
at: 03:47 AM 06/22/2009
Jack87: No, the chmod command will be permanent. You only have to do it once.
Member:
Eguy
at: 03:54 AM 06/22/2009
You have to restart the service when you reboot but the Pre still has to be rooted.
Member:
jack87
at: 03:57 AM 06/22/2009
so far everytime i reboot i have to run all the commands listed in the readme again on my pc otherwise my switch isnt working. is there something i am doing wrong by chance?
flahslight works great but i have confirmed that everytime i reboot my pre i have to enter the fallowing commands
Originally Posted by :
/usr/bin/luna-helper 'luna://com.palm.vm/launch' '{"serviceName":"com.pregame.prelease","className":"com.pregame.Prelease"}'
luna-send -n 1 palm://com.palm.applicationManager/rescan {}
otherwise the switch isnt working
Pre Developer:
PreGame
at: 11:41 AM 06/22/2009
Ok, thanks for the feed back. I will take a look to see what I can do.
Member:
pEEf
at: 12:45 PM 06/22/2009
Originally Posted by PreGame:
Battery life is unknown. I am currently working on getting this done with an IPKG so it will install automatically.
I just did some research about this. I concluded that Palm is using the Luxeon Flash LED after looking at available products. There is a PDF application note at:
http://www.philipslumileds.com/pdfs/DR01.PDF
Also: According to this, the maximum steady state you can safely run the LED at with typical thermal treatment is 150ma. We are under that here, so we could actually drive it harder. The Pre's hardware will let you drive it at 200ma steady-state, and 400ma or 500ma for a quarter of a second. (flash mode) Maybe Palm did a better thermal treatment and tested the LED to be steady-state capable at 200ma? This is an assumption, so it's probably best to keep it at 150ma or below.
Well, if we are running the LED at 100ma in Pregame's app, and the Pre's battery is 1150mah, we can make some rough assumptions:
According to the Datasheet The LED's forward voltage at 100ma is probably around 3.2v. That puts it at roughly 1/3 watt.
The Pre's battery contains almost 4 watt-hours of usable energy, but the battery protection system probably prevents you from using that last 1/2 watt-hour or so.
This means if you run the flashlight for an hour total you will have used 10% of the battery. Not too bad!
If we make a flashlight app that has an adjustable brightness slider, then we can choose the right level for the task and use the battery more efficiently.
The power levels we have available are:
50ma, 75ma, 100ma, 150ma, and maybe even 200ma if we limit usage.
Engineering calculations applied to the various levels result in:
50ma: 20 hours of runtime, or 5% for 1 hour.
75ma: 14 hours of runtime, or 7% for 1 hour.
100ma: 10 hours of runtime, or 10% for 1 hour.
150ma: 6 hours of runtime, or 16% for 1 hour.
200ma: 4 hours of runtime, or 25% for 1 hour. (
but probably a BAD idea!)
It's also possible to make a "strobe mode" that is 250ms on every second. Would be useful for dazzling a potential attacker or something.
Pretty cool!
Note: I have updated the wiki with this information:
Pre dev Wiki: torch-flash
Pre Developer:
PreGame
at: 01:16 PM 06/22/2009
Thank you for that post. I will update the application when I have time to allow the user to select the mA as well as select a mode such as strobe or steady flashlight.
Member:
sacherjj
at: 02:15 PM 06/22/2009
I have a tactical flashlight that uses around 10-15 Hz strobe to disorient. It works very well. My default mode is low, with one button tap for strobe. This is great for the first and second settings for my at night flashlight for home defense.
For the strobe to be useful as a distraction, it would need a "hot key" or something to turn on quickly and easily. Although if that mode was used with the camera, it could make for some interesting faces in the pictures.
Member:
sam1am
at: 02:31 PM 06/22/2009
Member:
jack87
at: 03:07 PM 06/22/2009
Originally Posted by PreGame:
Ok, thanks for the feed back. I will take a look to see what I can do.
Thanks pregame!
I noticed after last night i got it going woke up this morning and its not working anymore and the pre has not been rebooted
Originally Posted by PreGame:
Thank you for that post. I will update the application when I have time to allow the user to select the mA as well as select a mode such as strobe or steady flashlight.
Are you able to get this app into non-rooted phones via the e-mail hole exploited by Xorg et. al.?
1 2 3
4 5 6 7 8 13
...
Last
webOS Nation Forums
> webOS apps and software
> webOS developer forums
> Vertigo Studios
>
My Flashlight