[Q] Colours for temperatures - Zooper Widget General

I saw someone else had asked a similar question, but I tried that answer's template, and then also the website, and neither is working, sooo....
I'm using text (not rich text, does this matter?) to tell me the current conditions and the temperature. I tried using the conditional code in the "edit text manually" section, and then, in the "advanced parameters" section. So far, I have #WCCOND#, #WCTEMPN#$<=32?[c]#00ffff[/c]$, to change the temperature to a light blue when it's 32 or below. This was also trial and error: the other two attempts based off the examples I tried, the temperature entirely disappeared: now, at least, it's still visible, but it's not turning blue even though it's 19 outside. Am I writing this code wrong?

If you want to change the color of the temperature only, use [c]$#WCTEMPN#<=32?#ff00ffff:#ff000000$[/c] in advanced parameters and #WCTEMPN# as text.
Sent from GT-I9505 via Tapatalk

CopKiller76 said:
If you want to change the color of the temperature only, use [c]$#WCTEMPN#<=32?#ff00ffff:#ff000000$[/c] in advanced parameters and #WCTEMPN# as text.
Sent from GT-I9505 via Tapatalk
Click to expand...
Click to collapse
Does it matter if it's text, or rich text?
....also, I'm using six number colour codes, does that make a difference?
Nevermind, I think I've got it. I'm just a little annoyed that between your example, the website's example, and someone else, the code doesn't seem to match

Doesnt matter richtext only has a few more options.
Sent from GT-I9505 via Tapatalk

CopKiller76 said:
Doesnt matter richtext only has a few more options.
Sent from GT-I9505 via Tapatalk
Click to expand...
Click to collapse
Okay, so then, if I use the Advanced Parameters, is it going to affect everything within the module? I'm trying to apply this idea to my battery stats, using #BSTAT#, #BLEV#, and #BLEFT#. All three are present in the module, but in Advanced Parameters, I'm only trying to apply a change in colour (like the website example) to #BLEV#. However, it changes all three instead of just one.

The change in advanced is for the complete module. In this case you have to use rich text and try doing this with bb-code.
Sent from GT-I9505 via Tapatalk
---------- Post added at 08:20 PM ---------- Previous post was at 08:12 PM ----------
Try this #BSTAT# $#BLEVN#<=30?[c=#ffff0000]#BLEV#[/c]:[c=#ff00ff00]#BLEV#[/c]$ #BLEFT#
Sent from GT-I9505 via Tapatalk

CopKiller76 said:
The change in advanced is for the complete module. In this case you have to use rich text and try doing this with bb-code.
Sent from GT-I9505 via Tapatalk
Click to expand...
Click to collapse
But can BBC code change the colour dynamically as well?

Example added.
Sent from GT-I9505 via Tapatalk

Nope. Maybe I'll just try small separate widgets then.

Sokudoningyou said:
Nope. Maybe I'll just try small separate widgets then.
Click to expand...
Click to collapse
Not working for you?
Sent from GT-I9505 via Tapatalk

CopKiller76 said:
Not working for you?
Sent from GT-I9505 via Tapatalk
Click to expand...
Click to collapse
No, didn't work.

As i look over my other widgets i see there is a change in the newest zooper(themer zooper?). If you write the # in a color tag there is sometimes an error. Try this:
#BSTAT# $#BLEVN#<=30?[c=ffff0000]#BLEV#[/c]:[c=ff00ff00]#BLEV#[/c]$ #BLEFT#
On Android you have to use 8 digit colorcode cause the first 2 digits are for the alpha value. use 00 to ff for 0-100% alpha.
Edit: This is not for Advanced Parameters, its for the Edit Text input field!

CopKiller76 said:
As i look over my other widgets i see there is a change in the newest zooper(themer zooper?). If you write the # in a color tag there is sometimes an error. Try this:
#BSTAT# $#BLEVN#<=30?[c=ffff0000]#BLEV#[/c]:[c=ff00ff00]#BLEV#[/c]$ #BLEFT#
On Android you have to use 8 digit colorcode cause the first 2 digits are for the alpha value. use 00 to ff for 0-100% alpha.
Edit: This is not for Advanced Parameters, its for the Edit Text input field!
Click to expand...
Click to collapse
I actually got it to work finally, but I'm just using the battery level as a separate piece within the widget. Much less stress. But thanks!

Sokudoningyou said:
I actually got it to work finally, but I'm just using the battery level as a separate piece within the widget. Much less stress. But thanks!
Click to expand...
Click to collapse
In case this might help either of you down the road, here's a paste from an app I built where this works.
Code:
[c]$ #BLEVN# > 30 ? #FFA0A0A0 $$ #BLEVN# <= 30 && #BLEVN# > 15 ? #FFE2892B $ $ #BLEVN# <= 15 ? #FFFF3F3F $ [/c]

Related

[MOD] Collection of do it yourself tweaks

While the development is still in its infancy here,
lets post here a bunch of do it yourself tweaks.
Feel free to post any rom tweaks you know of.
In the file /system/etc/init.qcom.post_boot.sh , find the section
case "$target" in
"msm8960" | jaguar* | M2* | m2* )
Click to expand...
Click to collapse
then modify the following value:
echo 80 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
Click to expand...
Click to collapse
This will improve the touchscreen responsiveness.
Add the following line at the end of the msm8960 section:
echo 1024 > /sys/devices/virtual/bdi/179:0/read_ahead_kb
Click to expand...
Click to collapse
This will speed up loading of apps somewhat.
Reboot for changes to take effect.
In the same file you can have it run every init.d file if you don't have init.d support.
Sent from my SPH-D700 using Tapatalk 2
governor tweaks
if on the on-demand governer i recommend you change the sampling rate to 70,000, it improves the devices scaling performance i.e if your device is sitting for a sec. and you touch the screen it should jump to a higher frequency to perform the action faster at the cost of a little bit higher battery consumption but a minuscule amount. And of course please all use the noop i/o scheduler it really does improve responsivness of the phone by alot.
I will aslo be uploading a sys ctl.conf tweak to greatly improve our battery life my og epic increased by 3 hours because of this it is a cwm flashable but for those who dont feel like using it you can always use a root explorer and copy and paste or adb push it. i will post when i know it works
file is migrating to new host this is the link you have to take it apart and either copy and paste or adb push, the install script is giving me trouble will post back when i get around to fixing it unless some brave soul would like to fix it for me idc its all about you guys so if you wanna beat me to it be my guest
and remember always make a nandroid
I would also like to say i did not create this and i have absolutly no idea who did this mod has been circulating around xda's htc forums,android central, and droid forums as far as im concerned the maker of this mod is untraceable.
V6supercharger makes a world of a difference in the memory management section and no ram is waisted it is devoted to the cache for our devices its a pain to set up because we are on odex stock devices ice is a bitc* that way haha.
I found this thread here with several build.prop tweaks... He claims they work on all devices. I am an Android newbie so I can not verify that information.
http://forum.xda-developers.com/showthread.php?t=1639104
matrixzone5 said:
if on the on-demand governer i recommend you change the sampling rate to 70,000, it improves the devices scaling performance i.e if your device is sitting for a sec. and you touch the screen it should jump to a higher frequency to perform the action faster at the cost of a little bit higher battery consumption but a minuscule amount. And of course please all use the noop i/o scheduler it really does improve responsivness of the phone by alot.
I will aslo be uploading a sys ctl.conf tweak to greatly improve our battery life my og epic increased by 3 hours because of this it is a cwm flashable but for those who dont feel like using it you can always use a root explorer and copy and paste or adb push it. i will post when i know it works
Remove this is the link you have to take it apart and either copy and paste or adb push, the install script is giving me trouble will post back when i get around to fixing it unless some brave soul would like to fix it for me idc its all about you guys so if you wanna beat me to it be my guest
and remember always make a nandroid
I would also like to say i did not create this and i have absolutly no idea who did this mod has been circulating around xda's htc forums,android central, and droid forums as far as im concerned the maker of this mod is untraceable.
Click to expand...
Click to collapse
Gotta ask you to remove your link. Third-party downloads that require signing in/up are prohibited.
I'm sorry about that bro I understand its totally annoying I forgot u gotta sign up now for 4shared ill upload it to media fire the second I get a chance
Note to mod* remove if you can please
Sent from my SPH-L710 using XDA
Doesn't build.prop cover most do-it-yourself tweaks?
Yes but there's still ur susctl .conf file u can play with if u go to sustem/etc I believe there is a file u can edit to boost the Max speaker volune
I personally love ofinding new little tweaks to apply and edit in android I love poking and prodding around just to find out what does what whether removing this and replacing it with *,that will benefit perform
Sent from my SPH-L710 using XDA
Terminal emulator cmd
getprop til.MSL Works for getting your msl # to change the settings for faster 3g in ##DATA# menu under the multimedia tab.
If you know what I mean.
Sent from my PB GS3 using XDA
Tewlman252 said:
Terminal emulator cmd
getprop til.MSL Works for getting your msl # to change the settings for faster 3g in ##DATA# menu under the multimedia tab.
If you know what I mean.
Sent from my PB GS3 using XDA
Click to expand...
Click to collapse
I've tried this both with
Code:
getprop til.MSL
&
Code:
getprop ril.MSL
and can't get it to display the MSL, any ideas?
And yes I entered "su" prior to typing the cmd, I actually have terminal setup to do that automatically.
Sent from my SPH-L710 using Tapatalk 2
Strange, it worked for me the first time but now no luck.
Sent from my SPH-L710 using XDA
Tewlman252 said:
Strange, it worked for me the first time but now no luck.
Sent from my SPH-L710 using XDA
Click to expand...
Click to collapse
That's weird, hmmph.
Sent from my Transformer TF101 using Tapatalk 2
carhauler1969 said:
I've tried this both with
Code:
getprop til.MSL
&
Code:
getprop ril.MSL
and can't get it to display the MSL, any ideas?
And yes I entered "su" prior to typing the cmd, I actually have terminal setup to do that automatically.
Sent from my SPH-L710 using Tapatalk 2
Click to expand...
Click to collapse
What app are you using to control ur su binary? Super user?
And did you try typing just get prop and scrolling through
Sent from my GT-I9100 using xda app-developers app I recommend using supersu by chain fire for super user on ics
Tewlman252 said:
Terminal emulator cmd
getprop til.MSL Works for getting your msl # to change the settings for faster 3g in ##DATA# menu under the multimedia tab.
If you know what I mean.
Sent from my PB GS3 using XDA
Click to expand...
Click to collapse
Can you clarify this? Thanks
Courtesy of our own Qbking77
http://www.youtube.com/watch?v=RQRZ2Z_IQkY&feature=youtube_gdata_player
This is how I got it to work the first time on my GS3 from Sprint but subsequent tries have failed. Not sure if it's just a one time thing or not.
Needless to say, now that I have my MSL, I don't need to get it again unless I switch devices.
Sent from my SPH-L710 using XDA
Another tip to save battery is enable power saving mode. It automatically scales back the cpu governor to a max speed of 1.026 ghz. Unless you're gaming, this should be fine for day to day usage.
I have tested this with cpu spy and no frills cpu control.
Sent from my SPH-L710 using XDA
nabbed said:
While the development is still in its infancy here,
lets post here a bunch of do it yourself tweaks.
Feel free to post any rom tweaks you know of.
In the file /system/etc/init.qcom.post_boot.sh , find the section
then modify the following value:
This will improve the touchscreen responsiveness.
Add the following line at the end of the msm8960 section:
This will speed up loading of apps somewhat.
Reboot for changes to take effect.
Click to expand...
Click to collapse
echo 80 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
this part showed a 90 in my script. i just want to verify that the instruction is to change the 90 to an 80. or is the instruction to alter it how i wish, and the 80 is just what you picked?
stretchwookie said:
echo 80 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
this part showed a 90 in my script. i just want to verify that the instruction is to change the 90 to an 80. or is the instruction to alter it how i wish, and the 80 is just what you picked?
Click to expand...
Click to collapse
Its alot easier if you used an app like setcpu and go to governed setting ans change the up thresh hold to 80 remember the lower the number the higher the performance at the cost of Max battery life but never set it to 100 it freezes really badly. 99 is even a stretch u shudnt need to go over 95
Sent from my SPH-L710 using xda app-developers app

[APP] GalacticNight -- night mode for rooted E4GT

I made a simple open source nightmode app for rooted E4GTs that turns the screen to red and black, to preserve night vision. I've only tried it on EL29. Whether it works on other firmwares, or other Samsung phones, depends on whether they use exactly the same /system/etc/mdnie* files.
USE AT YOUR OWN RISK.
If you ran some screen adjustment app that modified your mdnie* files, GalacticNight will refuse to start.
There are also options for green and black, black and white, as well as reversed colors (e.g., if you want to browse the web at night, reversed BW might work better).
You also save some battery life in single-color night mode, because you don't turn on the other colors.
Yes, I know there is ChainFire3D, which is a great app, but this is better for nightmode. ChainFire3D does nightmode by simply dropping the green and blue colors. That way of doing things can make some things invisible (e.g., some things in the UI may be pure green, and then they'll turn black). GalacticNight, instead, properly converts RGB colors to luminosities, and then sets the red (or green or white) intensity according to the luminosity.
GalacticNight manipulates the /system/etc/mdnie* files and should not have any more impact on performance than, say, using the Movie color profile in the standard settings.
If something goes wrong, you may need to go in with adb and copy the backed up mdnie* files from /sdcard/GalacticNight_backup
After install Says my device is not rooted or not supported
Mijjz goodness rom, with agats 3.0
Sent from my SPH-D710 using XDA
krisI0N said:
After install Says my device is not rooted or not supported
Click to expand...
Click to collapse
Can you send me a log so I can figure it out? Just install catlog from Google Play, run GalacticNight, go immediately to catlog, press MENU and Send, and email it to [email protected]?
Thanks!
Alright, not sure If I did it right but sent it
Sent from my SPH-D710 using XDA
krisI0N said:
Alright, not sure If I did it right but sent it
Click to expand...
Click to collapse
Yup, that was perfect, thank you. I didn't realize that busybox's mount formats the list of partitions a bit differently. I just posted 0.02 which fixes the problem your log showed. Of course, there could be other problems.
I updated to 0.03. Don't know how compatible it will be, but now it does things quite differently (it sets up a link from /system/etc/mdnie*dynamic_mode to files in /sdcard, so it doesn't need to touch /system when you change colors) and adds a new sepia mode which changes the background to sepia (same shade as Kindle app uses).
Looks like one problem is that this stuff has been seriously changed in ICS while I only have GB. Looking at ICS source code (for the I9100, but I am hoping it's the same here), there is a control file called "tunning" (yes, "nn") somewhere on the device (maybe in /sys/class/mdnie/?) that controls color tuning files. Can anybody check if they have such a file?
here ya go...this is from cm9
but it seems to just be blank??
Thanks, it's actually a control file. When you copy it it should be empty when you have no tuning file.
If you want to try to help with further development, I posted instructions in this thread on what would help next. It's hard to develop for an OS version I don't have, but I really don't want to go to ICS on my device.
For the daring user, I made a version of GalacticNight for ICS. Not tested on any ICS device, but based on my understanding of the ICS mdnie driver source code. USE AT YOUR OWN RISK. Here it is. If you are daring enough to try it (I do think that if it screws up the display, a reboot should fix it, but I can't make any promises), I would be grateful for tests.
I would recommend first testing the Dynamic/Standard/Movie modes. Those are less likely to cause problems on your device.
If you have GB, you can try this version, too. I did test the GB version of the code. This version has a new screen mode called "No blue" which turns off blue pixels to save batteries, and modifies red and green to compensate. White turns to yellow. I've heard that blue light makes it harder to fall asleep, so this might be a good screen mode for use while reading yourself to sleep. I certainly felt like I got sleepy while using this mode last night.
Just tried the last update for ics. I'm on cm9 nightly 8/3 and it seems to be working fine
Sent from my SPH-D710 using xda app-developers app
albe070 said:
Just tried the last update for ics. I'm on cm9 nightly 8/3 and it seems to be working fine
Sent from my SPH-D710 using xda app-developers app
Click to expand...
Click to collapse
Excellent. I spent a couple of hours adding S3 support since then. Could you try the current version to make sure I didn't break the S2 ICS support. I hope it will all work on S2 (GB and ICS), S3, Note (completely untested) and maybe even the 7.7 Tab (completely untested).
Also, while you're testing, I'd like to find out if the color mode survives turning the screen off and on. (It doesn't on the S3.)
On my S2 it returns to normal after screen turns off.
Still an awesome app though. With the way you have the interface it is so simple and quick to change colors, having to reapply after screen off is not much of an issue for me.
Thanks for building this app. Great job!
Forgot to add.. I am on CM9.
Sent from my SPH-D710 using XDA Premium App
---------- Post added at 01:30 PM ---------- Previous post was at 01:21 PM ----------
Also... I have tried both versions. The one you posted above for ICS and v.7. Both seem to work fine except for the screen reset after screen off.
---------- Post added at 01:46 PM ---------- Previous post was at 01:30 PM ----------
Only one request
Could you add a blue option?
Version 0.09 here might fix the screen-on problem.
Any reports on version 0.09? There have been 17 downloads and nobody has said anything.
arpruss said:
Any reports on version 0.09? There have been 17 downloads and nobody has said anything.
Click to expand...
Click to collapse
Unlinke GalacticICS, GalacticNight009 did NOT run it says the devive is not rooted.
Arp, The app still runs fine but it does reset after screen off. I also made sure to uninstall the previous version before installing v9.
Sent from my SPH-D710 using XDA Premium App
ghostboa said:
On my S2 it returns to normal after screen turns off.
Click to expand...
Click to collapse
You can try to see if 0.11 still has this issue.
Could you add a blue option?
Click to expand...
Click to collapse
Done in 0.11. If anybody is annoyed by too many options, press MENU, Settings, and then you can select which color mode buttons are showing.
arpruss said:
You can try to see if 0.11 still has this issue.
Done in 0.11. If anybody is annoyed by too many options, press MENU, Settings, and then you can select which color mode buttons are showing.
Click to expand...
Click to collapse
Just installed 0.12.
Thanks, the blue looks sweet.
I didnt notice the menu option before, very nice feature.
I had to come back and edit here, it does survive after screen off now. It would be nice to see more feedback for arpruss though.

[SCRIPT] Brightness buttons always on

Hi,
Just a little trick for those who want the "capacitive" buttons always on (maybe not very battery friendly but...) Remember someone asked this a few weeks ago somewhere...
Obviously you need root and init.d support... You can also edit directly the brightness file in /sys/class/leds/button-backlight/brightness but the modification will not survive after a reboot so you need to use an init.d script to load the modified value at each boot.
Put the init.d script below in /system/etc/init.d set the permissions to rwxrwxrwx, reboot, done
Here's the script: http://www.multiupload.nl/SMQWQQVBTJ
If you want to return back to stock: rename the init.d script with the .back extension or delete it.
If you want to set the "capacitive" buttons always off you need to edit the value, open the init.d script with notepad++ (on PC) or with a file explorer directly on your phone and set the value to "0" instead of "255", save, reboot, done.
Hoping that it will be useful,
Won't be using but thanks anyways, one question though, when do the HTC one buttons come on and off normally? They seem to have no specific interval
Sent from my HTC One using xda app-developers app
Hi,
No worries , it works with the ambiant light so with the sensor (light->off / night->on), even if the auto brightness is on or off the capacitive buttons vary in brightness so this part is independant...
After that I'm not a dev, the only solution I found is to modifie the value by the user in one file. Maybe it's set in the framework, or kernel? i don't realy know. The auto brightness values can be changed with a modified framework-res.apk, maybe it's the same thing for the capacitive buttons . In any case I have not the knowledge and skills for this part about the "automatic" dimming...
Capacitive button in Play works well and less cumbersome. Am using it with Pie. Automatic dimming would be cool though Thanks for looking into this.
Sent from my HTC One using Tapatalk 2
Stea1thmode said:
Capacitive button in Play works well and less cumbersome. Am using it with Pie. Automatic dimming would be cool though Thanks for looking into this.
Sent from my HTC One using Tapatalk 2
Click to expand...
Click to collapse
Hi,
Sorry but I don't know what you mean... or you mean a kind of greater "light graduation", not on or off like stock, at least it looks like this for me (for example some values like 0 / 100 / 200 / 255), depending of the ambient light?
Like I said, for this I have not the knowledge, maybe a dev can take a look . In any case I don't think you will see a big difference between 100 and 255 for example...
And in the path /sys/class/leds/button-backlight/ there is nothing related to the graduation, it's in the framework stuff I think...
Stea1thmode said:
Capacitive button in Play works well and less cumbersome. Am using it with Pie. Automatic dimming would be cool though Thanks for looking into this.
Click to expand...
Click to collapse
This app now officially supports the HTC One in the latest beta version. I'm the developer of the app and I'd love to hear feedback from HTC One owners to know if it really works (since I don't have a device of my own to test on). See this thread: http://forum.xda-developers.com/showthread.php?t=2402153. Thanks!
denversc said:
This app now officially supports the HTC One in the latest beta version. I'm the developer of the app and I'd love to hear feedback from HTC One owners to know if it really works (since I don't have a device of my own to test on). See this thread: http://forum.xda-developers.com/showthread.php?t=2402153. Thanks!
Click to expand...
Click to collapse
Thanks I've just tested it. It has 3 settings right? Seems to be working well. It would be cool though to have an auto brightness feature.
Sent from my HTC One using Tapatalk 4 Beta
Stea1thmode said:
Thanks I've just tested it. It has 3 settings right? Seems to be working well. It would be cool though to have an auto brightness feature.
Sent from my HTC One using Tapatalk 4 Beta
Click to expand...
Click to collapse
That would be pretty cool.
Sent from my HTC One
Stea1thmode said:
Thanks I've just tested it. It has 3 settings right? Seems to be working well. It would be cool though to have an auto brightness feature.
Click to expand...
Click to collapse
Yep, it has 3 settings. Thanks for the idea about auto-brightness. You are definitely not the first person to pose that idea!

[KERNEL MODULES] [4.4/4.4.1] Screen Dimmer, Fast Charge

Screen Dimmer
The minimum screen brightness is too damn bright to use in the dark.
Run the app, click "Load" next to "n5dim", change your brightness to the minimum (and then up a bit and back down) and notice how much dimmer it is.
The brightness at all other levels stay the same.
Source: https://github.com/mzhou/n5dim
Fast Charge
This works by setting the registers on the bq24192 charger chip to allow as much input current (from USB/AC) as possible, as well as allowing as high a charge current as possible (to the battery).
From limited tests I've performed in the past, this actually isn't enough to get faster charging, so further investigation will be needed, though your testing will be much appreciated.
It will take effect on the first time you plug in after clicking "Load". If you're already plugged in, you need to unplug and replug for it to take effect.
Source: https://github.com/mzhou/n5charge
General
To use either of these, you need any kernel which supports modules (CONFIG_MODULES=y).
I've attached (modules_boot.img) a stock kernel with the config changed to support modules.
modules_441_boot.img is for 4.4.1, while modules_boot.img is for 4.4.0.
Does this dim further than setting '1' in /sys/devices/mdp.0/qcom,mdss_fb_primary.160/leds/lcd-backlight?
(Also I noticed your CSE email, a fellow UNSW student?)
Cyb3rGlitch said:
Does this dim further than setting '1' in /sys/devices/mdp.0/qcom,mdss_fb_primary.160/leds/lcd-backlight?
(Also I noticed your CSE email, a fellow UNSW student?)
Click to expand...
Click to collapse
Yes. Dragging the brightness slider to the minimum already sets 1 there.
There's values hard coded in the platform data to internally restrict the value to a minimum of 5 (but that's of little consequence).
The main gain is is from the "full scale current" (you can find an explanation in the datasheet for lm3630) which has been hard coded to 18 in the platform data. Bringing it down to 0 makes a huge difference.
(sup)
Nice work! I wonder why they limited it. Possibly to stop people putting their phone into an unusable state during the day?
Cyb3rGlitch said:
Nice work! I wonder why they limited it. Possibly to stop people putting their phone into an unusable state during the day?
Click to expand...
Click to collapse
I've done it to myself many times when I did this to my old phone.
Also updated the attachment in the OP to be compatible with more kernels.
Tested working on Franco.
Very cool! :good:
AWESOME! Is there maybe a mod like this for the NN7 (new nexus 7 )
Is there any advantage to this method over using an app like lux?
Sent from my Nexus 5 using XDA Premium 4 mobile app
adzjwarner said:
Is there any advantage to this method over using an app like lux?
Sent from my Nexus 5 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
No app will be able to get the backlight this dark.
I'm not sure what Lux does, but if it modifies the colours to produce a darkening effect, then the contrast will be very bad.
adzjwarner said:
Is there any advantage to this method over using an app like lux?
Sent from my Nexus 5 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Hey there, I'm actually the developer of Lux. The main purpose of Lux is to replace your auto brightness system without the need for root access. That being said, there's no reason why this neat kernel module couldn't be added to a root plugin for Lux.
Cyb3rGlitch said:
Hey there, I'm actually the developer of Lux. The main purpose of Lux is to replace your auto brightness system without the need for root access. That being said, there's no reason why this neat kernel module couldn't be added to a root plugin for Lux.
Click to expand...
Click to collapse
Ah cool.
I tried out Lux and I'm not sure if it's a limitation in the free version, but it only sets the backlight brightness (/sys/class/leds/lcd-backlight/brightness) to a minimum of 10 before it starts doing colour adjustment instead.
My module treats the value 1 as special for making the backlight super dark. Dragging Android's built in brightness slider uses the full range of values 1-225 inclusive.
There's no reason it couldn't just map the full 1-255 to a wider range, but I initially wanted to lean towards keeping things as stock as possible.
arararagi said:
Ah cool.
I tried out Lux and I'm not sure if it's a limitation in the free version, but it only sets the backlight brightness (/sys/class/leds/lcd-backlight/brightness) to a minimum of 10 before it starts doing colour adjustment instead.
My module treats the value 1 as special for making the backlight super dark. Dragging Android's built in brightness slider uses the full range of values 1-225 inclusive.
There's no reason it couldn't just map the full 1-255 to a wider range, but I initially wanted to lean towards keeping things as stock as possible.
Click to expand...
Click to collapse
It does that because some devices do silly things near 0 like putting the device to sleep. You can change the minimum brightness in settings to 1 which should fix this (although I suspect it might round 0.01*255 to 2. I'll have to check my codebase).
Cyb3rGlitch said:
It does that because some devices do silly things near 0 like putting the device to sleep. You can change the minimum brightness in settings to 1 which should fix this (although I suspect it might round 0.01*255 to 2. I'll have to check my codebase).
Click to expand...
Click to collapse
Somehow overlooked that when I was skimming the settings. (And it does round to 2 ).
I could make 2 or anything less than 5 special so that Lux users can benefit. Or maybe just make it configurable with a parameter at insmod time...
arararagi said:
Somehow overlooked that when I was skimming the settings. (And it does round to 2 ).
I could make 2 or anything less than 5 special so that Lux users can benefit. Or maybe just make it configurable with a parameter at insmod time...
Click to expand...
Click to collapse
Whatever you feel works best. A parameter sounds like the most flexible solution though.
This is exactly what I was looking for!
Could I get a bit more explanation of how to install this though? Do I flash the kernel in recovery and then run the command from a shell on my phone, or on my computer?
Thanks for making this.
Sent from my Nexus 5 using xda app-developers app
I'll be watching this thread intently. I currently use lux as well.
rockingondrums said:
I'll be watching this thread intently. I currently use lux as well.
Click to expand...
Click to collapse
Ditto!
Sent from my Nexus 5 using XDA Premium 4 mobile app
Nelsocracy said:
This is exactly what I was looking for!
Could I get a bit more explanation of how to install this though? Do I flash the kernel in recovery and then run the command from a shell on my phone, or on my computer?
Thanks for making this.
Sent from my Nexus 5 using xda app-developers app
Click to expand...
Click to collapse
Flash the kernel in whatever normal way you choose.
Extract and copy n5din.ko to your phone.
Use root and put it in /data so that apps with SD card access can't mess with it.
Run "insmod /data/n5dim.ko" on your phone. This can be with a terminal emulator or adb or script manager.
I'm probably gonna be making more modules so I might make an app to simplify the process.
Cyb3rGlitch said:
Hey there, I'm actually the developer of Lux. The main purpose of Lux is to replace your auto brightness system without the need for root access. That being said, there's no reason why this neat kernel module couldn't be added to a root plugin for Lux.
Click to expand...
Click to collapse
OhHai! Big fan of the app, it's saved my eyes when internetting in bed for many many months now! (Though I probably should just not internet at night)
I'll leave the plugin stuff to somebody who knows how to do that and rejoice when(if) it happens. :good:
arararagi said:
Flash the kernel in whatever normal way you choose.
Extract and copy n5din.ko to your phone.
Use root and put it in /data so that apps with SD card access can't mess with it.
Run "insmod /data/n5dim.ko" on your phone. This can be with a terminal emulator or adb or script manager.
I'm probably gonna be making more modules so I might make an app to simplify the process.
Click to expand...
Click to collapse
That worked perfectly, thanks.
This is really dim! I'm impressed. If you ever decide to modify it like you mentioned earlier so that the full brightness adjustment was available I'd be interested. It would be useful to have access to all the brightness levels between yours and the ordinary minimum brightness.
Sent from my Nexus 5 using xda app-developers app

[Q] Help with a simple time conditional

Maybe simple, maybe not.
Basically I have text that says "Good Morning, it is 2:34 PM"
I want the word "Morning" to change with a conditional statement so that it reads "Morning" between 12:00a and 11:59a, "Afternoon" between 12:00p and 4:59p, and "Evening" between 5:00p and 11:59p. My system is set to a 12hr clock. I've been toying with it for a while and have come up short. Any advice?
Thanks in advance.
Its's simple if you know how
Use this as your text
Code:
Good $#DH#>=0&&#DH#<12?Morning$$#DH#>11&&#DH#<17?Afternoon$$#DH#>16?Evening$, it is #DKK#:#Dmm# #Da#
CopKiller76 said:
Its's simple if you know how
Use this as your text
Code:
Good $#DH#>=0&&#DH#<12?Morning$$#DH#>11&&#DH#<17?Afternoon$$#DH#>16?Evening$, it is #DKK#:#Dmm# #Da#
Click to expand...
Click to collapse
You're my hero. Works like a champ. Thanks so much!
Sent from my SAMSUNG-SGH-I747 using Tapatalk

Categories

Resources