Go Back   xda-developers > HTC Raphael: Touch Pro, Fuze > Touch Pro, Fuze Themes and Apps


Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 31st August 2008, 08:54 PM
NetRipper's Avatar
NetRipper NetRipper is offline
Senior Member
 
Join Date: Feb 2006
Location: 's-Gravendeel
Posts: 366
Default [UPDATED 28-04-2009] TorchButton v1.5, using camera LED for flashlight

TorchButton v2.x supports the Leo as well as Raphael and moved to a new thread! Click this link!

On my previous devices (Wizard, Hermes) I found it very useful to have the camera LED function as flashlight. However, all those tools that were previously available to enable the LED didn't seem to work on the Raphael.

I've just spent some time debugging and testing and got it to work on my Raphael. The cab to install is attached to this post. It'll create a shortcut in your programs menu.

Usage is currently twofold. When you start the app, the flashlight turns on. When you don't do anything for 60 secs it will turn off automatically to prevent your led from burning (heard it happen before on other devices). If you start the program again within the 60 seconds, it will manually turn the flashlight off.

I've only tested this on my Raphael so far. Please let me know if it works for everyone.

---------------

Supported modes:
TorchButton has 5 modes so far. Each one explained in short:

Normal
Simply enable the flashlight until the application is started again or the configurable timeout occurs (60 seconds by default). This mode can be used for a prolonged period. I have only tested it up to 5 minutes though.

Bright
The Bright mode is exactly the same as the Normal mode, with the only difference being that the LED is more bright. This mode is equal to the short moment when you make a photo with flashlight on. Note that this mode does stress the LED and should not be used for prolonged periods. I have used this up to a minute without problems.

Blink
The Blink mode turns the LED on and off in specific intervals that you can configure in the registry. An example of usage is the bike light.

SOS
This is extensive mode that supports sending custom morse code. The text to be sent via morse code signals can be configured in the registry. This defaults to "sos ", thus the SOS name for this mode. NOTE that the flashlight timeout does NOT interrupt a text. It checks if the timeout occurred when it starts over again and quits when it reached the timeout.

PTT
The Push-To-Torch mode. When your device has a key you can map to 'hold', you can use this feature to keep the light on as long as the key is pressed. The AT&T Fuze is one of those devices with a PTT button.

---------------

UPDATE 01-09-2008 v1.1:
TorchButton v1.1 now includes the ability to override the default timeout from 30 seconds to anywhere between 0 and 300 (= 5 minutes) seconds. The regkey is HKLM\Software\TorchButton\FlashlightTimeout (DWORD). When the application installs or when it starts for the first time it will create the registry setting if it doesn't exist yet.

UPDATE 09-11-2008 v1.2:
Finally a new version of TorchButton.
* Enlarged maximum timeout override from 300 seconds to 86400 seconds (a day).
* Added 'bright' feature. Note that the light may flicker almost unnoticeable every 750ms. Can't prevent that.
* For Devs: attached source code of TorchButton to this post.
* For Devs: I've created a C# library for easy control of the camera led. Also attached to this post. The .zip contains a readme which has examples on how to use it.

UPDATE 14-11-2008 v1.3:
* Added 'blink' feature. Registry configuration options:
- blinkTimeOnInMs (DWORD), default 500. Configures the time the LED is on.
- blinkTimeOffInMs (DWORD), default 500. Configures the time the LED is off.
* Added 'SOS' feature. More like a 'morse code' feature though. You can set any morse code to be signalled in the registry. Options:
- [S]sosCode (SZ), default " ...---...". Configures the morse code to signal.[/S]
- [S]sosDotTimeoutInMs (DWORD), default 200. Configures 200ms LED on, and 200ms LED off for ".".[/S]
- [S]sosDashTimeoutInMs (DWORD), default 400. Configures 400ms LED on, and 400ms LED off for "-".[/S]
- [S]sosSpaceTimeoutInMs (DWORD), default 1000. Configures 1000ms pause when processing space " ".[/S]
* New shortcuts are added for those features.
* Shortcuts are moved to a TorchButton folder within the Programs, for grouping purposes (in case you're wondering where TorchButton went!).

UPDATE 29-11-2008 v1.4:
* Fixed 'sos' mode. It now properly uses a single configurable unit time to calculateother intervals.
* Updated 'sos' mode. You can now configure a text to be sent via morse code in the registry. Check configuration part of the readme for more info.
* Removed old 'sos' registry settings and replaced them with new ones.
- Check out the new configuration settings in the readme.txt (attached to this post).
* Increased default flashlight timeout from 30 to 60 seconds.
* Changed default 'blink' time to 250ms for both on and off.

UPDATE 28-04-2009 v1.5:
* Added Push-To-Torch (PTT) mode. Probably only useful for devices that have the PTT button, such as the AT&T Fuze.
* Added brightResetTimeInMs registry setting for owners of the Alltel Touch Pro. They need to set this value to 100 for bright mode to work properly.

---------------

TODO's:
* Change LCD brightness to minimum when application starts, and restore when exists.
* Prevent standby mode while active

---------------

Developers:
The source code has been attached as well. The app has been written in C/CPP using VS2008. The code doesn't deserve a beauty-price, but it does its job. The 'TorchButtonBright' project is just a wrapper that calls TorchButton.exe with the /bright parameter. This is a workaround to be able to deploy two shortcuts with different icons and a parameter. If anyone decides to use this code, please rename the project. I've also written a C# library that allows easy access to the normal and bright flashlight modes. Attached as well.

---------------

TorchButton v2.x supports the Leo as well as Raphael and moved to a new thread! Click this link!
Attached Files
File Type: zip TorchButtonLib_csharp_v1.0.zip (6.9 KB, 2349 views)
File Type: cab TorchButton_v1.5.cab (59.9 KB, 9990 views)
File Type: zip TorchButton_v1.5_src.zip (137.0 KB, 1472 views)
File Type: txt TorchButton_v1.5_readme.txt (6.3 KB, 2381 views)

Last edited by NetRipper; 9th January 2010 at 11:40 PM.. Reason: redirect to v2 torchbutton
Reply With Quote
Sponsored Links

  #2  
Old 31st August 2008, 09:13 PM
jakubd jakubd is offline
Senior Member
 
Join Date: Jul 2005
Location: Warsaw
Posts: 361
Default

Works beautifully with stock HTC ROM provided with Raphael released in Europe. One small request: can you provide also an option to change the timeout? For starters - in registry. Some people would like it to work only for 10s, others: for 60s. Others might have the fun of burning it out [anyway you can limit it to max 2 minutes just to protect those less-aware.]
__________________
Where do we want you to go today?
Reply With Quote

  #3  
Old 31st August 2008, 09:40 PM
zSpinner zSpinner is offline
Member
 
Join Date: Feb 2007
Posts: 92
Default Tnx

Tnx for your effort. It works great.
__________________
A day not smiled is a day not lived.
Lost In Asia Premium V4.1
Reply With Quote

  #4  
Old 31st August 2008, 10:31 PM
WDawn's Avatar
WDawn WDawn is offline
Senior Member
 
Join Date: May 2006
Location: Zwevegem
Posts: 311
Default

Works like a charm! Thnx!

I second the request for a change in time out. I need to make it from the front door to my bed without waking my gf, and i don't make it in 30 seconds
__________________
HTC Touch Pro
Reply With Quote

  #5  
Old 31st August 2008, 10:33 PM
at10ti0n at10ti0n is offline
Senior Member
 
Join Date: Jan 2007
Posts: 117
Default

works great! Nice job! This will become a standard application on all custom roms
Reply With Quote

  #6  
Old 31st August 2008, 10:45 PM
Vasko Vasko is offline
Member
 
Join Date: Feb 2004
Posts: 58
Default :o)

Thank you NetRipper. This is a 5 Star utility!!!
Reply With Quote

  #7  
Old 31st August 2008, 10:52 PM
da_jojo's Avatar
da_jojo da_jojo is offline
Senior Member
 
Join Date: Nov 2006
Location: Utrecht
Posts: 359
Default

HALLELUJAH !

thank you a million times !

make that trillion
__________________
If something sucks , it better be your girl

-MDA Vario IPL/SPL: 2.26 WWE GSM: 02.71.11 prodigy t-mobile nl OS: some wm6.5
-HTC Touch Pro SPL: 1.9 koekie GSM: Radio_Signed_Raphael_CRC_52.58.25.30H_1.11.25.01.n b OS: 5.2.28005 WM6.5 energy custom
-PC: Windows 7 Ultimate and custom XP Pro
-Koekies: Super de Boer krakelingen
Reply With Quote

  #8  
Old 31st August 2008, 11:19 PM
NetRipper's Avatar
NetRipper NetRipper is offline
Senior Member
 
Join Date: Feb 2006
Location: 's-Gravendeel
Posts: 366
Default

Thanks for all the great responses and I'm glad it works for everyone. I'll add that feature to change the hardcoded 30 seconds timeout tomorrow or the day after.
Reply With Quote

  #9  
Old 31st August 2008, 11:28 PM
da_jojo's Avatar
da_jojo da_jojo is offline
Senior Member
 
Join Date: Nov 2006
Location: Utrecht
Posts: 359
Default

the flashlight has a normal condition and a very bright condition. would it be possible to make a dimmer on the flashlight so that for example one can attach it to the volume buttons on the side ?
__________________
If something sucks , it better be your girl

-MDA Vario IPL/SPL: 2.26 WWE GSM: 02.71.11 prodigy t-mobile nl OS: some wm6.5
-HTC Touch Pro SPL: 1.9 koekie GSM: Radio_Signed_Raphael_CRC_52.58.25.30H_1.11.25.01.n b OS: 5.2.28005 WM6.5 energy custom
-PC: Windows 7 Ultimate and custom XP Pro
-Koekies: Super de Boer krakelingen
Reply With Quote

  #10  
Old 31st August 2008, 11:38 PM
Jiggs1337 Jiggs1337 is offline
Senior Member
 
Join Date: Aug 2008
Posts: 113
Default

Thank you . I have it as part of favourite programs in TF3D . Works great.
__________________
HTC Touch Pro
Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:43 PM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.