maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] Lanterne - an all-purpose flashlight app (https://talk.maemo.org/showthread.php?t=90229)

pichlo 2014-04-08 05:55

Re: [Announce] Lanterne - an all-purpose flashlight app
 
Quote:

Originally Posted by nokiabot (Post 1420338)
one more feature that can be optionaly added to lalterne can be quick double tap to turn off backlight and turning troch on and off by toching the centere area of the screen.
let others comment what they think:)

That actually sounds rather useful. Espexcially in combination with the red LED. Night vision completely unaffected.

Copernicus 2014-04-08 10:26

Re: [Announce] Lanterne - an all-purpose flashlight app
 
Quote:

Originally Posted by nokiabot (Post 1420338)
one more feature that can be optionaly added to lalterne can be quick double tap to turn off backlight and turning troch on and off by toching the centere area of the screen.

I will take another look at controlling the backlight. :) (It was backlight control that got me crossed up before in Lanterne, though, so I'm a little nervous about starting that up again...)

nokiabot 2014-04-08 10:44

Re: [Announce] Lanterne - an all-purpose flashlight app
 
Quote:

Originally Posted by Copernicus (Post 1420376)
I will take another look at controlling the backlight. :) (It was backlight control that got me crossed up before in Lanterne, though, so I'm a little nervous about starting that up again...)

ok also include a popup info about the new feature with a image describing it first time and if it goes all ok and people appreciate it:) i will make another nonsence request to celebrate it:D

xes 2014-04-09 10:58

Re: [Announce] Lanterne - an all-purpose flashlight app
 
Just one suggestion...
Adding some command line option to access the lanterne functions (strobe, ambient light + torch would allow some funny integration into other apps or scripting)

Estel 2014-04-09 11:36

Re: [Announce] Lanterne - an all-purpose flashlight app
 
Big "yay" for GUI-less command line possibilities.

sixwheeledbeast 2014-04-09 14:28

Re: [Announce] Lanterne - an all-purpose flashlight app
 
Surely you can start the torch via CLI without Lanterne anyway?

Estel 2014-04-10 00:21

Re: [Announce] Lanterne - an all-purpose flashlight app
 
...which can't be said about morse parsing, and, after all, why to reinvent the wheel for other things (like, write manual scripts for strobe, etc), if Lanterne already did that? It would just need to expose it for CLI, and everyone is happy :)

/Estel

Copernicus 2014-04-10 04:42

Re: [Announce] Lanterne - an all-purpose flashlight app
 
Alright, alright. :) I've been meaning to add command-line interfaces to my apps for a while now; particularly, Pierogi would be nice to do, but it would require an awfully complex CLI interface. Lanterne is much much simpler. Unfortunately, there's a fairly significant stumbling block: Qt does not at all like to create a single executable with both GUI and CLI interfaces. There are various explanations for this, but they all eventually seem to boil down to the fact that a GUI app has an enormous amount of baggage that is completely unnecessary in a command-line app. (For obvious reasons!) And so, they really don't make it easy for you to house both UIs in one program.

So, I gave up. Instead, please check out the brand new app, Torchio. This is a console-only Qt app, containing a subset of the existing Lanterne functionality. It supports sustained, pulsed, and SOS mode use of the LEDs, both white and red. Also, you can set a timeout, and you can tell it to ignore the camera cover. (Run "torchio -h" to see all the currently available options.)

By default, Torchio will start running the LEDs the moment that you run it, and will continue to do so until the timer runs out (at which point it will quit) or you kill the app. Torchio will exit cleanly if you stop it with a SIGINT (via control-c or whatever), but I should warn that if it dies without cleaning up (say, from a SIGKILL signal or whatever), the LED hardware can get into an odd state. (On my N900, the LEDs would be turned off after the app was killed, but they would immediately turn on whenever any LED-aware app was started up -- Torchio, Lanterne, the camera app, etc.) So beware! :)

Estel 2014-04-10 15:43

Re: [Announce] Lanterne - an all-purpose flashlight app
 
Morse parser incoming soon for CLI, I hope :) Thanks, anyway!

Copernicus 2014-04-10 15:49

Re: [Announce] Lanterne - an all-purpose flashlight app
 
Quote:

Originally Posted by Estel (Post 1420710)
Morse parser incoming soon for CLI, I hope :) Thanks, anyway!

Torchio has all the underlying support for Morse that Lanterne does, but I'm not 100% sure how to fashion a CLI interface for it. I suppose it'd be easy enough to read data from a text file; but it might be more useful to allow the user direct interaction from the keyboard... Maybe even some sort of API to allow data to be piped in from another process?

I guess I really should ask, what kind of use-cases for Morse parsing are you most interested in? :)

pichlo 2014-04-10 16:56

Re: [Announce] Lanterne - an all-purpose flashlight app
 
Quote:

Originally Posted by Copernicus (Post 1420713)
Torchio has all the underlying support for Morse that Lanterne does, but I'm not 100% sure how to fashion a CLI interface for it.

How about getting an inspiration from tried-and-tested software? :)
Linux 'espeak' comes to mind, for example.

sixwheeledbeast 2014-04-10 17:25

Re: [Announce] Lanterne - an all-purpose flashlight app
 
Quote:

Originally Posted by pichlo (Post 1420722)
'espeak' comes to mind, for example.

I agree

Code:

torchio 'hello world'

pichlo 2014-04-10 19:49

Re: [Announce] Lanterne - an all-purpose flashlight app
 
Admittedly there is a teeny-weeny difference: espeak's primary purpose is to interpret the string. As is echo's, which has a similar syntax. Perhaps not so much for torchio, but I think we can overlook that :) Or, if we want to be really fussy, we can use use something like torchio -m "hello world" (-m for Morse, or some other switch if -m is already used (sorry, haven't tried it yet)).

Estel 2014-04-10 20:13

Re: [Announce] Lanterne - an all-purpose flashlight app
 
...where argument for "m" would be either string to send, or file to parse and send. But, frankly, it would be goot enough to also allow continuous morse'ing content from other thing's stdout, and a icing on the top would be a keyboard-interactive code, where, message is transferred as soon as we push keyboard buttons (if we write faster than it sends, then, it would flash till it send everything or gets interrupted by ctrl-c etc.)

Could be something like -m -i (interactive)

/Estel

Copernicus 2014-04-10 22:00

Re: [Announce] Lanterne - an all-purpose flashlight app
 
Ok, it looks like I've got a working implementation of Morse code in Torchio now. I've got it either reading from a file or from the STDIN stream. I'll put more details into the Torchio thread.

(And, man, espeak on the N900 really is fun to play around with. :) )

chill 2014-04-10 23:16

Re: [Announce] Lanterne - an all-purpose flashlight app
 
Quote:

Originally Posted by Copernicus (Post 1420321)
Ok, Lanterne 0.5.11 is now heading up to extras-devel. This is just a minor update, adding the new light sensor to the set of startup options, and tying it into the torch timeout mechanism. (Also, there's a little bit of cleanup of the light sensor's UI.) Still not sure if this is a usable feature, but it is kind of fun to see what the ambient light sensor is detecting... :)

I can see how the light sensor is in the startup options (Light Sensor button in the drop down menu), but how is tied to the torch timeout mechanism?

chill 2014-04-10 23:26

Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
 
I agree with sixwheeledbeast for pretty much the same reasons; the camera button is overloaded right now. Not that I mind that the option is there - thankfully, it can be turned off - but I cannot use it and would love to be able to use volume keys instead.

Quote:

Originally Posted by sixwheeledbeast (Post 1348483)
A personally I hope the use of the camera button doesn't come to Lanterne :)

I have all sorts of hacks on this button.

I use shortcutd to have short focus press as lock and long focus press is skip track.
I use vi's cam_focus chmod trick to keep the cam_focus unlocked when the device is locked.
This means I can skip track with the cam key.

Maybe the volume keys like pierogi, up for on down for off and remember that landscape can be opposite (well the volume is).

See below for my personal N900 tweaks page.
http://wiki.maemo.org/User:Sixwheeledbeast/Scripts


Copernicus 2014-04-11 01:17

Re: [Announce] Lanterne - an all-purpose flashlight app
 
Quote:

Originally Posted by chill (Post 1420771)
I can see how the light sensor is in the startup options (Light Sensor button in the drop down menu), but how is tied to the torch timeout mechanism?

Right now, the torch timeout pretty much effects all the Lanterne modes in the same manner; if the light stays on continuously for the specified amount of time, it will be turned off. (And the indicator light will be set to flashing, if that preference is set.)

At least, that's how it has been working for me. :) (For example, set the timeout to 1 minute, set up the light sensor, take the N900 into a dark room, and wait; the light should turn off after a minute. If this isn't working, please let me know!)

It's true, though, that the UI does not make this obvious. :) I need to put some more work into it.

Copernicus 2014-04-11 01:22

Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
 
Quote:

Originally Posted by chill (Post 1420773)
...I cannot use it and would love to be able to use volume keys instead.

Yeah, I pretty much gave up on the camera button last year, once I realized I couldn't do anything with it when the screen backlight was off. I'm not sure why that was; I know that other apps do use it when the screen is dark.

I will try to give the volume rocker switch a try instead; it'd be really nice to trigger the torch ability without turning on the screen. (Especially when using the red LED.)

chill 2014-04-11 02:53

Re: [Announce] Lanterne - an all-purpose flashlight app
 
Quote:

Originally Posted by Copernicus (Post 1420781)
Right now, the torch timeout pretty much effects all the Lanterne modes in the same manner; if the light stays on continuously for the specified amount of time, it will be turned off. (And the indicator light will be set to flashing, if that preference is set.)

At least, that's how it has been working for me. :) (For example, set the timeout to 1 minute, set up the light sensor, take the N900 into a dark room, and wait; the light should turn off after a minute. If this isn't working, please let me know!)

It's true, though, that the UI does not make this obvious. :) I need to put some more work into it.

Hmmm, can you be a little bit more specific (I may be missing something, sorry)? The light turns off when the specified time has elapsed AND the light sensor indicates "darkness"?

Copernicus 2014-04-11 03:08

Re: [Announce] Lanterne - an all-purpose flashlight app
 
Quote:

Originally Posted by chill (Post 1420786)
Hmmm, can you be a little bit more specific (I may be missing something, sorry)? The light turns off when the specified time has elapsed AND the light sensor indicates "darkness"?

Specifically, the light should turn off after X minutes of _continuous_ use. If the light sensor value falls below your specified target level, the LED turns on, and it stays on continuously for the entire timeout period specified in the preferences panel, the light will be shut off.

So, the example I used: I go to the preferences panel, check the "Enable Torch Timer" box, and then set the "Time Torch stays lit" to 1. Then, I exit the preferences panel, switch to the Light Sensor panel, check the "Start torch at specified sensor value" box, and set the "Minimum Sensor Value" to some number that is larger than what the ambient light sensor is reporting. The LED should then turn on. Now, if I wait for one minute, the LED should turn itself off.

(I should note that If the ambient light level should go back above the specified target level, and then drop down again, the LED will turn itself back on...)

chill 2014-04-11 03:37

Re: [Announce] Lanterne - an all-purpose flashlight app
 
I see, thanks for the explanation. The above implies that:

a) the timer is restarted when the room light level goes above the specified, so your 1 minute starts from zero if you turn the ceiling light on in the room.

b) suppose the LED is off, the ceiling light is on, and the target light level is very low. Once you exit the Light Sensor panel, Lanterne will not turn the LED on even if you turn off the ceiling light. At least this is what I'm observing.

Correct?

chill 2014-04-11 03:40

Re: [Announce] Lanterne - an all-purpose flashlight app
 
P. S. It doesn't seem to be possible to set a target light level that has more than two digits, at least not by typing it in. If I type in three digits with the on-screen keyboard, one disappears, and with the physical keyboard the third digit doesn't even appear.

Copernicus 2014-04-11 04:01

Re: [Announce] Lanterne - an all-purpose flashlight app
 
Quote:

Originally Posted by chill (Post 1420789)
a) the timer is restarted when the room light level goes above the specified, so your 1 minute starts from zero if you turn the ceiling light on in the room.

Yeah, actually, the timer starts every time the LED turns on, and is cleared every time the LED turns off. (Or, at least that's what it should be doing.) So any function in Lanterne that leaves the LED on should be affected by the timeout value.

Quote:

b) suppose the LED is off, the ceiling light is on, and the target light level is very low. Once you exit the Light Sensor panel, Lanterne will not turn the LED on even if you turn off the ceiling light. At least this is what I'm observing.
Ah, actually, I only run the light sensor function while the panel is up. Once you exit the light sensor panel, Lanterne stops checking the light level and turns off the LED...

Quote:

It doesn't seem to be possible to set a target light level that has more than two digits, at least not by typing it in.
Er, yeah, that's my fault. :) I've got the Qt spinbox limit set at 2 digits. (I've never used the ambient light sensor before, so I didn't really know what kind of values it returns...) I've now seen 4-digit values when I subject it to really bright light, so I suppose I should at least give it that much. (Although, I can't really imagine that this functionality is of any use in bright conditions. I have a hard enough time imagining it being useful in dark conditions... :) )

nokiabot 2014-04-11 04:14

Re: [Announce] Lanterne - an all-purpose flashlight app
 
Quote:

Originally Posted by chill (Post 1420789)
I see, thanks for the explanation. The above implies that:
a) the timer is restarted when the room light level goes above the specified, so your 1 minute starts from zero if you turn the ceiling light on in the room.
b) suppose the LED is off, the ceiling light is on, and the target light level is very low. Once you exit the Light Sensor panel, Lanterne will not turn the LED on even if you turn off the ceiling light. At least this is what I'm observing.
Correct?

yup you got the facts right you need to be in the light sensor panel to use it and the timer is to stop the led after configured time when lit . So the timer starts when led is on and resets itself when led turns off :)

nokiabot 2014-04-25 14:21

Re: [Announce] Lanterne - an all-purpose flashlight app
 
Dear buddy got a nasty idea again :D if you succed in the double tap to turn of screen and using a part of the touchscreen to toggle the flashlight then it would be handy if the volume - could increase and decrease the flashlight power.

Copernicus 2014-04-25 15:12

Re: [Announce] Lanterne - an all-purpose flashlight app
 
Quote:

Originally Posted by nokiabot (Post 1422740)
if you succed in the double tap to turn of screen and using a part of the touchscreen to toggle the flashlight then it would be handy if the volume - could increase and decrease the flashlight power.

Interesting ideas! :) But, I'm not sure they are feasible; it may be possible to work with the touchscreen while the backlight is off, but (as you note) it's awfully hard to do more than just tapping the entire screen, as you can't get any feedback. Worse, there's only one approved setting for using the white LED as a torch, so you really can't increase or decrease the power. (I suppose it could be done with the red LED, though; I could give that a try...)

nokiabot 2014-04-25 21:23

Re: [Announce] Lanterne - an all-purpose flashlight app
 
If i remember correctly i have used brightness setting in pierogi tough it is considerd dangerous for torch it can be an option to enable by user to step by step increase and decrease by volume buttons it can be useful as i used torch in lowest setting and many a times felt the need to increase the brightness momenterily to have a clearer and far vison in the dark room or alley and as for backlight i used to turn it off via a command when sunbathing outdoors so maybe if the program is made to recognise double tapping then it can trigger the command to turn off backlight and lock the app ui partialy to use half of the digitizer as a toggle . Whatever the case the program is still heavily useful and adding features would just increase a tad of bloat and a bit of feature rich or say minor enancements in some caces....................................also good luck with your android phone hope to see the ir beast in action . I might get a irdroid finally:)

Copernicus 2014-04-25 21:58

Re: [Announce] Lanterne - an all-purpose flashlight app
 
Quote:

Originally Posted by nokiabot (Post 1422779)
it can be useful as i used torch in lowest setting and many a times felt the need to increase the brightness momenterily to have a clearer and far vison in the dark room or alley

Yeah, it is possible to drive the LEDs beyond the limits specified in the (admittedly sparse) documentation available; and, in fact, Estel has apparently been doing just that with his personal copy of Lanterne... But I'm too nervous about the potential damage to the phone from overdriving the LEDs, so I'm going to avoid adding that feature to Lanterne myself.

But yeah, I do need to try and play around with the backlight again. :)

Quote:

also good luck with your android phone hope to see the ir beast in action . I might get a irdroid finally:)
After having an Android for a week now, I've gotta say, the software is a royal pain, but the hardware is amazing. I guess this shouldn't come as a surprise, but the IR LED on the HTC One is just way more powerful than the one on the N900. I can control TVs from twice the distance, and even bounce the signal off walls. Compared side-by-side with the remote control that came with my Sanyo TV, it's still relatively weak; but I'll bet it wouldn't have as much trouble dealing with Sony devices as the N900 does...

nokiabot 2014-07-29 18:51

Re: [Announce] Lanterne - an all-purpose flashlight app
 
Whats up on irandroid :)

Copernicus 2014-07-29 20:10

Re: [Announce] Lanterne - an all-purpose flashlight app
 
Quote:

Originally Posted by nokiabot (Post 1434239)
Whats up on irandroid :)

Lots of frustration, mainly. :( If you ignore the UI issues, Qt for Android works perfectly; I've been controlling TVs and set-top boxes just fine with my Android test device for a couple of months now. But the UI just isn't there yet.

Lots of pieces of the Qt UI are working; most of Qt Widgets work just fine (and even support Android theming to a limited extent); and QML is getting close to complete functionality. But Qt is still isolated from the standard Android UI components: you can't use the layout system, you can't access the Action Bar, you can't create standard Android dialog boxes or use the "toast" mechanism. For me, the most annoying item is that Android's screen hierarchy works in a manner almost identical to Maemo's stackable windows, which is something I use pretty heavily in Pierogi. I hate having to ditch that part of the UI when it should be able to work right out of the box...

I've been trying to squeeze Pierogi into a new UI, with one main window and a lot of dialog boxes. I've managed to cobble together a Qt dialog box that looks a little like an actual Android dialog box, and put together a fake action bar at the bottom of the window. Hopefully, I'll be able to get something usable put together soon... :)

nokiabot 2014-08-16 14:19

Re: [Announce] Lanterne - an all-purpose flashlight app
 
Quote:

Originally Posted by Copernicus (Post 1419672)
Lanterne 0.5.9 is now making its way up into extras-devel. This version features an option to lock the screen when the camera cover is closed. Also, the UI has been tweaked a bit, particularly the Morse Code panel; I've moved the dot duration control off to the preferences panel, and moved the rest of the UI around a bit, to provide a little more space for entering text.

Please tell me what you think, and as always, watch out for bugs! :)

i am on v0.5.6 :( i cannot find it in the repos the 900 is pretty messed up can you share the deb please:)

Copernicus 2014-08-16 14:53

Re: [Announce] Lanterne - an all-purpose flashlight app
 
Quote:

Originally Posted by nokiabot (Post 1435986)
i am on v0.5.6 :( i cannot find it in the repos the 900 is pretty messed up can you share the deb please:)

Ok, I put a copy of version 0.5.10 in the first post in this thread. (I don't currently have a clean copy of the 0.5.11 deb, as I've been messing with Lanterne lately; I'm hoping to have a new update out at some point...)

nokiabot 2014-08-16 15:28

Re: [Announce] Lanterne - an all-purpose flashlight app
 
Quote:

Originally Posted by Copernicus (Post 1435988)
Ok, I put a copy of version 0.5.10 in the first post in this thread. (I don't currently have a clean copy of the 0.5.11 deb, as I've been messing with Lanterne lately; I'm hoping to have a new update out at some point...)

thanks

can we get a sneak peak on .11 :D

Copernicus 2014-08-16 15:55

Re: [Announce] Lanterne - an all-purpose flashlight app
 
Quote:

Originally Posted by nokiabot (Post 1435990)
can we get a sneak peak on .11 :D

I'm a little nervous about mentioning anything here, as I'm trying something I've never done before. I have no idea whether it will work. I may have to just rip it out of the code and go back to the baseline Lanterne...

nokiabot 2014-08-16 16:09

Re: [Announce] Lanterne - an all-purpose flashlight app
 
light sensor works as excepted well serving my usecase:) though its slow/sensitive cant figure out now:D

nokiabot 2014-08-16 16:13

Re: [Announce] Lanterne - an all-purpose flashlight app
 
Quote:

Originally Posted by Copernicus (Post 1435994)
I'm a little nervous about mentioning anything here, as I'm trying something I've never done before. I have no idea whether it will work. I may have to just rip it out of the code and go back to the baseline Lanterne...

greasy stuff :D holding till product launch ,well then:p:D

Estel 2014-08-16 22:34

Re: [Announce] Lanterne - an all-purpose flashlight app
 
Quote:

Originally Posted by Copernicus (Post 1435994)
I'm a little nervous about mentioning anything here, as I'm trying something I've never done before. I have no idea whether it will work. I may have to just rip it out of the code and go back to the baseline Lanterne...

LiFi? ;)ten chars

nokiabot 2015-04-02 07:57

Re: [Announce] Lanterne - an all-purpose flashlight app
 
moo moo mooo mooo moooo

handaxe 2015-04-02 08:16

Re: [Announce] Lanterne - an all-purpose flashlight app
 
Quote:

Originally Posted by nokiabot (Post 1465593)
moo moo mooo mooo moooo

You, my friend, need a holiday.


All times are GMT. The time now is 15:22.

vBulletin® Version 3.8.8