PDA

View Full Version : [SCRIPT] screen_saver.nrx with temperature display



nuukiaworld
07-11-2005, 06:24 PM
I added a temperature display feature to Yak's screen_saver.nrx. :grin: The temperature display is configurable with keyword @TEMP in the skin file; you may even display the value in Fahrenheit, which is not possible in the Netmonitor. See the .nrx for details.

The temperature display is based on the battery temperature and its response time is therefore rather slow and accuracy limited. However, it is useful when the phone has been alone for a while or in a well-ventilated case during outdoor sporting.

Battery temperature is measured using Netmonitor's function, which I named as calc_battery_temp(). It returns a signed integer which is the battery temperature in degress Centigrade. Because of it is an integer value, the display of Fahrenheit mode is coarse. (By making your own calc_battery_temp() and skipping the last call which converts the float value to a long, you could achieve more resolution...)

Download screen_saver.nrx 1.9.5 with temperature display from www.panuworld.net/nuukiaworld/download/nokix/tempsave.htm (http://www.panuworld.net/nuukiaworld/download/nokix/tempsave.htm)

nEMO
07-11-2005, 06:53 PM
oo yeaa :] I waited for this :]
THX :]

p_l_q
07-11-2005, 07:33 PM
it's cool thing and also usefull :) good job :] and i think that it isn't your last script :P

ema2000
09-11-2005, 10:34 AM
woooooow :D , thanks very much
keep up the good work

nuukiaworld
22-01-2007, 07:10 AM
Hello, I have finally updated the screen saver w/temperature to the newest code base of NokiX scripts. Download link is on the first message of this thread.

Note that this screen saver is available only as a replacement for old screen_saver.nrx, not for new_screen_saver.nrx because the file system cannot be (practically) run on (my) 6110. (The source code is provided, so merging the temperature features to the new_screen_saver with 3-way diff should be easy.)

BUG? This modified and original screen_saver 1.9.5 script has problems with the Power save option, at least my 6110. Setting 5 minutes seem to work unreliably and the animation may run without stopping for a long time (or it restarts without any reason, I have not yet analyzed it so deeply). :confused:

There were no such problems in version 1.9, so probably we should do a diff to find the reason.

LoMaster
22-01-2007, 09:08 AM
...setting 5 minutes seem to work unreliably and the animation may run without stopping for a long time (or it restarts without any reason...
I don't know if this is related somehow, but on my 8210 v5.31 I have a similar problem with new_screen_saver.nrx: sometimes the animation doesn't stop, although Power Save is set to, let's say, 1min. I wasn't able to figure out anything specific that causes such behavior (basically, I didn't really try...) If this could help, I can try different settings (Power Save time, profiles, etc.)

P.S. I also remember the temperature text was distorted when small/bold font was used to display it - it looked like some pixels were missing. I can't provide a screenshot now (maybe later), but here's the code (used on 3310 v06.39):
# screen saver

@addfont font="5210_digi_24.font"
@temp left=84 top=1 font="small/bold" align="right" XOR
@digital font="digi/24" left=42 top=35 align="center" XOR

@weekday font="small/bold" left=10 top=46 align="left" short XOR
@date font="small/plain" left=74 top=46 align="right" ddmmyyyy XOR
P.P.S. OK, I see on your page that it's displayed correctly with small/bold font. I'll try to flash the latest release of your script and provide a ScrShot, if there still is any problem...

nuukiaworld
23-01-2007, 10:57 AM
I don't know if this is related somehow, but on my 8210 v5.31 I have a similar problem with new_screen_saver.nrx: sometimes the animation doesn't stop, although Power Save is set to, let's say, 1min. I wasn't able to figure out anything specific that causes such behavior (basically, I didn't really try...) If this could help, I can try different settings (Power Save time, profiles, etc.)
I diffed Yak's screen_saver 1.9.5 source code with version 1.9 and found no significant changes. To confirm this, I reverted screen_saver.nrx on my phone back to version 1.9 and noted that the problem occurs now with the old version, too!

Old screen_saver (1.9) worked well with old NokiX. - If it is really like it seem now to be, then the problem is not in the screen saver scripts but there is a dangerous timer or message problem in the NokiX core scripts, or some other script is interfering with the current NokiX or screen_saver.

We should test the screen saver(s) alone with the current NokiX to see if the problem is in other scripts possibly not compatible with current NokiX. (I have already seen that old scripts may not be working properly unless they are recompiled... :( )

On my phone, the problem seem to occur more often if the power saving timeout is set to five minutes. However, I have succeeded to see the problem also with 1 minute setting.

nuukiaworld
25-01-2007, 08:11 AM
I replaced the TIMERS.RX in the current scripts package with an old version (TIMERS.RX 1.9, from some script snapshot about a year ago), and now the screen saver power save seems to work reliably. At least since then I have not seen any cases where the animation has not been stopped in five minutes. :)

By downgrading the TIMERS.RX to 1.9, applications will lose possibility to time over 8' 44" intervals, i.e. any 10-minute time choices will be shortened a little. I have not detected any other side-effects with the new scripts I use.

This quick test seem to tell that there is some bug in the new timers, that allow over-8'44" time counting. I tried to locate it but the NokiX timer code is so complicated that the bug cannot be found without deep understanding of the way of the timers work in NokiX. :cry:

nuukiaworld
14-01-2008, 06:15 PM
It would be interesting to know if this timer problem is fixed in the current development version of NokiX... :-?

But an another issue that we have already talked about: battery bar freezing when charging w/power off. Adding a get_phone_state() == PHST_POWER_ON_NORMAL check in screen_saver.c fixed that. I have now added it to the version available in NuukiaWorld (link in the first message).

Somehow I except that the fix will be soon available also in the current development head version in the NokiX SourceForge SVN repository (if not already). :-D