maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   FM transmitter status (N900) (https://talk.maemo.org/showthread.php?t=90794)

macey 2013-07-21 09:42

FM transmitter status (N900)
 
Hello, so I can turn on the FM transmitter with one tap on an icon
via /usr/bin/fmtx_client -p 1. I want to be able to turn the transmitter
OFF with the same icon. I want to know if there is a way to query the
transmitter status so I can just code a toggle function.

sixwheeledbeast 2013-07-22 12:14

Re: FM transmitter status (N900)
 
Have you looked at the Queen Beecon Widget pages or the sources of desktop plugins that are already available?

Can you not use the hildon-status-menu to toggle this on and off.
If using CSSU this can be set to always shown in the menu.

nieldk 2013-07-22 12:30

Re: FM transmitter status (N900)
 
Quote:

Originally Posted by sixwheeledbeast (Post 1360951)
Have you looked at the Queen Beecon Widget pages or the sources of desktop plugins that are already available?

Can you not use the hildon-status-menu to toggle this on and off.
If using CSSU this can be set to always shown in the menu.

Use this with QBW
Code:

result=$( /usr/bin/fmtx_client -p$( /usr/bin/fmtx_client | /bin/grep -q  '^state=enabled' ; echo $? ) | /usr/bin/awk -F '=' '($1=="state") {print  $2}' ); echo $result; [ $result = "enabled" ]

rotoflex 2013-07-23 05:37

Re: FM transmitter status (N900)
 
There used to be a desktop widget with on/off icons for the FM transmitter & bluetooth (as well as up/down freq adjustment buttons for the FM transmitter).

I had it on my desktop & it worked very well, but it didn't come back after the last reflash. I can't remember what it was called, but it came from maemo.org

Edit:
Here it is, Friendly FM. Is this sort of what you're looking for? Has a button to toggle the FM transmitter on & off.

http://talk.maemo.org/showthread.php?t=70619

macey 2013-08-09 09:11

Re: FM transmitter status (N900)
 
This is the (very easy) answer:-

Code:

[ -f /home/user/fmon.txt ] &&  /usr/bin/fmtx_client -p 0 && rm /home/user/fmon.txt && exit 0
/usr/bin/fmtx_client -p 1 >/home/user/fmon.txt

Don't need a "widget", just a very simple bit of code:D:D


All times are GMT. The time now is 12:49.

vBulletin® Version 3.8.8