Notices


Reply
Thread Tools
Posts: 353 | Thanked: 263 times | Joined on Dec 2009 @ Finland
#491
Hi,

I'm making my own fm transmitter widget to match the looks of my other widgets on desktop, and I use this script with QB:
Code:
#!/bin/bash

STATE="`fmtx_client | grep state`"
if [ $STATE = "state=disabled" ]; then
        fmtx_client -p1
        fm-boost
        exit 0
elif [ $STATE = "state=enabled" ]; then
        fmtx_client -p0
        exit 5
fi
What I'm trying to do in QB is show image fmtx_on.png when exit status is 0 and fmtx_off.png.5 (I have written "fmtx_off.png" in the >=3 image) when exit status is 5, but for some reason widget shows no images at all. I know that exit statuses are recognised correctly since the background color changes but no images are shown. What could be wrong?
__________________
My Maemo5 projects:
mSpede - Speed testing game | Them Bloody Ducks - 2D duck hunting game | Maetronome - A simple metronome app | CuteMPC - MPD client
 
No!No!No!Yes!'s Avatar
Posts: 700 | Thanked: 846 times | Joined on Nov 2009
#492
Originally Posted by TNiga View Post
Hi,

I'm making my own fm transmitter widget to match the looks of my other widgets on desktop, and I use this script with QB:
Code:
#!/bin/bash

STATE="`fmtx_client | grep state`"
if [ $STATE = "state=disabled" ]; then
        fmtx_client -p1
        fm-boost
        exit 0
elif [ $STATE = "state=enabled" ]; then
        fmtx_client -p0
        exit 5
fi
What I'm trying to do in QB is show image fmtx_on.png when exit status is 0 and fmtx_off.png.5 (I have written "fmtx_off.png" in the >=3 image) when exit status is 5, but for some reason widget shows no images at all. I know that exit statuses are recognised correctly since the background color changes but no images are shown. What could be wrong?
Have you checked position of images and visibility?
Is directory correct?
Refer to wiki for relevant settings.
__________________
Have a look at Queen BeeCon Widget (WIKI) Customizable and flexible widget-based multi-instance monitoring, alerting and interactive tool for the N900
Please provide comments and feedback for having QBW supported and enhanced further - (DONATE) - v1.3.3devel / v1.3.3testing / v1.3.3extras
 
No!No!No!Yes!'s Avatar
Posts: 700 | Thanked: 846 times | Joined on Nov 2009
#493
Originally Posted by gft2k1 View Post
sorry techie, thanks for your widget but i don't know how to change the checksum (i have made some modifications as you see) and i have copied the text there to copy-paste from my N900 but don't work.

Another thing: in your original script overclock don't work......
example: if i set ideal (850) then lock and unlock phone the temperature button is blue but the frequency is the same (850) and i still on ideal......

Thanks again for your job and sorry for my bad english......
Guys ... do not change exported instance data by hand ... change command via edit cmd button once you have imported the widget instance with original checksum.

Please refer to the wiki for issues with checksum
__________________
Have a look at Queen BeeCon Widget (WIKI) Customizable and flexible widget-based multi-instance monitoring, alerting and interactive tool for the N900
Please provide comments and feedback for having QBW supported and enhanced further - (DONATE) - v1.3.3devel / v1.3.3testing / v1.3.3extras
 

The Following User Says Thank You to No!No!No!Yes! For This Useful Post:
Posts: 208 | Thanked: 220 times | Joined on Apr 2010
#494
Originally Posted by gft2k1 View Post
sorry techie, thanks for your widget but i don't know how to change the checksum (i have made some modifications as you see) and i have copied the text there to copy-paste from my N900 but don't work.

Another thing: in your original script overclock don't work......
example: if i set ideal (850) then lock and unlock phone the temperature button is blue but the frequency is the same (850) and i still on ideal......

Thanks again for your job and sorry for my bad english......
Your checksum question has already been answered by No!No!No!Yes! You weren't supposed to change the import data but the code.In my download post I mentioned clearly how to change the 3 profiles,follow those instructions.

As for the second part of your question, sorry I didn't understand.To me it looks like its working perfectly.After device is unlocked the ideal profile is loaded with limits 500-850 (default).So whats the problem??
__________________
With Linux-powered N900..ANYTHING is possible
 
Posts: 195 | Thanked: 16 times | Joined on Feb 2010 @ Switzerland
#495
Originally Posted by gft2k1 View Post
sorry techie, thanks for your widget but i don't know how to change the checksum (i have made some modifications as you see) and i have copied the text there to copy-paste from my N900 but don't work.

Another thing: in your original script overclock don't work......
example: if i set ideal (850) then lock and unlock phone the temperature button is blue but the frequency is the same (850) and i still on ideal......

Thanks again for your job and sorry for my bad english......
sorry for my english as well.. my problem is little bit the same.. I set the "top" clock as ideal with 250 - 850 and it works - but when I lock and unlock my phone there is a set the clock back to 250 - 500 why this guys.. thx for your feedbacks...
__________________
(n900 _Switzerland)
 
Posts: 353 | Thanked: 263 times | Joined on Dec 2009 @ Finland
#496
Originally Posted by No!No!No!Yes! View Post
Have you checked position of images and visibility?
Is directory correct?
Refer to wiki for relevant settings.
There isn't position or visibility setting for exit status images or have I missed something? And I have checked wiki and dice roll example, no help there.

EDIT: Oh now I got it. Didn't realize that I had to set the result position since there was different image.
__________________
My Maemo5 projects:
mSpede - Speed testing game | Them Bloody Ducks - 2D duck hunting game | Maetronome - A simple metronome app | CuteMPC - MPD client

Last edited by TNiga; 2010-07-28 at 22:04.
 
Posts: 208 | Thanked: 220 times | Joined on Apr 2010
#497
Originally Posted by PipoXtreme View Post
sorry for my english as well.. my problem is little bit the same.. I set the "top" clock as ideal with 250 - 850 and it works - but when I lock and unlock my phone there is a set the clock back to 250 - 500 why this guys.. thx for your feedbacks...
Seems that the dbus signal for unlocking is missed and not captured by the widget, though I don't see any reason for that.Maybe you lock and unlock quickly.Try unlocking with the power button too.Also make sure you made the overclock script executable.
__________________
With Linux-powered N900..ANYTHING is possible
 
Posts: 195 | Thanked: 16 times | Joined on Feb 2010 @ Switzerland
#498
Originally Posted by techie View Post
Also make sure you made the overclock script executable.
???
executable -> chmod ?!
That I`ve done before the installation of the widget.

this is my export and screenshot...

[queen-beecon-header]
version=1.000000
checksum=23407278
[queen-beecon-exported-instance]
widgetType=1
widgetVisible=1
operationalStatus=0
hideCanvas=false
snippetBgRGB=0
snippetExtBgRGB=#000000000000
beecon_lt0_ImgZoom=0
beecon_lt0_BgRGB=2
beecon_lt0_ExtBgRGB=#808080808080
beecon_lt0_ImgFilename=queen-beecon-syserr.png
beecon_eq0_ImgZoom=0
beecon_eq0_BgRGB=3
beecon_eq0_ExtBgRGB=#0000ffff0000
beecon_eq0_ImgFilename=queen-beecon-appok.png
beecon_eq1_ImgZoom=0
beecon_eq1_BgRGB=4
beecon_eq1_ExtBgRGB=#ffffffff0000
beecon_eq1_ImgFilename=queen-beecon-appwrn.png
beecon_ge2_ImgZoom=0
beecon_ge2_BgRGB=5
beecon_ge2_ExtBgRGB=#ffff00000000
beecon_ge2_ImgFilename=queen-beecon-apperr.png
beecon_idxge2_ImgZoom=0
beecon_idxge2_BgRGB=11
beecon_idxge2_ExtBgRGB=#0000ffffffff
beecon_idxge2_ImgFilename=queen-beecon-index.png
widWidth=190.73667711598748
widHeight=107.25
instanceTitle=OC Control Panel
instanceCmd=Name_Profile_1=ideal\nName_Profile_2=d efault\nDisp_Name_Profile_2=STOCK\nName_Profile_3= lv_ideal_1100\nDisp_Name_Profile_3=IDEAL\nif [ $QBW_EXEC_REASON == "QBW_TIMER_UPDATE" ] ; then \n if [ "$QBW_REMEMBER_ME" = locked ] ; then\n exit 0\n fi\n if [ "$QBW_REMEMBER_ME" != fixed ] ; then\n rootsh /usr/local/bin/overclock > /dev/null;\n fi\nelif [ $QBW_EXEC_REASON == "QBW_DBUS_MONITOR" ] ; then\n echo '$QBW_DBUS_VERBOSE_OUTPUT' > /home/user/.QBW_DBUS_TEMP ;\n if [ $(awk '/string/ {print $2}' /home/user/.QBW_DBUS_TEMP) = "\\"locked\\"" ] ; then\n rootsh /usr/local/bin/underclock > /dev/null\n run-standalone.sh dbus-send --session --type=method_call --dest=oh.no.more.qbw /oh/no/more/qbw$QBW_ID oh.no.more.qbw.set_param_string string:"rememberMe" string:locked string:""\n exit 0\n elif [ $(awk '/string/ {print $2}' /home/user/.QBW_DBUS_TEMP) = "\\"unlocked\\"" ] ; then\n rootsh /usr/local/bin/overclock > /dev/null \n run-standalone.sh dbus-send --session --type=method_call --dest=oh.no.more.qbw /oh/no/more/qbw$QBW_ID oh.no.more.qbw.set_param_string string:"rememberMe" string:unlocked string:""\n run-standalone.sh dbus-send --session --type=method_call --dest=oh.no.more.qbw /oh/no/more/qbw$QBW_ID oh.no.more.qbw.set_param_string string:"resImgFilename" string:smart.png string:"" \n fi\nelif [ $QBW_EXEC_REASON == "QBW_CLICK" ] ; then \n if [ $QBW_HOTSPOT_PRESS -eq "1" -o $QBW_HOTSPOT_PRESS -eq 2 -o $QBW_HOTSPOT_PRESS -eq 3 ] ; then\n rootsh kernel-config load $Name_Profile_1 > /dev/null\n rootsh /usr/local/bin/overclock > /dev/null;\n run-standalone.sh dbus-send --session --type=method_call --dest=oh.no.more.qbw /oh/no/more/qbw$QBW_ID oh.no.more.qbw.set_param_string string:"resImgFilename" string:smart.png string:""\n elif [ $QBW_HOTSPOT_PRESS -eq 4 -o $QBW_HOTSPOT_PRESS -eq 7 ] ; then\n rootsh kernel-config load $Name_Profile_2 > /dev/null\n run-standalone.sh dbus-send --session --type=method_call --dest=oh.no.more.qbw /oh/no/more/qbw$QBW_ID oh.no.more.qbw.set_param_string string:"rememberMe" string:fixed string:""\n run-standalone.sh dbus-send --session --type=method_call --dest=oh.no.more.qbw /oh/no/more/qbw$QBW_ID oh.no.more.qbw.set_param_string string:"resImgFilename" stringrofile2.png string:""\n elif [ $QBW_HOTSPOT_PRESS -eq 6 -o $QBW_HOTSPOT_PRESS -eq 9 ] ; then\n rootsh kernel-config load $Name_Profile_3 > /dev/null\n run-standalone.sh dbus-send --session --type=method_call --dest=oh.no.more.qbw /oh/no/more/qbw$QBW_ID oh.no.more.qbw.set_param_string string:"rememberMe" string:fixed string:""\n run-standalone.sh dbus-send --session --type=method_call --dest=oh.no.more.qbw /oh/no/more/qbw$QBW_ID oh.no.more.qbw.set_param_string string:"resImgFilename" stringrofile3.png string:""\n fi\nfi\necho -e "TEMPERATURE : <span font = \\"14\\"><b>`cat /sys/class/power_supply/bq27200-0/temp` C</b></span>\\n<span font = \\"16\\"><b>`awk '{print $1/1000"MHz"}' /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq` - `awk '{print $1/1000"MHz"}' /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq`</b></span>";echo -e "<span font = \\"18\\"><b><i>$Disp_Name_Profile_2 $Disp_Name_Profile_3</i></b></span>";echo "BATTERY : <span font = \\"14\\"><b>`hal-device bme | awk '/l.p/ {perc = $3}; /s_c/ {isch = $3} END if (isch == "false") {print perc" %"} else {print "Chrg"}'`</b></span>"\n
rememberMe=unlocked
cmdImgFilename=queen-beecon.png
cmdImgZoom=0
cmdFgRGB=1
cmdExtFgRGB=#ffffffffffff
cmdTextAngle=0
cmdVisibilityPosition=0
cmdImgVisibilityPosition=0
cmdJustify=0
cmdExtFont=Nokia Sans bold italic 12
cmdFontName=3
cmdFontSize=12
resImgFilename=smart.png
resImgZoom=0
resFgRGB=1
resExtFgRGB=#ffffffffffff
resTextAngle=0
resVisibilityPosition=2
resImgVisibilityPosition=2
resJustify=2
resExtFont=Nokia Sans 12
resFontName=2
resFontSize=12
progressAnimationFrames=4
progressAnimationTimer=4
progressAnimationPos=4
progressAnimationBasename=queen-beecon-progress
updOnStartup=true
updOnClick=true
updOnDesktop=false
updOnSight=false
delayIndex=3
customIntervalSecs=0
updNeworkPolicy=0
updOnDBUS=1
updOnDBUSBus=0
updOnDBUSMatchRule=type='signal',path='/com/nokia/mce/signal',interface='com.nokia.mce.signal',member='t klock_mode_ind'
Attached Images
 
__________________
(n900 _Switzerland)

Last edited by PipoXtreme; 2010-07-29 at 09:39.
 
Posts: 1,751 | Thanked: 844 times | Joined on Feb 2010 @ Sweden
#499
Originally Posted by TNiga View Post
Hi,

I'm making my own fm transmitter widget to match the looks of my other widgets on desktop, and I use this script with QB:
Code:
#!/bin/bash

STATE="`fmtx_client | grep state`"
if [ $STATE = "state=disabled" ]; then
        fmtx_client -p1
        fm-boost
        exit 0
elif [ $STATE = "state=enabled" ]; then
        fmtx_client -p0
        exit 5
fi
What I'm trying to do in QB is show image fmtx_on.png when exit status is 0 and fmtx_off.png.5 (I have written "fmtx_off.png" in the >=3 image) when exit status is 5, but for some reason widget shows no images at all. I know that exit statuses are recognised correctly since the background color changes but no images are shown. What could be wrong?
I used this script to do it. It's the golden radio in the screendump.

Code:
/usr/bin/fmtx_client -p$(if [ $(cut -d. -f1 /proc/uptime ) -lt 100 ]; then echo 0; else /usr/bin/fmtx_client | /bin/grep -q '^state=enabled' ; echo $? ; fi) | /usr/bin/awk -F "=" '($1=="state") {print $2}'
Edit: Ohh.. you wanted the image to change. Sorry. This would not do that.

source: http://wiki.maemo.org/Desktop_Comman...able.2Fdisable
Attached Images
 

Last edited by AlMehdi; 2010-07-29 at 10:35.
 
Posts: 208 | Thanked: 220 times | Joined on Apr 2010
#500
Originally Posted by PipoXtreme View Post
member='t klock_mode_ind'
Is that how it is in your code.There shouldn't be any space between "t" and "k", its "tklock...."
__________________
With Linux-powered N900..ANYTHING is possible
 
Reply


 
Forum Jump


All times are GMT. The time now is 22:35.