[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4668: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4670: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4671: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4672: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
XWidgetSoft Forum • View topic - Wind direction and Rotator on Android

XWidgetSoft Forum

XWidget & XLaunchpad , Desktop customization
It is currently April 27th, 2024, 1:55 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 15 posts ] 
Author Message
PostPosted: April 28th, 2019, 1:54 am 
Offline
User avatar

Joined: September 10th, 2018, 6:50 am
Posts: 21
Is it possible to link the wind direction to a Rotator on Android?

As far as I can see I only have winddirection as a string ( N-E etc.) or in Degrees but the Rotator works with percentage. And without scripting support on Android I can't convert degrees to percentage.

Are there any plans to add scripting to Android?
Most phones are powerful enough to support this nowadays I would think l.


Top
 Profile  
 
PostPosted: April 28th, 2019, 9:28 am 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887
Hello JuzerNeem.
Using js to the app is not about phone's capabilities but if can support it. It's all about programing language that the Android OS can run.
I had asked Tony about it since from the first beta version and he told me that the app doesn't support js.
I don't know if using the Android Studio development engine can go further.. because in the last version the app has been updated to SDK26 and ported to Android Studio from Eclipse. I will reply to you when I talk to Tony and ask him again..

Meanwhile to have a working wind needle, you can do it by creating manually pngs (16) for each direction assigning the wind tag en direction.

https://cdn.windfinder.com/prod/images/ ... 830332.png

_________________
...and remember: don't take life too seriously...
My profile on Deviantart: http://jimking.deviantart.com/


Top
 Profile  
 
PostPosted: April 28th, 2019, 12:05 pm 
Offline
User avatar

Joined: September 10th, 2018, 6:50 am
Posts: 21
OK,
Thank you for your answer.

Can you direct me to an (Android) example or documentation of how to get the correct image for a direction ?
I have created a subdirectory with images for all directions and added an image object to the Widget with a Directions\{curWindDirectionEn}.png tag for Binding Core

But it doesn't work. I added a Text object and also bound it to ${curWindDirectionEn} and I get N, but the image N.png isn't loaded.


Attachments:
WindArrow.jpg
WindArrow.jpg [ 280.51 KiB | Viewed 4589 times ]
Top
 Profile  
 
PostPosted: April 28th, 2019, 12:42 pm 
Offline
User avatar

Joined: September 10th, 2018, 6:50 am
Posts: 21
WindSpeed is in km/h. Would you know of a way to show speed in other units (kts or Bft) on Android ?

Also with images ? That would mean a lot of them since Windspeed has a decimal. From 0.0 to 120.0 would mean 1200 images!


Top
 Profile  
 
PostPosted: April 28th, 2019, 1:49 pm 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887

_________________
...and remember: don't take life too seriously...
My profile on Deviantart: http://jimking.deviantart.com/


Top
 Profile  
 
PostPosted: April 28th, 2019, 2:58 pm 
Offline
User avatar

Joined: September 10th, 2018, 6:50 am
Posts: 21
Thank you for your help.

I don't think switching to imperial units will change the km/h to kts (knots) or Bft (Beaufort). These
are special units for expressing windspeeds and need a calculation to convert from km/h.

I just used the Text object to check what value I was getting from Accuweather.
And you're right: developing on PC and then sending to phone is a very convenient way of working. I already was doing that.


Top
 Profile  
 
PostPosted: April 28th, 2019, 3:26 pm 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887
Yes, the knots and Beaufort are separate and different values. I meant the switching between km/h and mph.
Until now XWidget doesn't have tags for knots and Beaufort, so yes it will be a good idea as suggestion/feature request for the nexr version/s.

Could you please attach a .zip here with your 16png images to test? Because I don't have similar images and I should create them from the scratch..

_________________
...and remember: don't take life too seriously...
My profile on Deviantart: http://jimking.deviantart.com/


Top
 Profile  
 
PostPosted: April 29th, 2019, 12:05 am 
Offline
User avatar

Joined: September 10th, 2018, 6:50 am
Posts: 21
JimKing,

These are the direction images.

THX!


Attachments:
directions.zip [409.35 KiB]
Downloaded 167 times
Top
 Profile  
 
PostPosted: April 29th, 2019, 1:13 am 
Offline
User avatar

Joined: September 10th, 2018, 6:50 am
Posts: 21


Top
 Profile  
 
PostPosted: April 29th, 2019, 2:43 am 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887


Attachments:
wind_directions.42830332.png
wind_directions.42830332.png [ 56.8 KiB | Viewed 4569 times ]

_________________
...and remember: don't take life too seriously...
My profile on Deviantart: http://jimking.deviantart.com/
Top
 Profile  
 
PostPosted: April 29th, 2019, 3:02 am 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887
Here are the fixed version of the images and the demo wind widget.
..and works fine! You widget didn't work because the images were wrong :)
Use the right click option to change location and units


Attachments:
wind.zip [537.21 KiB]
Downloaded 164 times
directionsfixed.zip [409.51 KiB]
Downloaded 166 times

_________________
...and remember: don't take life too seriously...
My profile on Deviantart: http://jimking.deviantart.com/
Top
 Profile  
 
PostPosted: April 29th, 2019, 3:03 am 
Offline
User avatar

Joined: September 10th, 2018, 6:50 am
Posts: 21
Are you sure they are wrong...
Since I want to make a widget for kite-, windsurfing and sailing I want the arrow to point in direction the wind is blowing to , not from where the wind is blowing.

So with North wind the arrow should point downwards.


Top
 Profile  
 
PostPosted: April 29th, 2019, 3:09 am 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887
Absolutely JuzerNeem. The cardinal points never change! Test the widget and see that works fine.
Accuweather and in general the weather services show the direction of the blowing wind NOT the opposite.

The tag says > Current Wind Direction

If you want to show the direction for today or next day/s , then you need to use other tag from the list

This is how it works.

_________________
...and remember: don't take life too seriously...
My profile on Deviantart: http://jimking.deviantart.com/


Top
 Profile  
 
PostPosted: April 29th, 2019, 4:03 am 
Offline
User avatar

Joined: September 10th, 2018, 6:50 am
Posts: 21
Yes, it works.

Thank you, expect a XWidget for watersporters in the (I hope) near future!

And I've added a request for the additional tags: viewtopic.php?f=3&t=6993


Top
 Profile  
 
PostPosted: April 29th, 2019, 5:58 am 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887
Thank you. :)

_________________
...and remember: don't take life too seriously...
My profile on Deviantart: http://jimking.deviantart.com/


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 209 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB® Forum Software © phpBB Group