maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   Custom Brightness & No Light Sensor (POST #1 & #2) (https://talk.maemo.org/showthread.php?t=64191)

dr_frost_dk 2011-02-06 19:12

Re: Custom Brightness for N900 - no ALS is now ready for install
 
1 Attachment(s)
Had some more free time and decided to make a brightness bar with QBW like No!No!No!Yes! suggested.
Now you can select just the brightness you need from 2 - 255
NOTE: since PR 1.3 brightness 2 is now lowest setting since 1 turns off LED, was 0 in PR 1.2

now the install is even more simplified.
just extract, Terminal, gain root, goto folder, sh install, add widget "Brightness Bar" and restart and it works

Updated custom brightness is at Page #1, Post #2

NOTE: reflashed my phone yesterday and tested this

dr_frost_dk 2011-02-07 11:22

Re: Custom Brightness for N900 - no ALS is now ready for install
 
Just wanted to bump this thread and hear from users that have tried this mod/script.
I cannot just be me and a few others that dislikes the normal brightness settings and that SLOW reacting light sensor.

and now with the new brightness bar it's even easier than my previous settings, they are still in the package though.

JimKnopf 2011-02-07 14:08

Re: Custom Brightness for N900 - no ALS is now ready for install
 
Just installed. Works like a charm so far. Thanks!

dr_frost_dk 2011-02-07 14:35

Re: Custom Brightness for N900 - no ALS is now ready for install
 
Quote:

Originally Posted by JimKnopf (Post 938137)
Just installed. Works like a charm so far. Thanks!

was the install process easy enough?
and are you using brightness meter or buttons?

JimKnopf 2011-02-07 14:59

Re: Custom Brightness for N900 - no ALS is now ready for install
 
Installed the one with the brightness bar.

Install process was quite easy. Referred to your second post at the first page. Just downloaded, extracted via p7zip, executed the script, added QBW and imported the settings.

You may only should mention to import " Brightness bar" in QBW. Otherwise people may be confused with the import<->buffer<->import thing. ;)

Thanks again! Wonderful widget! No more ALS... :)

dr_frost_dk 2011-02-07 15:20

Re: Custom Brightness for N900 - no ALS is now ready for install
 
i will add that, meanwhile im making more widgets like:
The buttons but in one bar so only need to add one widget instead of 6x, the new bar will still have 6 buttons which should be "brightness -" "brightness 1" "brightness 2" "brightness 3" "brightness 4" "brightness +" & little display to show current value, then you can just edit this one widget to change the 4 values.
Making some graphics to the brightness bar.

JimKnopf 2011-02-07 16:13

Re: Custom Brightness for N900 - no ALS is now ready for install
 
Nice! Looking forward to it. :)

dr_frost_dk 2011-02-07 16:58

Re: Custom Brightness for N900 - no ALS is now ready for install
 
1 Attachment(s)
just finished brightness bar 2.
to install if you allready have custom brightness install
copy "brightness-bar.png" (from new zip at Post #2) to "/home/user/MyDocs/.images/queen_beecon_dir"
add QBW "Brightness bar 2"

if you have not install Custom Brightness you only need to install custom brightness normally (See Post #2) and just add QBW "Brightness bar 2"

to change the 4 values, goto setting for the widget, go advanced like you would when you added the widget, here you can change:
level1=10 - change to what you need
level2=70 - change to what you need
level3=160 - change to what you need
level4=255 - change to what you need
Attachment 17518
SIDE NOTE: sorry for the dull gray colors..... but you can edit the "brightness-bar.png" to change the color yourself, unless you want more colors i could include like gray, blue, green & red etc. in the zip

If you want more then 4 levels then i can make brightness bar 3 :D, it requires a new "picture" and editing the widget for the QBW_WIDTH_X parameters

Tinukedaya 2011-02-07 17:50

Re: Custom Brightness for N900 - no ALS is now ready for install
 
hey, thanks for this... i'm going to install it straight away. As a left-hander the ALS proved to be more than pain in the ...
it just changes the brightness everytime I reach for the touchscreen and so I had to use full brightness at all times. It felt like stroboscope otherwise.

I'll let you know how it works.

dr_frost_dk 2011-02-07 18:39

Re: Custom Brightness for N900 - no ALS is now ready for install
 
has corrected an error
just updated the zip, was missing the cp brightness-bar.png in the install file

Tinukedaya you need to copy the "brightness.bar.png" to your MyDocs/.images/queen_beecon_dir

Tinukedaya 2011-02-07 20:42

Re: Custom Brightness for N900 - no ALS is now ready for install
 
Saw that, did that.
It works like a charm. Install is pretty straightforward and easy for anyone who can read.

Thanks a bunch. .. tomorrow it'll receive new coat to suit my theme. :)

Cheers

*EDIT* On a sidenote. One thing I noticed. With the ALS off, the backlight on keyboard is on all the time. Might be nice to add one more button to the widged to switch it on/off.

JimKnopf 2011-02-07 21:22

Re: Custom Brightness for N900 - no ALS is now ready for install
 
Quote:

Originally Posted by Tinukedaya (Post 938395)
*EDIT* On a sidenote. One thing I noticed. With the ALS off, the backlight on keyboard is on all the time. Might be nice to add one more button to the widged to switch it on/off.

Uh, haven't notice that.

+1 for the button to switch keyboard backlight on/off, if possible!

dr_frost_dk 2011-02-07 21:35

Re: Custom Brightness for N900 - no ALS is now ready for install
 
Quote:

Originally Posted by Tinukedaya (Post 938395)
Saw that, did that.
It works like a charm. Install is pretty straightforward and easy for anyone who can read.

Thanks a bunch. .. tomorrow it'll receive new coat to suit my theme. :)

Cheers

*EDIT* On a sidenote. One thing I noticed. With the ALS off, the backlight on keyboard is on all the time. Might be nice to add one more button to the widged to switch it on/off.

i haven't noticed that, my keyboard light times out after some 30 seconds and is only lit when the screen is "up"
The button you want is that for "its sunny i don't need backlight on my keyboard :D"?

And a side note:
What do you guys think of the design?
if you have any custom design for this mod i can make it so that it will work, you just submit the design/look
im not the best designer at all.....

Tinukedaya 2011-02-07 21:59

Re: Custom Brightness for N900 - no ALS is now ready for install
 
1 Attachment(s)
nah. I was really thinking about another full button on the bar for the light switch.

As for the design. Pretty basic and functional, but for me it is just tooooo big.

I'm gonna do a design to suit my theme. I looked into the code and it should be pretty easy to rewrite to fit smaller bar

Question is though: how complicated is to make it different shape? I'd kinda like to have a circle, where in the middle there would be the actuall brightness shown and the buttons will be around it. see attachment, (sorry about that crapy pic, I'm at work on my n900 and it's done in the sketch, but i guess you'll get the idea.) Also, how does QBW work with transparency? I guess it just takes the selected area as button even when there is no graphic, right?

dr_frost_dk 2011-02-07 22:15

Re: Custom Brightness for N900 - no ALS is now ready for install
 
im still learning QBW.my design is made to be low profile so it doesn't take up much space.
to do a circle will require some math an such, or just make some square points for the QBW_CLICK_ X & Y and that should work fine.
for more info on QBW look to the official thread or wiki.
else user No!No!No!Yes! is the man :)

NightShift79 2011-02-07 23:05

Re: Custom Brightness for N900 - no ALS is now ready for install
 
Nice brightness bar. :)

I just whipped up a new design ;)
http://i52.tinypic.com/ae2w5w.png

dr_frost_dk 2011-02-07 23:14

Re: Custom Brightness for N900 - no ALS is now ready for install
 
Quote:

Originally Posted by NightShift79 (Post 938483)
Nice brightness bar. :)

I just whipped up a new design ;)
http://i52.tinypic.com/ae2w5w.png

nice. really nice :)
thats actually more discreet then my gray design, now im going to use it :)
don't mind if i include it in the zip???


hmm didn't you reverse + & - ????

Changegames 2011-02-07 23:33

Re: Custom Brightness for N900 - no ALS is now ready for install
 
is there anyway for you to make this status menu but instead of something like simple brightness its like a scroll like what you did on the widget... so we can choose from 2-225

dr_frost_dk 2011-02-07 23:40

Re: Custom Brightness for N900 - no ALS is now ready for install
 
1 Attachment(s)
Here's a screenshot of NightShift79's design in use, it is really nice
NOTE: have change position of - & +

Attachment 17538

Still waiting for confirm to put it in the zip...

dr_frost_dk 2011-02-07 23:41

Re: Custom Brightness for N900 - no ALS is now ready for install
 
Quote:

Originally Posted by Changegames (Post 938517)
is there anyway for you to make this status menu but instead of something like simple brightness its like a scroll like what you did on the widget... so we can choose from 2-225

simple answer: no
long answer: not that good at programming but if anybody wants to make this to such an widget you have my blessing :)

NightShift79 2011-02-08 05:18

Re: Custom Brightness for N900 - no ALS is now ready for install
 
ooops.
... I reversed + and -

Here's the fixed design.
http://img202.imageshack.us/img202/6...ghtnessbar.png

...and sure you can use it in your zip.

dr_frost_dk 2011-02-08 11:02

Re: Custom Brightness for N900 - no ALS is now ready for install
 
2 Attachment(s)
just made a draft on the circle version

it works but i need someone to edit the image and make the "background" transparent
the off button is not in effect but the code is included as the last "if then" variable where when pressed now it just does "x=$x"
the image is in the attached zip. install is done with copying the image to /MyDocs/.images/queen_beecon_dir and import the "circle" with QBW

Attachment 17551

making this was pretty easy, just had to put in QBW_CLICK_Y and make "boxes", but my skills isn't great ether with image editing and i can't seem to make the background transparent so that the circle is all you see.

Tinukedaya 2011-02-08 14:50

Re: Custom Brightness for N900 - no ALS is now ready for install
 
2 Attachment(s)
Hey,
I quickly set up 2 pics at home, before going to work again. I applied the circle one to yours and it kinda fits, even that mine is smaller than the one you did. but it works. I also removed the middle down button for now. On the sketch it was meant for the keyb backlight switch, but as that isn't working yet...

Then there is this smallish bar. I didn't test that one yet.

Cheers.

PS: Those are colored to fit my theme. If you want I can make them in black or grey, to be more neutral for your usage...

dr_frost_dk 2011-02-08 15:25

Re: Custom Brightness for N900 - no ALS is now ready for install
 
i will rework the programming today and accommodate for your designs, will post when ready

Tinukedaya 2011-02-08 15:41

Re: Custom Brightness for N900 - no ALS is now ready for install
 
Actually I just tried the small bar of mine and updated the code for myself. I kinda love it for the small size.

And. I just tried how would the circle look like even smaller (love multitasking on this "phone").. Think you can amend it for 100x100 size as well? I would have hard time deciding which of them to use, but would love to see it work in that size and can't really update that one here....


btw: to easen your work, this is the updated code for the small bar

Code:


x=$(cat /home/user/custom_brightness_settings)
level1=40
level2=110
level3=160
level4=255
cx=$QBW_CLICK_X
if [ $cx -ge 1 -a $cx -le 27 ];then x=$(expr $x - 20);fi
if [ $cx -ge 28 -a $cx -le 54 ];then x=$level1;fi
if [ $cx -ge 55 -a $cx -le 81 ];then x=$level2;fi
if [ $cx -ge 82 -a $cx -le 108 ];then x=$level3;fi
if [ $cx -ge 108 -a $cx -le 135 ];then x=$level4;fi
if [ $cx -ge 136 -a $cx -le 162 ];then x=$(expr $x + 20);fi
if [ $x -le 2 ];then x=2;fi
if [ $x -ge 255 ];then x=255;fi
echo $x "    "
echo $x >/home/user/custom_brightness_settings
echo "cat /home/user/custom_brightness_settings >/sys/class/backlight/acx565akm/brightness" | sudo gainroot > /dev/null


dr_frost_dk 2011-02-08 16:47

Re: Custom Brightness for N900 - no ALS is now ready for install
 
Quote:

Originally Posted by Tinukedaya (Post 939061)
Actually I just tried the small bar of mine and updated the code for myself. I kinda love it for the small size.

And. I just tried how would the circle look like even smaller (love multitasking on this "phone").. Think you can amend it for 100x100 size as well? I would have hard time deciding which of them to use, but would love to see it work in that size and can't really update that one here....


btw: to easen your work, this is the updated code for the small bar

Code:


x=$(cat /home/user/custom_brightness_settings)
level1=40
level2=110
level3=160
level4=255
cx=$QBW_CLICK_X
if [ $cx -ge 1 -a $cx -le 27 ];then x=$(expr $x - 20);fi
if [ $cx -ge 28 -a $cx -le 54 ];then x=$level1;fi
if [ $cx -ge 55 -a $cx -le 81 ];then x=$level2;fi
if [ $cx -ge 82 -a $cx -le 108 ];then x=$level3;fi
if [ $cx -ge 108 -a $cx -le 135 ];then x=$level4;fi
if [ $cx -ge 136 -a $cx -le 162 ];then x=$(expr $x + 20);fi
if [ $x -le 2 ];then x=2;fi
if [ $x -ge 255 ];then x=255;fi
echo $x "    "
echo $x >/home/user/custom_brightness_settings
echo "cat /home/user/custom_brightness_settings >/sys/class/backlight/acx565akm/brightness" | sudo gainroot > /dev/null


ill get to work on your circle within the next hours, if you want to have it smaller than 140x140 you have to make a new one, because you can apparently make it transparent :), i can't really figure out how to do this probably, and i get a kind of mental melt down when i open gimp.... to many options and such.....
i use kolour paint since thats my advancement in paint, use to use mspaint...

Tinukedaya 2011-02-08 16:56

Re: Custom Brightness for N900 - no ALS is now ready for install
 
hehe, I can't really reduce the size now, but might be able to sort that, hang on.

in the mean time check this possible for use as Keyboard backlight swich?

I'm not really into coding, so I let others decide if it's applicable :)

Cheers!

dr_frost_dk 2011-02-08 17:18

Re: Custom Brightness for N900 - no ALS is now ready for install
 
1 Attachment(s)
here's a zip with the circle and widget to go with it.
let me know if it works alright.

Tinukedaya 2011-02-08 18:34

Re: Custom Brightness for N900 - no ALS is now ready for install
 
1 Attachment(s)
Works perfect. Now the small one. I manage to get the smaller version, so please, check it up for the code. Thanks!

Btw: did you check the link about the keyb backlight?

NightShift79 2011-02-08 18:49

Re: Custom Brightness for N900 - no ALS is now ready for install
 
awaiting next version :)
...ready for testing.

JimKnopf 2011-02-08 19:12

Re: Custom Brightness for N900 - no ALS is now ready for install
 
Me too! :)

Thanks again!

dr_frost_dk 2011-02-08 19:24

Re: Custom Brightness for N900 - no ALS is now ready for install
 
2 Attachment(s)
Small version ready
a bit to small for my taste, need to use stylus to use it :D

NOTE: have updated post #2, with all the mods so far :)


Quote:

Btw: did you check the link about the keyb backlight?
no don't think that is the code we want.


Attachment 17570

Tinukedaya 2011-02-08 19:48

Re: Custom Brightness for N900 - no ALS is now ready for install
 
1 Attachment(s)
That's it!

And, exactly as I thought, now I dunno which one to use :)

Thanks a lot.

btw: do you want black/gray versions of the designs of mine?

dr_frost_dk 2011-02-08 19:54

Re: Custom Brightness for N900 - no ALS is now ready for install
 
Quote:

btw: do you want black/gray versions of the designs of mine?
no need i actually like the look of yours, just the 140x140 size :)
but i like the bottom on with NightShift79's design so im using that

Other designs are welcome also from everbody

Tinukedaya 2011-02-10 12:19

Re: Custom Brightness for N900 - no ALS is now ready for install
 
So after the few days I decided to stuck with the 100X100 circle desing. I love. So once again big THANKS!

btw: Did you check up the keyboard backlight scripts i posted earlier? I guess that might be what I was talking about, but can't manage to make it run to try it. :D

dr_frost_dk 2011-02-10 12:42

Re: Custom Brightness for N900 - no ALS is now ready for install
 
no but i have been looking at the code that i got from JonWW and tweeked it so now the fade out works as i would normally.
will post when i update the zip to include new init.d script and an uninstall command

dr_frost_dk 2011-02-10 16:01

Re: Custom Brightness for N900 - no ALS is now ready for install
 
ok zip has been updated

for everybody with custom brightness installed you can either:
copy custom_brightness_init.d to /etc/init.d (from the new zip)
or
run install again, new install have a prompt if mce.ini.backup exist then you will be asked to overwrite, just say no


also added an uninstall if needed.


oh, and again please post feedback on how it works

Tinukedaya 2011-02-10 17:28

Re: Custom Brightness for N900 - no ALS is now ready for install
 
going to install it staright away... tho' I would still vote for an on-demand swich added to the widget *grin*

Tinukedaya 2011-02-10 18:10

Re: Custom Brightness for N900 - no ALS is now ready for install
 
Ok. It works just fine. One small thing only. It seems like the fade in/out is done in two steps.. would it be possible to do in more, to feel more fluent? Just a thought...

dr_frost_dk 2011-02-10 18:24

Re: Custom Brightness for N900 - no ALS is now ready for install
 
no don't think that will be possible, then we are talking about the main brightness system, and if i could do that, this QBW/init.d mod, then i could just disable ALS and mod/change the 5 normal steps to what ever is needed, and then instead maybe make an app to change & customize the 5 levels.

but for now this is the only way to get proper light levels.

and heres some Q for you:
how is the fade working precisely, does it react good enough?
and how good are the colors at level 140 - 200? i really like how the screen just "shines" at that level


All times are GMT. The time now is 04:57.

vBulletin® Version 3.8.8