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)

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.


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

vBulletin® Version 3.8.8