[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
https://bbs.xwidget.com/

Wind direction and Rotator on Android
https://bbs.xwidget.com/viewtopic.php?f=8&t=6992
Page 1 of 1

Author:  JuzerNeem [ April 28th, 2019, 1:54 am ]
Post subject:  Wind direction and Rotator on Android

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.

Author:  Jimking [ April 28th, 2019, 9:28 am ]
Post subject:  Re: Wind direction and Rotator on Android

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

Author:  JuzerNeem [ April 28th, 2019, 12:05 pm ]
Post subject:  Re: Wind direction and Rotator on Android

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 5818 times ]

Author:  JuzerNeem [ April 28th, 2019, 12:42 pm ]
Post subject:  Re: Wind direction and Rotator on Android

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!

Author:  Jimking [ April 28th, 2019, 1:49 pm ]
Post subject:  Re: Wind direction and Rotator on Android


Author:  JuzerNeem [ April 28th, 2019, 2:58 pm ]
Post subject:  Re: Wind direction and Rotator on Android

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.

Author:  Jimking [ April 28th, 2019, 3:26 pm ]
Post subject:  Re: Wind direction and Rotator on Android

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..

Author:  JuzerNeem [ April 29th, 2019, 12:05 am ]
Post subject:  Re: Wind direction and Rotator on Android

JimKing,

These are the direction images.

THX!

Attachments:
directions.zip [409.35 KiB]
Downloaded 225 times

Author:  JuzerNeem [ April 29th, 2019, 1:13 am ]
Post subject:  Re: Wind direction and Rotator on Android


Author:  Jimking [ April 29th, 2019, 2:43 am ]
Post subject:  Re: Wind direction and Rotator on Android



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

Author:  Jimking [ April 29th, 2019, 3:02 am ]
Post subject:  Re: Wind direction and Rotator on Android

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 243 times
directionsfixed.zip [409.51 KiB]
Downloaded 224 times

Author:  JuzerNeem [ April 29th, 2019, 3:03 am ]
Post subject:  Re: Wind direction and Rotator on Android

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.

Author:  Jimking [ April 29th, 2019, 3:09 am ]
Post subject:  Re: Wind direction and Rotator on Android

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.

Author:  JuzerNeem [ April 29th, 2019, 4:03 am ]
Post subject:  Re: Wind direction and Rotator on Android

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

Author:  Jimking [ April 29th, 2019, 5:58 am ]
Post subject:  Re: Wind direction and Rotator on Android

Thank you. :)

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/