[Q] how to convert wind direction degree - Zooper Widget General

how do I convert the degree to n/s/e/w direction?

Use the if condition
dilldoe said:
how do I convert the degree to n/s/e/w direction?
Click to expand...
Click to collapse
Try using the conditionals... Something like:
Code:
$(#WCWDIR#-45)>=0&&(#WCWDIR#-45)<90?N$
$(#WCWDIR#-45)>=90&&(#WCWDIR#-45)<180?W$
$(#WCWDIR#-45)>=180&&(#WCWDIR#-45)<270?S$
$(#WCWDIR#-45)>=270&&(#WCWDIR#-45)<360?E$
In this case I put wind degree -45 to make it so that each of the four quadrants equal a cardinal point, considering north between 45⁰~135⁰ and getting rid of a condition where east is between 315⁰~45⁰ (turning it into 270 and 360). I guess you could also break it into more intervals for NW or NWW if you wanted, but then the code conditional will grow considerably.
Let me know if it worked for you, or if you have any further doubts =]
PS: make sure all the code is put on the same line, so avoid weird spacings.

worked for me!
I'm not the original poster but wanted you to know this worked for me. Thank you!

Here's the conditionals to display all of the cardinal points
(N, NNE, NE, ENE, E, ESE, SE, SSE, S, SSW, SW, WSW, W, WNW, NW, NNW)
Comment if you see an error and I'll correct it.
Changes: added $#WCWDIR#=0?N$
Code:
$#WCWDIR#=0?N$$#WCWDIR#>348.75&&#WCWDIR#<11.25?N$$#WCWDIR#>11.25&&#WCWDIR#<33.75?NNE$$#WCWDIR#>33.75&&#WCWDIR#<56.25?NE$$#WCWDIR#>56.25&&#WCWDIR#<78.75?ENE$$#WCWDIR#>78.75&&#WCWDIR#<101.25?E$$#WCWDIR#>101.25&&#WCWDIR#<123.75?ESE$$#WCWDIR#>123.75&&#WCWDIR#<146.25?SE$$#WCWDIR#>146.25&&#WCWDIR#<168.75?SSE$$#WCWDIR#>168.75&&#WCWDIR#<191.25?S$$#WCWDIR#>191.25&&#WCWDIR#<213.75?SSW$$#WCWDIR#>213.75&&#WCWDIR#<236.25?SW$$#WCWDIR#>236.25&&#WCWDIR#<258.75?WSW$$#WCWDIR#>258.75&&#WCWDIR#<281.25?W$$#WCWDIR#>281.25&&#WCWDIR#<303.75?WNW$$#WCWDIR#>303.75&&#WCWDIR#<326.25?NW$$#WCWDIR#>326.25&&#WCWDIR#<348.75?NNW$

tekwyzrd said:
Here's the conditionals to display all of the cardinal points
(N, NNE, NE, ENE, E, ESE, SE, SSE, S, SSW, SW, WSW, W, WNW, NW, NNW)
Comment if you see an error and I'll correct it.
Code:
$#WCWDIR#>348.75&&#WCWDIR#<11.25?N$$#WCWDIR#>11.25&&#WCWDIR#<33.75?NNE$$#WCWDIR#>33.75&&#WCWDIR#<56.25?NE$$#WCWDIR#>56.25&&#WCWDIR#<78.75?ENE$$#WCWDIR#>78.75&&#WCWDIR#<101.25?E$$#WCWDIR#>101.25&&#WCWDIR#<123.75?ESE$$#WCWDIR#>123.75&&#WCWDIR#<146.25?SE$$#WCWDIR#>146.25&&#WCWDIR#<168.75?SSE$$#WCWDIR#>168.75&&#WCWDIR#<191.25?S$$#WCWDIR#>191.25&&#WCWDIR#<213.75?SSW$$#WCWDIR#>213.75&&#WCWDIR#<236.25?SW$$#WCWDIR#>236.25&&#WCWDIR#<258.75?WSW$$#WCWDIR#>258.75&&#WCWDIR#<281.25?W$$#WCWDIR#>281.25&&#WCWDIR#<303.75?WNW$$#WCWDIR#>303.75&&#WCWDIR#<326.25?NW$$#WCWDIR#>326.25&&#WCWDIR#<348.75?NNW$
Click to expand...
Click to collapse
excellent work mate
Rockin it from my Blue Chrome Themed Deadly Venom SS 3.0.2 NC1 S4 (team: @Venom0642 @ted77usa @rebel1699) ~ 20GB free cloud https://copy.com?r=vtiraF

tekwyzrd said:
Here's the conditionals to display all of the cardinal points
(N, NNE, NE, ENE, E, ESE, SE, SSE, S, SSW, SW, WSW, W, WNW, NW, NNW)
Comment if you see an error and I'll correct it.
Code:
$#WCWDIR#>348.75&&#WCWDIR#<11.25?N$$#WCWDIR#>11.25&&#WCWDIR#<33.75?NNE$$#WCWDIR#>33.75&&#WCWDIR#<56.25?NE$$#WCWDIR#>56.25&&#WCWDIR#<78.75?ENE$$#WCWDIR#>78.75&&#WCWDIR#<101.25?E$$#WCWDIR#>101.25&&#WCWDIR#<123.75?ESE$$#WCWDIR#>123.75&&#WCWDIR#<146.25?SE$$#WCWDIR#>146.25&&#WCWDIR#<168.75?SSE$$#WCWDIR#>168.75&&#WCWDIR#<191.25?S$$#WCWDIR#>191.25&&#WCWDIR#<213.75?SSW$$#WCWDIR#>213.75&&#WCWDIR#<236.25?SW$$#WCWDIR#>236.25&&#WCWDIR#<258.75?WSW$$#WCWDIR#>258.75&&#WCWDIR#<281.25?W$$#WCWDIR#>281.25&&#WCWDIR#<303.75?WNW$$#WCWDIR#>303.75&&#WCWDIR#<326.25?NW$$#WCWDIR#>326.25&&#WCWDIR#<348.75?NNW$
Click to expand...
Click to collapse
only one I have run across... when the wind is calm... nothing shows
Rockin it from my Blue Chrome Themed Deadly Venom SS 3.0.2 NC1 S4 (team: @Venom0642 @ted77usa @rebel1699) ~ 20GB free cloud https://copy.com?r=vtiraF

Thanks!
I had my widget set up with a rich text item that includes
Wind: WINDDIRECTION #WCWSPEED#
note: I substituted WINDDIRECTION for the string of conditionals above for readability.
Try
$#WCWSPEED#>1.0?#WCWSPEED#$$#WCWSPEED#<1.0?Calm$ in place of #WCWSPEED#
Tested by setting < and > values above and below the wind speed in my area. Values above set value display in mph and speeds below set value display as Calm.

tekwyzrd said:
Thanks!
I had my widget set up with a rich text item that includes
Wind: WINDDIRECTION #WCWSPEED#
note: I substituted WINDDIRECTION for the string of conditionals above for readability.
Try
$#WCWSPEED#>1.0?#WCWSPEED#$$#WCWSPEED#<1.0?Calm$ in place of #WCWSPEED#
Tested by setting < and > values above and below the wind speed in my area. Values above set value display in mph and speeds below set value display as Calm.
Click to expand...
Click to collapse
cool... but this was happenning with windspeeds of 3mph...
Rockin it from my Rockin Smartly Stock NC1 S4 (team: @Venom0642 @ted77usa @rebel1699) ~ 20GB free cloud https://copy.com?r=vtiraF

Hmmm... I'll have to think about that for a bit.
added $#WCWDIR#=0?N$ to the string
So, in rich text to display direction and speed its
Code:
$#WCWDIR#=0?N$$#WCWDIR#>348.75&&#WCWDIR#<11.25?N$$#WCWDIR#>11.25&&#WCWDIR#<33.75?NNE$$#WCWDIR#>33.75&&#WCWDIR#<56.25?NE$$#WCWDIR#>56.25&&#WCWDIR#<78.75?ENE$$#WCWDIR#>78.75&&#WCWDIR#<101.25?E$$#WCWDIR#>101.25&&#WCWDIR#<123.75?ESE$$#WCWDIR#>123.75&&#WCWDIR#<146.25?SE$$#WCWDIR#>146.25&&#WCWDIR#<168.75?SSE$$#WCWDIR#>168.75&&#WCWDIR#<191.25?S$$#WCWDIR#>191.25&&#WCWDIR#<213.75?SSW$$#WCWDIR#>213.75&&#WCWDIR#<236.25?SW$$#WCWDIR#>236.25&&#WCWDIR#<258.75?WSW$$#WCWDIR#>258.75&&#WCWDIR#<281.25?W$$#WCWDIR#>281.25&&#WCWDIR#<303.75?WNW$$#WCWDIR#>303.75&&#WCWDIR#<326.25?NW$$#WCWDIR#>326.25&&#WCWDIR#<348.75?NNW$ $#WCWSPEED#>1.0?#WCWSPEED#$$#WCWSPEED#<1.0?Calm$$#WCWSPEED#=0?Calm$
One continuous line with no line breaks, a space between the direction and speed, and its shorter than another version I saw posted. Specifically defining of 0 in speed and direction should fix problems noted above. Examples: NNW 15mph or for less than 1mph it would display NNW Calm and a direction degree reading of 0 and wind speed 0 displays as N Calm.

tekwyzrd said:
Hmmm... I'll have to think about that for a bit.
added $#WCWDIR#=0?N$ to the string
So, in rich text to display direction and speed its
Code:
$#WCWDIR#=0?N$$#WCWDIR#>348.75&&#WCWDIR#<11.25?N$$#WCWDIR#>11.25&&#WCWDIR#<33.75?NNE$$#WCWDIR#>33.75&&#WCWDIR#<56.25?NE$$#WCWDIR#>56.25&&#WCWDIR#<78.75?ENE$$#WCWDIR#>78.75&&#WCWDIR#<101.25?E$$#WCWDIR#>101.25&&#WCWDIR#<123.75?ESE$$#WCWDIR#>123.75&&#WCWDIR#<146.25?SE$$#WCWDIR#>146.25&&#WCWDIR#<168.75?SSE$$#WCWDIR#>168.75&&#WCWDIR#<191.25?S$$#WCWDIR#>191.25&&#WCWDIR#<213.75?SSW$$#WCWDIR#>213.75&&#WCWDIR#<236.25?SW$$#WCWDIR#>236.25&&#WCWDIR#<258.75?WSW$$#WCWDIR#>258.75&&#WCWDIR#<281.25?W$$#WCWDIR#>281.25&&#WCWDIR#<303.75?WNW$$#WCWDIR#>303.75&&#WCWDIR#<326.25?NW$$#WCWDIR#>326.25&&#WCWDIR#<348.75?NNW$ $#WCWSPEED#>1.0?#WCWSPEED#$$#WCWSPEED#<1.0?Calm$$#WCWSPEED#=0?Calm$
One continuous line with no line breaks, a space between the direction and speed, and its shorter than another version I saw posted. Specifically defining of 0 in speed and direction should fix problems noted above. Examples: NNW 15mph or for less than 1mph it would display NNW Calm
Click to expand...
Click to collapse
nice. Thanks!
Rockin it from my Rockin Smartly Stock NC1 S4 (team: @Venom0642 @ted77usa @rebel1699) ~ 20GB free cloud https://copy.com?r=vtiraF

This is my take on the cardinal point conditionals to save on coding. Instead of having 16 conditions, I have overlaps to create 3rd-tier cardinals from 1st-tier and 2nd-tier cardinal combos. For example NNE is created from N + NE. So only 8 conditions are needed:
Code:
$#WCWDIR#>326.25||#WCWDIR#<33.75?N$$#WCWDIR#>56.25&&#WCWDIR#<123.75?E$$#WCWDIR#>146.25&&#WCWDIR#<213.75?S$$#WCWDIR#>236.25&&#WCWDIR#<303.75?W$$#WCWDIR#>11.25&&#WCWDIR#<78.75?NE$$#WCWDIR#>101.25&&#WCWDIR#<168.75?SE$$#WCWDIR#>191.25&&#WCWDIR#<258.75?SW$$#WCWDIR#>281.25&&#WCWDIR#<348.75?NW$
tekwyzrd said:
Here's the conditionals to display all of the cardinal points
(N, NNE, NE, ENE, E, ESE, SE, SSE, S, SSW, SW, WSW, W, WNW, NW, NNW)
Comment if you see an error and I'll correct it.
Changes: added $#WCWDIR#=0?N$
Code:
$#WCWDIR#=0?N$$#WCWDIR#>348.75&&#WCWDIR#<11.25?N$$#WCWDIR#>11.25&&#WCWDIR#<33.75?NNE$$#WCWDIR#>33.75&&#WCWDIR#<56.25?NE$$#WCWDIR#>56.25&&#WCWDIR#<78.75?ENE$$#WCWDIR#>78.75&&#WCWDIR#<101.25?E$$#WCWDIR#>101.25&&#WCWDIR#<123.75?ESE$$#WCWDIR#>123.75&&#WCWDIR#<146.25?SE$$#WCWDIR#>146.25&&#WCWDIR#<168.75?SSE$$#WCWDIR#>168.75&&#WCWDIR#<191.25?S$$#WCWDIR#>191.25&&#WCWDIR#<213.75?SSW$$#WCWDIR#>213.75&&#WCWDIR#<236.25?SW$$#WCWDIR#>236.25&&#WCWDIR#<258.75?WSW$$#WCWDIR#>258.75&&#WCWDIR#<281.25?W$$#WCWDIR#>281.25&&#WCWDIR#<303.75?WNW$$#WCWDIR#>303.75&&#WCWDIR#<326.25?NW$$#WCWDIR#>326.25&&#WCWDIR#<348.75?NNW$
Click to expand...
Click to collapse

Related

HTC Calculator giving wrong results

Hi
I love my desire. The HTC calculator is nice with the finger friendly buttons with haptic feedback, and I love the fact it's respecting the operator priorities. But what's wrong with the calculator?
100 - 99,9 = 0,09999999999999999
100 - 99,8 = 0,2
100 - 99,7 = 0,2999999999
100 -99,6 = 0,4
100 - 99,5 = 0,5
100 - 99,4 = 0,599999999
100 - 99,3 = 0,7
100 - 99,2= 0,7999999999
100 - 99,1 = 0,9
is this a known issue?
Do you know another calculator where you can review all the line you typed and correct it if needed, that has big buttons, has parenthesis, and that give accurate results? I used to use HiCalc on WinMo, but I can't seem to find a good substitute on android.
Turn the phone to landscape and more functions are available like parentheses. Not sure about your other points!
funny - i needed this calculator for my school time
100 - 99,2= 0,7999999999
i have same result
br stupsi
stupsi99 said:
100 - 99,2= 0,7999999999
Click to expand...
Click to collapse
Google floating point precision
nparley said:
Google floating point precision
Click to expand...
Click to collapse
Most likely this.
And I use RealCalc which seems to correct for it.
This is mad.
My calculated is screwed too. Lol
Sent from my HTC Desire using XDA App
Why are you putting commas in not decimal points? 99.7 not 99,7
^^^^ Other people in the world write things differently to us
ok...this is new...lol
do you guys think a solution is possible? or should we all get another calculator?lol
You need to get another calculator.
Seems that HTC's calculator is using floating point rather than fixed point or decimal floating point.
Regards,
Dave
it is also a problem on the Vanilla calculator.
I'm using OpenDesire and it also has this problem.
bedeabc said:
^^^^ Other people in the world write things differently to us
Click to expand...
Click to collapse
they might, but if the calculator is configured to work with points not commas I'm not surprised it fails
Edit
Wrong! Is the same with points as commas. My bad
When we use the calculator we press the . button, as there is no comma.
FYI when in the UK you write 1,002.50 the rest of the world writes 1 000,50.
HTC answered me to find another calculator on the maket, cause the HTC calculator is a basic one. LMAO I know it won't solve complex equations, but 100 - 99.9 should be solved by any basic calculator, even by a 7 year old pupil...so I guess it should be solved by a calculator that displays basic trigonometry buttons, shouldn't it?
It fails with points as well.
100-99.9=0.0999999999
So it's not a localisation thing, it's just a rubbish calculator.
This happens to any substraction having the following pattern:
n-((n-1)+p), where p = {0.9, 0.7, 0.4, 0.2}
And it doesn't matter whether the Calculator uses '.' or ',' for digits.
Very strange...
Benj555 said:
FYI when in the UK you write 1,002.50 the rest of the world writes 1 000,50.
Click to expand...
Click to collapse
That depends on your definition of the rest of the world.
The two most populous nations on the planet, namely China and India, use the point as the decimal separator, as does the US, Japan, and most of the ex-British empire.
For the most part, the "Decimal Comma" is in use in mainland Europe and most of South America.
Regards,
Dave
Benj555 said:
When we use the calculator we press the . button, as there is no comma.
FYI when in the UK you write 1,002.50 the rest of the world writes 1 000,50.
Click to expand...
Click to collapse
The 'rest of the world' write: 1.000,50 (they use the '.' to group thousands - e.g. 154.234.345,243)
nparley said:
Google floating point precision
Click to expand...
Click to collapse
Don't see why floating point should have anything to do with this. Floating point is relevant where there is a greater number of digits required to do the calculation than would normally be displayed. This is a simple subtraction of a number with one decimal place. This is just plain wrong!
norm2002 said:
Don't see why floating point should have anything to do with this. Floating point is relevant where there is a greater number of digits required to do the calculation than would normally be displayed. This is a simple subtraction of a number with one decimal place. This is just plain wrong!
Click to expand...
Click to collapse
nparley is correct.
Whomever wrote the HTC calc app used binary floating point data types. The subtraction is being performed "correctly" within the limitations imposed by the use of that data type. 0.1 cannot be exactly represented by that data type, which is why this issue shows up.
Regards,
Dave
No, in the UK we would use . to indicate decimal and , to indicate thousands. Which I think is standard?

Fairphone - Technical details, links and Q&A interaction with Fairphone [26 Jul 2014]

Fairphone - Technical details, links and Q&A interaction with Fairphone [26 Jul 2014]
Thread link
Announcement​21 Jun 2014: Added a 60 days poll. Just for your information, your vote and choice is public.
03 Apr 2014: iFixit released one of their famous teardowns for the Fairphone and Fairphone sells spare parts. BAM!!! Greets and thanks to Miro from iFixit.
23 Mar 2014: Added pictures from opening the device to clean the dusty back side of the photo camera lens.
31 Jan 2014: We have our own Fairphone Forum. That's really grand.
25 Jan 2013: Added two links. First, the unoffical FairPhone Users Forum and Fairphone at XDA Developers Wiki.
19 Jan 2014: Added a lot of links recently. Today I want to point you to a petition to get AOSP Support for MediaTek Devices (thanks to @Donat.Callens)
09 Jan 2014: Hid some larger content to get a better structure in the OP. By clicking the buttons you can recover the content. Added a link to the download section on the official Fairphone website for the "FP1" (indicates that there will be a FP2?).
05 Jan 2014: Added a new section "Apps" due to a new app coming up, Fairphone Launcher by LuLeBe
Older announcements
Fairphone - The Technical Details And Links
The Fairphone - technical details, weblinks and other stuff
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
First of all - read the story behind the Fairphone to know, why it's fair and what it is all about.
Official Fairphone website​Fairphone Spare Parts
Fairphone accessories - Case (black)
Fairphone Tutorial - Getting you started with your Fairphone (video tutorials)
Downloads for the FP1: Repair form, Fariphone OS, Stock Android, source code packages, 3D files (CAD), Graphic Design and user guide
The story behind the Fairphone
Technical specifications
The FAQs
Download the Fairphone Press Kit (30-10)
The Fairphone shop
More weblinks​iFixit: Fairphone
Requests to Fairphone
Fairphone at XDA Developers Wiki
unoffical FairPhone Users Forum (English forum)
Fairphone Freunde (German forum)
Petition: AOSP Support for MediaTek Devices[/B]
Loco Toys Blog
Fairphone OS on GitHub (incl. FairPhoneHome and FairPhonePeaceOfMind)
Kwamecorp, the company who creates the Fairphone OS
AOSP Support for MediaTek Devices (Petition)
Fairphone on Google+
WeAreFairphone FairPhone Fans Users & Enthusiasts (G+ community)
Fairphone on Vimeo
Fairphone on Twitter
Fairphone on Facebook
Fairphone on Flickr
Articles, reviews, videos, images...​[08 Jan 2014] Glückliches Smartphone aus fairem Anbau (golem.de, German)
[03 Jan 2014] Fairphone im Praxis-Test: Smartphone fürs gute Gewissen (Computer Bild, German)
[03 Jan 2014] Kommentar: Das Fairphone ist gut genug (heise online, German)
[Update 3.1.2014; 02 Jan 2014] Fairphone im Kurztest (c't, German)
[03 Jan 2014] Fairphone: Öko-Handy im ersten Eindruck (Computer Bild, German)
Apps, widgets, themes, software​Fairphone Launcher on Google Play by LuLeBe
Peace of Mind+, A fork of Fairphone's app by mudar1488. Find out more on Google Play, GitHub, development website, XDA portal
Known issues​
Serial number: It seems that the serial number is not a valid serial number, but the standard number 0123456789ABCDEF (solution below)
Google Maps API: Apps which take advantage of the Google Maps API are currently incompatible with the Fairphone (e.g. DB Navigator, Öffi - Fahrplanauskunft) (solution below)
Device wiggles: If you touch the device if its laying on a flat surface, it wiggles unacceptably. The reason is the popping out speaker grill on the bottom right and the camera and LED module at the top left, both on the backside.
1 GB limit for apps: There is a limit of 1 GB for app installation. Of course, you can move installations to the SD card or use managing apps like Link2SD[/URL. Learn more on the [URL="https://fairphone.zendesk.com/hc/en-us/articles/201154666-How-can-I-see-all-the-different-places-where-information-is-stored-on-my-phone-SD-Card-Internal-Storage-and-Phone-Storage-"]official support page (thanks to haiag)
Mods, hacks, solutions​
Please keep in mind, that you are using this at your own risk and may void your warranty.
Power measurements by globuli (original post)
I finally got around to do more extensive power measurements (video with more detailed info to follow).
Everything is done with the display (when on) on lowest brightness, I have not looked into the effect of brightness on the consumption, hopefully next week. Also: the measuring equipment is self-built, so don't bet your money on my findings. The current was measured in 10 ms steps, then send through a rolling average. In theory anything could happen in between the 10 ms, and the consumption pattern suggests very short bursts of current. In brackets the time to live, if the battery delivers exactly 2000mAh
Display off, nothing to do in the background: basically below our precision, somewhere at 2mA (1000h), but I mean nothing to do
Display on, nothing to do: 85 mA (23.5h)
Video playback: ~160mA (12.5h)
Incoming call 3G (with MP3 ringtone, vibrator, the works): > 410 mA (<4.8h), sorry, the measurement equipment clipped at 430mA
Talking on 3G: 230 mA (8.7h)
Incoming call 2G: (MP3, vibrator): >370 mA (5.4h), again, clipping involved, but clearly less than 3G
Talking on 2G: 140 mA (14.3h)
With Z-Device-Test I tried other components as well, one interesting thing was that the flashlight apparently can only be switched on when the main camera module is active as well. BTW: the changing of the advertisement on the bottom of Z-Device Test costs ~30mA.
Main camera on (with picture in the display): 235mA (8.5h)
Front camera on (with picture in the display): 195mA (10.2h)
Vibrator: ~60 mA
Flashlight: ~50 mA
GPS costs next to nothing, when trying different applications, GPS on or off seemingly made a difference of ~10mA, all power measurements here mainly showed costs for drawing pictures. Bluetooth similar, as long as the component is only on, but no pairing or other activity happens, next to nothing.
Heise wrote in their short test that in their measurements they assumed 7.1 hours of video playback, which would result to 281 mA. But at least with XVID and MP4 I could not make the Fairphone take more then 180 mA peak. No idea what the reason for that is, but as they explained, they emptied the battery to half it's capacity, but who knows how they deemed this "half". And our equipment surely is not off by 100 mA.
Click to expand...
Click to collapse
Lowering the volume by MoreThanADev (original post)
I agree with you the speaker is too loud by default.
Here is the way to configure it without installing apps.
1) Enter Mediateck EngineerMode by calling *#*#3646633#*#* /!\ you can mess up your conf, be carefull not to randomly click on every button
2) Swipe to the right to Hardware Testing
3) Enter submenu Audio
4) Select LoudSpeaker Mode
5) in Type list, change Ring with Media
*Here i try to explain (with my poor english, and my poor explaining skills) how to adjust the sounds setting that best fits you, skip to 6) for a no brain guide*
This is the place of the sound settings for musics, movies and apps.
On the page you have a field Level which enables you to pick levels from 0 to 6
and a field Value where you can put a number.
Levels corresponds to a fillness of the sound bar, so with default configuration, almost empty sound barre correspond to the level 0 and to the lowest sound of your phone.
If you want to change the sound volume for the almost empty sound bar, select Level 0 and change number in the field value (lower number => lower sound)
If you want to change the sound volume for bar filled at 1/6th change the value for Level 1 etc
The value I putted there were:
6)
a)Select Level 0 and put 80 in Value field then press the Set button on the Value field line.
b)Select Level 1 and put 110 in Value field then press the Set button on the Value field line.
c)Select Level 2 and put 130 in Value field then press the Set button on the Value field line.
d)Select Level 3 and put 150 in Value field then press the Set button on the Value field line.
e)Select Level 4 and put 170 in Value field then press the Set button on the Value field line.
f)Select Level 5 and put 200 in Value field then press the Set button on the Value field line.
g)Select Level 6 and put 240 in Value field then press the Set button on the Value field line.
7) Test your sound, if it fits you, go to 8, else read the text you skipped after 5
8) Restart (might not be necessary but, who knows ), or if you don't restart makes sur to close the EngineerMode so you won't mess up with your conf by accident.
That seemed to work whithout breaking anythings with my phone, and hopefully it will with yours
Click to expand...
Click to collapse
Gesture typing - Official Google Keyboard for the Fairphone
Gesture typing aka swipe is not available on your Fairphone keyboard? No problem!
As we figured out, the Google Keyboard from Google Play is not compatible with the Fairphone. But you can install the apk directly from the thread [APK] Official Google Keyboard.
After the download, follow following instruction:
1. Go to Settings -> Security -> activate Unknown sources
2. Scroll down the notification drawer and tap on the icon of the downloaded Google Keyboard apk
3. Go to Settings -> Language & input -> activate the Google Keyboard.
Done
Click to expand...
Click to collapse
Xposed solutions
The Xposed framework is known for its very good customization abilities.
One of the famous modules is GravityBox. With it we were able to solve some issues.
Volume slider interrupts system
Sometimes changing the volume interrupts the system, because the volume slider won't disappear. The system is inoperable. Switching display on/off can help as well as a system reboot. Use the extended volume sliders from GravityBox.
Unused SIM slot notification
If you have only inserted one SIM, you get an icon in the status bar. You can hide this notification with GravityBox.
How to install GravityBox
First you have to download and install Xposed. In this app you can download GravityBox.
First: Download the Xposed Installer APK and install it
Launch the Xposed Installer, go to the "Framework" section and click on "Install/Update"
Reboot
Done!
Second: Download and install GravityBox, therefore open Xposed, go to download section and select GravityBox.
After that, enable the module by checking the checkbox in the modules section
Reboot
Done!
Click to expand...
Click to collapse
Serial number by fjxda (original post)
I saw that XPrivacy can fake the serial number for the apps you select (and you can even select that ONLY the serial is faked by Xprivacy, and ONLY for one app, so it has no side effects. And you can input your real serial number into XPrivacy if you want!).
With the correct serial number faked by Xprivacy, my favourite navigation app does now work fine.
Click to expand...
Click to collapse
[EDIT: You first need the XPosed framework to install XPrivacy afterwards.]
The open(ed) bootloader by fjxda (original post)
The bootloader is open.
I downloaded, modified an uploaded the boot.img and the phone did still boot, so it doesn't verify any signature of the boot image.
Hint: boot-image starts at /dev/bootimg
/dev/bootimg seems to point to a start address of internal memory but you can access the whole memory through it. So if you write something into, you can brick your whole phone and delete everything - probably.
The boot image is probably at most 0x600000 bytes large, afterwards recovery partition starts.
Command to retrieve the boot img:
dd if=/dev/boot of=/sdcard/boot.img bs=6291456 count=1
Tools to modifiy:
https://github.com/bgcngm/mtk-tools
After repacking, the boot.img will be smaller (verify!).
Then you can copy with dd if=/sdcard/boot1.img of=/dev/boot.img - on your own risk, better wait till official firmware image becomes available.
DON'T use cat on /dev/bootimg! Use dd.
Don't write more than 6291456 bytes or your recovery will be lost.
May be good Idea to backup recovery with
dd if=/dev/recovery of=/sdcard/recovery.img bs=6291456 count=1
If using mtk-tools - use a unix filesystem to extract into so that executed-rights within the initramfs of the boot-img don't get lost.
Click to expand...
Click to collapse
[EDIT: Made link clickable]
Google Maps API issues by MrJekyll (original post, this solution was verified as working by several XDA members)
0. (install terminal emulator)
EDIT: as imparted by Nicholas Evans in the Fairphone support forum, BusyBox is not necessary for this as the used programs are provided by Android itself.
1. get superuser rights (Start terminal emulator, type "su" and press enter, grant root priveledges if asked for)
2. remount your system-partition with write access (type "mount -o rw,remount /system" and enter)
3. change the permissions for the following files to rw-r-r:
/etc/permissions/com.google.android.maps.xml
/system/etc/permissions/com.google.android.maps.xml
/system/framework/com.google.android.maps.jar
(to do so, type "chmod 644 $file" and enter, replace $file with the filename and path as written above, do this for all three files)
4. remount system-partition read only (type "mount -o ro,remount /system" and enter)
5. close terminalemulator, delete appdata and updates for Google playstore and reboot. For me that was all.
Please have these instructions rewied by an experienced user/developer before using them, I will/can not guarantee for anything
Click to expand...
Click to collapse
Q&A discussion - You ask, Kwamecorp replies​First Fairphone OS version is based on Android 4.2.2
The widgets of Fairphone OS will be released as open source, they will be uninstallable and the system comes without bloatware. (I am really impressed!)
Q&A discussion - You ask, Fairphone replies​OSB-OTG is working with the Fairphone
Fairphone firmware updates possibly available OTA, updates will be available as long as possible, also stock Android available on launch. No tablet planned right now, currently focusing on the smartphone only. First prototypes not to be expected before October.
Front side Dragontrail Glass, backside cover to reveal the battery/SIM cards is silver steel, the rest made of plastic.
The navigation bar ("navbar") has capacitive buttons.
Technical specifications​
SoC: MediaTek MT6589 MT6589m
CPU: Cortex A7 (ARMv7) 1.2 GHz quad-core
GPU PowerVR SGX544 @ 286 MHz PowerVR SGX544 @ 156 MHz
Radios: 3G, HSPA+, TD-SCDMA, GSM850/900/1800/1900MHZ, WCDMA 900/2100MHz, no CDMA
WLAN: WIFI 2.4GHz 802.11b/g/n
Bluetooth: v2.1 + EDR / v3.0 + HS (802.11 AMP) / v4.0 LE
GPRS Class GPRS Class 12
EDGE Class Multi-Slot Class 12
Display: 960 × 540 pixel, 4,3" (qHD) LCD, 24 bit 16 Mio. colors, 256 ppi, capacitive protected by Dragontrail Glass
Camera: 8 megapixels, AF (stabilization + image sensor) 3264 × 2448 pixel, photo LED, multishot
Front facing camera: 1,3 megapixels
Video: 1280 x 720 pixel
Video Decode Format: MPEG4/H.264:[email protected] MPEG4/H.264:[email protected]
Video Encode Format: MPEG4/H.263:[email protected] MPEG4/H.263:[email protected] H.264:[email protected]
Audio Decode Format: WAV,MP3,MP2,AAC,AMR-NB,AMR-WB,MIDI,Vorbis,APE,AAC-plus v1,Aac-plus v2,FLAC,WMA
Audio Encode Format: AMR-NB,AMR-WB,AAC,OGG
Dual-SIM: yes, (Mini-SIM) Dual Stand-by SIM1: 2G SIM2: 3G, Standard format SIM (ID-000 format)
Internal memory 16 GByte
External memory: microSDHC up to 32 microSD (compatible SD, SDHC and SDXC types) (up to 64Gb)
RAM: 1 GByte
Battery: Li-Ion 2000 mAh, replaceable
HSDPA: 7,2 MBit/s
HSUPA: 5,7 MBit/s
UMTS: HSPA uplink cat 7 up to 11.5Mbps, downlink cat24 up to 42.2Mbps HSPA downlink cat 14 up to 21.1 Mbps
LTE -
NFC -
FM radio: yes
Light sensor: yes
G sensor: yes
E compass: yes
Proximity sensor: yes
GPS: yes
Glonass -
Gyroscope: yes
SAR rating (indication): 0.318 W/Kg 0.329 W/Kg (CE)
Dimensions & Weight: 123 x 64.5 x 10 mm 126 x 63.5 x 10 mm, 170 g
Android version: 4.2
Connector: Micro-USB
Earphone Jack ¢3.5
Release date: expected in 3th quarter 2013 December 2013 December 2013 / January 2014
Screenshots​
Teardown - Cleaning the backside of the camera lens cover
Opening metal backsided lid.
Removed battery, SIM card and micro SD card.
Close-up of the dusty camera lens cover.
After removing five screws, you can remove the frame which covers the circuit boards.
Removing the frame was a difficult and hard work, as it is clipped very tough and tight. If you have the right tools, don't be afraid, but still be careful.
Picture from inside after cleaning. The square black rubber around the lens cover does not protect well. It probably is just too thin.
Other than that, the whole circuit boards and all electronic components where dusty on the top of the device. Possible reasons: USB port, earphone jack, power button
Benchmarks
AnTuTu Benchmark 4.1.4, result: 13179
CF-Bench 1.3, result: 12960 (sorry for the volume slider)
Quadrant Standard Edition 2.1.1, result: 4824
Fairphone OS Screenshots
Beginning with a journey through some system setting screens.
Next up some memory screenshots an a switch on/off timer, I think for the automatic on/off scheduler.
System tool and Google Maps API
CPU-Z and an app for public transportation like DB Navigator. I did not find DB Navigator in the Store, but Öffi - Fahrplanauskunft was found on the Fairphone. As this app is similar to DB Navigator, it's not compatible due to recent mentioned problems with the Google Maps API. There is already a detailed solution for the Google Maps API issues by @MrJekyll.
Battery consumption
Videos​
FAIRPHONE UNBOXING HD
Alternative OS on Fairphone
Fair Lifestyle - Technology | Euromaxx
Dragontrail glass
Manufacturer: Asahi Glass Co.
Dragontrail details (PDF)
Information on Wikipedia
Incredible aMazing Dragontrail glass screen test for xiaomi m2 smartphone from ibuygou
Dragontrail VS the All-Stars
Great Thread!!! Thank you, I am subscribed!
Are these capacitive buttons (the main Android back, home and recent buttons)?
Deedend said:
Great Thread!!! Thank you, I am subscribed!
Click to expand...
Click to collapse
Perfect, thank you
Unrelashade said:
Are these capacitive buttons (the main Android back, home and recent buttons)?
Click to expand...
Click to collapse
I am not sure, but this might be capacitive buttons.
I also contacted the community manager of Fairphone, hope he or colleagues of him will join us asap for exactly those informations.
Hey, cool.
Thank you. :good:
You should like fairphone on Facebook. They publish updates on their work progress frequently.
Hope they will keep their schedule
Sent from my Xperia S using xda app-developers app
ElBarto1984 said:
You should like fairphone on Facebook. They publish updates on their work progress frequently.
Hope they will keep their schedule
Sent from my Xperia S using xda app-developers app
Click to expand...
Click to collapse
Thanks for that hint, but unfortunately I am one of the 1% of people who still don't use Facebook :angel:
I also hope for an update from Fairphone right here into this thread, so they can give us more tech details. This conversation could be very interesting.
Hello from Joe, Community Manager at Fairphone
Hi all,
A quick hello from me - community manager at Fairphone. Happy that you guys are talking about what we're up to!
What are you guys interested in?
Cheers,
Joe
---------- Post added at 04:24 PM ---------- Previous post was at 04:18 PM ----------
Unrelashade said:
Are these capacitive buttons (the main Android back, home and recent buttons)?
Click to expand...
Click to collapse
Yep! These are capacitive buttons.
joemier said:
Hi all,
A quick hello from me - community manager at Fairphone. Happy that you guys are talking about what we're up to!
What are you guys interested in?
Cheers,
Joe
---------- Post added at 04:24 PM ---------- Previous post was at 04:18 PM ----------
Yep! These are capacitive buttons.
Click to expand...
Click to collapse
Hi and welcome Joe, good to have you here.
I want to join the Q&A discussion: About the material, on the front side - as we know - it's Dragontrail Glass. On the side backwards is a silver frame, I think it's plastic. Also the silver lid on the back is plastic, I guess. Can you confirm? Also, is the black backside as glossy as shown on the rendered images?
@joemier, have you never consider to integrate (if it's possible) Ubuntu for Android in the Fairphone?
benkxda said:
On the side backwards is a silver frame, I think it's plastic. Also the silver lid on the back is plastic, I guess. Can you confirm? Also, is the black backside as glossy as shown on the rendered images?
Click to expand...
Click to collapse
The rear of the phone (at least the central frame) is metallic; I have asked if there will be the possibility to change the cover (maybe with an aftermarket piece) but they answered me that the back cover it's integrated with the antenna, so no way. I hope that the reception of this phone will be good, and I cannot wait to see the first hands on (and to receive mine)!!!
benkxda said:
Hi and welcome Joe, good to have you here.
I want to join the Q&A discussion: About the material, on the front side - as we know - it's Dragontrail Glass. On the side backwards is a silver frame, I think it's plastic. Also the silver lid on the back is plastic, I guess. Can you confirm? Also, is the black backside as glossy as shown on the rendered images?
Click to expand...
Click to collapse
There are basically two materials: the back cover that can be opened up to reveal the battery/SIM cards: that's silver steel.
The other material is the surrounding black and the white trim that you can see surrounding the outside rim of the front face - that is made of plastic. It's hard to describe 'how glossy' but of course a render is more glossy than in real life
Deedend said:
@joemier, have you never consider to integrate (if it's possible) Ubuntu for Android in the Fairphone?
The rear of the phone (at least the central frame) is metallic; I have asked if there will be the possibility to change the cover (maybe with an aftermarket piece) but they answered me that the back cover it's integrated with the antenna, so no way. I hope that the reception of this phone will be good, and I cannot wait to see the first hands on (and to receive mine)!!!
Click to expand...
Click to collapse
The issue of using Ubuntu OS for the Fairphone is very interesting! We cannot manage or organize it ourself with our small team, so we really depend on the developer community to optimize the device for these alternative, open source operating systems. We will do our best to coordinate and support this work, with documentation on our part. Anybody interested?
joemier said:
The issue of using Ubuntu OS for the Fairphone is very interesting! We cannot manage or organize it ourself with our small team, so we really depend on the developer community to optimize the device for these alternative, open source operating systems. We will do our best to coordinate and support this work, with documentation on our part. Anybody interested?
Click to expand...
Click to collapse
I refer to Ubuntu for Andorid, the extension of Ubuntu for TV connected Android phones; but even Ubuntu Touch is great, even if I prefer (for the moment) Firefox OS!
joemier said:
The issue of using Ubuntu OS for the Fairphone is very interesting! We cannot manage or organize it ourself with our small team, so we really depend on the developer community to optimize the device for these alternative, open source operating systems. We will do our best to coordinate and support this work, with documentation on our part. Anybody interested?
Click to expand...
Click to collapse
I'm not an expert, but I ordered a Fairphone and am colleague of most of the Ubuntu engineers working on Ubuntu Touch. I'm happy to help with testing and bringing the right people in touch.
joemier said:
The issue of using Ubuntu OS for the Fairphone is very interesting! We cannot manage or organize it ourself with our small team, so we really depend on the developer community to optimize the device for these alternative, open source operating systems. We will do our best to coordinate and support this work, with documentation on our part. Anybody interested?
Click to expand...
Click to collapse
I contacted a Firefox OS developer, maybe he will join, let's see.
Another thing, currently there are big complains about Qualcomms behavior with or against the AOSP, you maybe already know. This is a big cut in the Nexus device history, cause for the brand new Nexus 7 (2013), there are no Google Factory Images available. How will Fairphone handle this? Is Fairphone as the assembler the mighty master of the drivers or can the manufacturers of each component so that they can demand special treatment like Qualcomm currently does?
dholbach said:
I'm not an expert, but I ordered a Fairphone and am colleague of most of the Ubuntu engineers working on Ubuntu Touch. I'm happy to help with testing and bringing the right people in touch.
Click to expand...
Click to collapse
Perfect. Looks like we get more operating systems running on the Fairphone. Really cool. We can be happy that you and the Ubuntu Touch team will be with us. :good:
EDIT: The Google Factory Images for the Nexus 7 (2013) finally are available.
dholbach said:
I'm not an expert, but I ordered a Fairphone and am colleague of most of the Ubuntu engineers working on Ubuntu Touch. I'm happy to help with testing and bringing the right people in touch.
Click to expand...
Click to collapse
VERY good! I love to see Ubuntu Touch on Fairphone!
Hey guys,
just wanted to let y'all know that a lot of people, myself included, are looking forward to run Ubuntu Touch or Firefox OS on the Fairphone, so please keep working (or start working?) on it!
Been following this thread for a while now (I'm sure that I'm not the only one) and just registered to tell you these things =)
Unfortunately I don't have the skills to help developing it but my good luck wishes are with you! (if of course there is something where I could help, I'd gladly do it)
Cheers!
PS: maybe one should consider removing the date from the thread title, 'cause this way it indicates that no progress has been made since 8th august
arghwhymustiregister said:
Hey guys,
just wanted to let y'all know that a lot of people, myself included, are looking forward to run Ubuntu Touch or Firefox OS on the Fairphone, so please keep working (or start working?) on it!
Been following this thread for a while now (I'm sure that I'm not the only one) and just registered to tell you these things =)
Unfortunately I don't have the skills to help developing it but my good luck wishes are with you! (if of course there is something where I could help, I'd gladly do it)
Cheers!
PS: maybe one should consider removing the date from the thread title, 'cause this way it indicates that no progress has been made since 8th august
Click to expand...
Click to collapse
Hi, thanks that you finally registered on XDA and thanks for your interest in what we try to do.
Maybe the Fairphone community manager @joemier is on holiday. Hope he will be back soon and supports us with answers and maybe news. But to be honest, since the 8th of August there was no progress. I am waiting for an answer from @joemier, this will keep the communication alive. If there are updates for the OP, I'll update the date in the title as well.
I recently talked with @MikeyCriggz, a well known ASOPAL developer. He also likes Ubuntu Touch and is probably willing to help. But of course he needs some stuff/help from Fairphone to help them and all Fairphone customers. Would be nice if Fairphone can provide everything (incl. open source drivers, kernel code...) what is needed to get three operating systems running on this device
I would love to help with this project . Can't wait to get started!
Please, anybody who's registered at Facebook. Please drop Fairphone a message, someone should take care about this thread. More than two weeks no news, no answer, not anything.
We have currently 2,347 views on this thread. Without making progress like answering questions, supporting the devs, we won't be able to keep up the motivation of a lot of people who worked and will work in the future for free for the project, which is still a good idea, for the customers and last but surely not least for the company Fairphone. Folks, let's get back to work!
EDIT: I am not registered at this so called social network. Also, please one message should be enough. Be polite, of course.

[Q] Dewpoint

I am trying to figure out how to calculate dewpoint from temperature and humidity. The formula is ridiculously long, but there is a simple formula that gives an approximation, which is good enough for my purposes.
Td = T - ((100 - RH)/5).
Td = Dewpoint in degrees Celcius
T = Temperature in degrees Celcius
RH = Humidity
Since my phone is in degrees F. I had to convert to degrees C. This is what I did, but it doesn't work, I think because of the % symbol attached to the humidity variable: $int((#WCTEMP#-32)*5/9))-(100-#WCHUM#)/5)$. The problem is, it just displays exactly what I typed, it doesn't do the math. Can anyone point a noob in the right direction? It is probably obvious, but I am still trying to figure out zooper.
I have seen other requests for a dewpoint variable on the forums, so there is a demand out there. Any help would be appreciated, thanks!
Do you own Tasker?
You could do an https get on yahoo weather api and get all the info from there.
Its not to terribly difficult. Probably on the intermediate level.
Sent from my Nexus 5 using Tapatalk
I was just considering purchasing that tonight. I will give that a shot! Thanks Mr Biggzz
MrBiggzz said:
Do you own Tasker?
You could do an https get on yahoo weather api and get all the info from there.
Its not to terribly difficult. Probably on the intermediate level.
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
Its a great app!
Sent from my Nexus 5 using Tapatalk
@robgross how are you making out?
MrBiggzz said:
@robgross how are you making out?
Click to expand...
Click to collapse
I downloaded Tasker but haven't had time to learn it yet...but I will! I do know that ZW sees #WCHUM# as text, so it will not formulate it. I tried using #WCHUMN# to see if it would dispay the value as a number, as #WCTEMPN# does...but that didnt work. Thanks for following up!
Christmas in May!
Dave Handler shares a file with you, please click the link to download: http://dl.dropboxusercontent.com/1/view/qqiv1skjchq7ifu/Tasker Projects/Yahoo_Weather.prj.xml
In it are two tasks Input Zip code which uses a scene to well, get the zip!
The other task is Get Yahoo Weather. That uses a variable that gets set when you set the zip code.
Set your zip and the run the weather task and then check the variables tabs. You'll see every thing that is supplied including the five day forecast.
You'll have to figure what you want and pass it on to Zooper. Every variable for weather is global!
Enjoy!
p.s. everything is in standard units. Fahrenheit, mph and inches. This only thing I didn't do is give you an indicator if the barometric pressure is falling, stable or rising. If you need it I can put it in there!
Sent from my Nexus 5 using Tapatalk
Mr. Biggs, thanks for this, but I can't seem to open this link, it says it's not valid both in Tasker and a browser.
MrBiggzz said:
@robgross how are you making out?
Click to expand...
Click to collapse
MrBiggzz, I figured out how to use Tasker! It's a lot easier to use than I thought, and the possibilities are endless. Thanks for the tip!
I know its an old thread and i was seaching in this thread too; and now i solved by myself. I post here the solution for tasker if someone needs it:
You need to set up or read out from web 2 variables (%temp = temperature and %hum = humidity), once you have set the 2 variables you need to add a code java scriplet to the task to calculate dewpoint and absolute humidity:
function taupunkt() {
if ( (temp == null || temp == 0) ||
(hum == null || hum == 0) ) {
return;
}
var a1=7.45;
var b1=235;
tp=temp;
fw=hum;
tp=tp*1;
fw=fw*1;
x1=(a1*tp)/(b1+tp);
e1=6.1*Math.exp(x1*2.3025851);
e2=e1*fw/100;
x2=e2/6.1;
x3=0.434292289*Math.log(x2);
taux=(235*x3)/(7.45-x3)*100;
taux=Math.floor(taux)/100;
feux=(216.7*e2)/(273.15+tp)*100;
feux=Math.round(feux)/100;
var TAUX = taux;
setGlobal("TAUX", TAUX );
var FEUX = feux;
setGlobal("FEUX", FEUX );
exit ();
}
taupunkt()
The java scriplet calculate the dewpoint and the absolute humdity and stores it in the variable %TAUX (dewpoint) and %FEUX (absolute humidity). Now you can make a popup alert or whatever you want and display the dewpoint calling %TAUX and the absolute humidity %FEUX

[Q] Time Remaining on Track Progress Bar?

So I'm using the #TMU_TRACK_PERC# line in the progress bar and I want a way to display how much time is left in the song.
This is what I've come up with:
Code:
$((TMU_TRACK_LENGTH#-#TMU_PLAYTIME#)/100)$
Of course, this returns the result in the format m.ss instead of m:ss (where m = minutes and ss = seconds), but oh well.
Now the problem I run into is that when the song is paused, instead of showing me the track length, it shows me "Unknown". So I thought I could solve this with conditionals like so:
Code:
$#TMU_TRACK_LENGTH#=Unknown?:$((TMU_TRACK_LENGTH#-#TMU_PLAYTIME#)/100)$
But all it gives me is $.
How do I fix this?
Just delte the $ in the middle.
CopKiller76 said:
Just delte the $ in the middle.
Click to expand...
Click to collapse
But now when the song plays it just gives me this:
-((TMU_TRACK_LENGTH#-#TMU_PLAYTIME#)/100)
minions301 said:
So I'm using the #TMU_TRACK_PERC# line in the progress bar and I want a way to display how much time is left in the song.
This is what I've come up with:
Code:
$((TMU_TRACK_LENGTH#-#TMU_PLAYTIME#)/100)$
Of course, this returns the result in the format m.ss instead of m:ss (where m = minutes and ss = seconds), but oh well.
Now the problem I run into is that when the song is paused, instead of showing me the track length, it shows me "Unknown". So I thought I could solve this with conditionals like so:
Code:
$#TMU_TRACK_LENGTH#=Unknown?:$((TMU_TRACK_LENGTH#-#TMU_PLAYTIME#)/100)$
But all it gives me is $.
How do I fix this?
Click to expand...
Click to collapse
Easier solution is to just use #TMU_REMAINING_TIME#. No need to do complicated math and way easier to handle in conditionals
kwerdenker said:
Easier solution is to just use #TMU_REMAINING_TIME#. No need to do complicated math and way easier to handle in conditionals
Click to expand...
Click to collapse
Haha. Oh. Yeah, that would be easier. I didn't know that existed! I searched for something like that but didn't find it. Thanks!
minions301 said:
Haha. Oh. Yeah, that would be easier. I didn't know that existed! I searched for something like that but didn't find it. Thanks!
Click to expand...
Click to collapse
Sure, no problem. Here is a dump of all available variables for future reference. You might find it useful
MU_PLAYTIME - Pretty string indicating how long current track is playing
MU_PLAYTIME_MILLIS - Total playing time in milliseconds
MU_TRACK_PERC - Total track percent played
MU_REMAINING_TIME - Pretty string indicating how track remaining time
MU_REMAINING_MILLIS - Total remaining time in milliseconds
MU_TRACK_NUM - Track number on album
MU_TRACK_LENGTH - Pretty string indicating track length
MU_TRACK_LENGTH_MILLIS - Total track length in milliseconds
MU_ALBUM - Album name
MU_ARTIST - Artist name
MU_TRACK - Track name
kwerdenker said:
Sure, no problem. Here is a dump of all available variables for future reference. You might find it useful
MU_PLAYTIME - Pretty string indicating how long current track is playing
MU_PLAYTIME_MILLIS - Total playing time in milliseconds
MU_TRACK_PERC - Total track percent played
MU_REMAINING_TIME - Pretty string indicating how track remaining time
MU_REMAINING_MILLIS - Total remaining time in milliseconds
MU_TRACK_NUM - Track number on album
MU_TRACK_LENGTH - Pretty string indicating track length
MU_TRACK_LENGTH_MILLIS - Total track length in milliseconds
MU_ALBUM - Album name
MU_ARTIST - Artist name
MU_TRACK - Track name
Click to expand...
Click to collapse
Awesome, thanks!

[Q] Math Expressions evolved

Hey all
I have a vertical progress bar,placed at y=-264,min value 900 (9.00 AM),max value 1850 (6.50 PM). It's current value is defined by progressbarcurrentvalue = $#Dm#)>50?(#DHH#+1):#DH#$$#Dm#<50?#Dmm#:00$ That is,if minutes<50 it displays current hour and minute without spaces or any chars,but if minutes>50 it displays next hour for 10 mins (like if its 16.55 it displays 1700 ). So far so good.
I want to have a horizontal line to follow my progress bar's current value. I came up with the solution that if I use the parameter [oy](ceil((progressbarcurrentvalue-900)*11/19)-264)[\oy] in my horizontal line it should do the trick. But the problem is I can't get to calculate progressbarcurrentvalue-900 it just does not do the calculation. How can i solve this?
TL;DR
I want to do the calculation $#Dm#)>50?(#DHH#+1):#DH#$$#Dm#<50?#Dmm#:00$-900 but i can't. Why?
Many thanks!
djbaha said:
Hey all
I have a vertical progress bar,placed at y=-264,min value 900 (9.00 AM),max value 1850 (6.50 PM). Its current value is defined by progressbarcurrentvalue = $#Dm#)>50?(#DHH#+1):#DH#$$#Dm#<50?#Dmm#:00$ That is,if minutes<50 it displays current hour and minute without spaces or any chars,but if minutes>50 it displays next hour for 10 mins (like if its 16.55 it displays 1700 ). So far so good.
I want to have a horizontal line to follow my progress bars current value. I came up with the solution that if I use the parameter [oy](ceil((progressbarcurrentvalue-900)*11/19)-264)[\oy] in my horizontal line it should do the trick. But the problem is I cant get to calculate progressbarcurrentvalue-900 it just does not do the calculation. How can i solve this?
TL;DR
I want to do the calculation $#Dm#)>50?(#DHH#+1):#DH#$$#Dm#<50?#Dmm#:00$-900 but i cant. Why?
Many thanks!
Click to expand...
Click to collapse
You need to enclose mathematical expressions in $'s in order for it to be evaluated as a mathematical expression. But this is not going to work:
Code:
[oy]$(ceil(($#Dm#>50?(#DHH#+1):#DH#$$#Dm#<50?#Dmm#:00$-900)*11/19)-264)$[\oy]
because you can't embed conditionals. What you need to do is condense all calculations into a single conditional.
First you can condense these 2 conditionals
Code:
$#Dm#>50?(#DHH#+1):#DH#$$#Dm#<50?#Dmm#:00$
into 1
Code:
$#Dm#>50?(#DHH#00+100):#DHmm#$
Then this
Code:
[oy]$(ceil(($#Dm#>50?(#DHH#00+100):#DHmm#$-900)*11/19)-264)$[/oy]
can be condensed by just incuding the additional calculations within the conditional
Code:
[oy]$#Dm#>50?(ceil(((#DHH#00+100)-900)*11/19)-264):(ceil((#DHHmm#-900)*11/19)-264)$[/oy]
You need to double check the above. I got a little confused with all the parentheses.
jr67 said:
You need to enclose mathematical expressions in $'s in order for it to be evaluated as a mathematical expression. But this is not going to work:
Code:
[oy]$(ceil(($#Dm#>50?(#DHH#+1):#DH#$$#Dm#<50?#Dmm#:00$-900)*11/19)-264)$[\oy]
because you can't embed conditionals. What you need to do is condense all calculations into a single conditional.
First you can condense these 2 conditionals
Code:
$#Dm#>50?(#DHH#+1):#DH#$$#Dm#<50?#Dmm#:00$
into 1
Code:
$#Dm#>50?(#DHH#00+100):#DHmm#$
Then this
Code:
[oy]$(ceil(($#Dm#>50?(#DHH#00+100):#DHmm#$-900)*11/19)-264)$[/oy]
can be condensed by just incuding the additional calculations within the conditional
Code:
[oy]$#Dm#>50?(ceil(((#DHH#00+100)-900)*11/19)-264):(ceil((#DHHmm#-900)*11/19)-264)$[/oy]
You need to double check the above. I got a little confused with all the parentheses.
Click to expand...
Click to collapse
Thank you so much !
The last formula worked flawlessly. Now im studying it to understand how it works..
Thanks!

Categories

Resources