View Single Post
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#113
Hey, I didn't wanted it to sound "ungratefoollish" or anything like that. It was rather something like "it's good that I tested it before upgrading, as then, I wouldn't be able to test it without messing with source code". Which, probably, would mean I wouldn't test it at all - too many projects, too short day.

In fact, it's equally the opposite - when I first thrown a proposition for such program in Pierogi thread, it was less than 24 hours, before you released nicely working application. Now, few days later, it is feature-full all purpose solution, with addition of things like morse code and indicator led support. It's absolutely awesome rate of contributing!
---

Now, I think i might contribute a little (in fact, *very* little) addition to Lanterne. The thing is, that since few releases, kernel-power introduced a (optional) hack, to disable irritating auto-enabling of indicator LED, when video is recorded. The hack consist of:
Code:
/sys/class/i2c-adapter/i2c-2/2-0030/disable_indicator_led
...sysfs entry, where we echo 1 (prefferably, automagically, at device startup) to disable indicator LED. Sadly, even with camera-ui2 (cssu'ish one), it is only possible way to get rid of that LED, if we want to record videos using nokia's optimisations. (cssu'ish camera-ui offered toggle to switch indicator off during video recording, but it would still light up at beginning of video, with no way to prevent it).

The problem: disabling indicator LED is "for all intent and purposes", i.e., it won't work in Lanterne, too. Having to revert sysnode entry everytime I might need to use led torch that doesn't destroy night vision, doesn't match my aesthetic. OTOH, I didn't wanted to ask Copernicus to integrate disabling that sysnode on program startup - it would throw errors on non-kp devices (all two of them :P ), and add another layer of complication for program (like dropped idea of preventing camera to start).

So, I patched together a brain-dead wrapped around Lanterne executable, that (externally) clears sysfs entry on Lanterne startup, and enables it, when Lanterne exits. Of course, it also required modification of Lanterne's .desktop file, to run wrapper, instead of main bin. Messing with sysfs require elevated permissions, so we add sudoers file to the mix, and lanterne-helper is cooked.

It should allow to keep indicator OFF from messing with video recording, yet, allow its usage in Lanterne, automagically. It's downloadable from this post attachment.

Installation: (assuming tar got saved to /home/user/MyDocs/)
as root:
Code:
cd /
tar -xvf /home/user/MyDocs/lanterne-helper.tar
update-sudoers
It should be compatible with all future Lanterne releases (unless executable location changes), but after every upgrade, Lanterne .desktop file will need to be modified (or replaced by one from this .tar) again.

Depending on your configuration, you may, or may not need to execute:
Code:
chmod +x /usr/bin/lanterne
chmod +x /usr/sbin/indicator-off.sh
chmod +x /usr/sbin/indicator-on.sh
/Estel

// Edit

Speaking of camera-ui from cssu - using it, I noticed, that even if Lanterne is configured to use camera key to toggle LEDs, it does as intended for a split second, then, launch camera-ui anyway (disabling LED control for lanterne). Is it intended? I don't know if it does matter, but I use QuickLaunch application, for controlling, what happen when I open camera cover (mainly, due to it popping up 4-slot holder for programs, and 5th for custom command, on camera lens opening).
Attached Files
File Type: tar lanterne-helper.tar (6.0 KB, 76 views)
__________________
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!

Last edited by Estel; 2013-06-04 at 17:09.
 

The Following 5 Users Say Thank You to Estel For This Useful Post: