maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   Share your Widgets! (https://talk.maemo.org/showthread.php?t=59798)

Kabouik 2011-05-09 23:11

Re: Share your Widgets!
 
misiak, marry me now. Please.

It works perfectly. Many thanks for your help, I have to admit I did not expect such detailed and quick answers. I would never have found how to solve the problem myself.

Conky displays temperature in a 200-400 range, but to be honest, it does not matter because now I know that I have to put a decimal in there. For the Queen Widget, the problem was more important because of the overclock automation which was no longer possible. :)

pusak gaoq 2011-05-10 03:56

Re: Share your Widgets!
 
Quote:

Originally Posted by gft2k1 (Post 781407)
Thanks to techie, this is my last version of OCCP (with code :)) who change the color of displayed temperature, frequency, battery and rootfs in according to status..............:D

i love this widgets but would you mind sharing the default.png for this widgets???
the default.png from the first post is not compatible with these codes....
please share the default.png or do i have to make one myself...

cipper 2011-05-10 11:35

Re: Share your Widgets!
 
Quote:

Originally Posted by misiak (Post 1003075)
TEMP=$((TEMP/10))

i think that
TEMP=$(( $TEMP / 10 ))
is the right one

misiak 2011-05-10 11:50

Re: Share your Widgets!
 
Quote:

Originally Posted by cipper (Post 1003371)
i think that
TEMP=$(( $TEMP / 10 ))
is the right one

Yes, but both are correct (there is no 'right' one in the meaning that only one works). When you use $(( expression )) you don't need to add '$' in front of variables in expression. If you don't believe me, try running:
Code:

FILE_TEMP=`cat /sys/class/power_supply/bq27200-0/temp`
echo "Temp got from file: " $FILE_TEMP
MISIAK_TEMP=$((FILE_TEMP/10))
echo "Misiak way: " $MISIAK_TEMP
CIPPER_TEMP=$(($FILE_TEMP/10))
echo "Cipper way: " $CIPPER_TEMP

The result is the same ;)

EyeVisions 2011-05-10 17:08

Re: Share your Widgets!
 
Olaaa

Thx al ready i only get a bad checksum error? i follow the normal guide i know direct importing the file give those errors. what do i wrong this time :D

thx

cipper 2011-05-10 20:21

Re: Share your Widgets!
 
Quote:

Originally Posted by misiak (Post 1003378)
Yes, but both are correct (there is no 'right' one in the meaning that only one works). When you use $(( expression )) you don't need to add '$' in front of variables in expression.

uao, I wasn't aware about this exception!

Quote:

Originally Posted by misiak (Post 1003378)
If you don't believe me...

of course I trust, too easy to check

thank you for the info!!

misiak 2011-05-10 20:38

Re: Share your Widgets!
 
Quote:

Originally Posted by cipper (Post 1003666)
uao, I wasn't aware about this exception!


of course I trust, too easy to check

thank you for the info!!

No problem ;) The whole $(( )) construction is pretty naughty. If you write scripts sometimes and need it, you can read more in this bash scripting tutorial: http://www.softpanorama.org/Scriptin...ressions.shtml

niqbal 2011-05-10 20:55

Re: Share your Widgets!
 
Quote:

Originally Posted by Kabouik (Post 1002832)
Since a restoration using Backupmenu, my widget displays temperatures between 250 and 380 °C. It's pretty hot, yes.

I used the following code but it did not solve the issue.
Code:

sudo gainroot
modprobe bq27x00_battery
echo bq27x00_battery >> /etc/modules

Does anybody have an idea of what can lead to such wrong values?

I'm using a modified version of the ideal profile (increased max limit from 850 to 900 MHz). Of course, when triggering the "Temperature" mode of the widget, the temperature is considered too high, so the max clock is set to 600 MHz. When triggering the "Ideal" button (corresponding to my modified ideal profile), it works but I can't benefit from the dynamic switch depending on temperature.

Perhaps I could delete some config files for my kernel to reset it? I don't even know where the modified profiles are stored.

Thanks in advance!

with kernel v47 use this instead

Code:

awk '{ print $1/10}' </sys/class/power_supply/bq27200-0/temp

mr_pingu 2011-05-10 21:15

Re: Share your Widgets!
 
Quote:

Originally Posted by niqbal (Post 1003695)
with kernel v47 use this instead

Code:

awk '{ print $1/10}' </sys/class/power_supply/bq27200-0/temp

Just added °C to the end to make it complete

Code:

awk '{ print $1/10 " °C"}' </sys/class/power_supply/bq27200-0/temp

misiak 2011-05-10 21:32

Re: Share your Widgets!
 
Quote:

Originally Posted by mr_pingu (Post 1003711)
Just added °C to the end to make it complete

Code:

awk '{ print $1/10 " °C"}' </sys/class/power_supply/bq27200-0/temp

Stupid question: where is '°' character on N900's keyboard? I cannot find it :P

Edit: ok, I got it. In stock virtual keyboard in symbols&numbers screen after clicking "shift" it's on "0" key :D (easy ^^)


All times are GMT. The time now is 19:24.

vBulletin® Version 3.8.8