XWidgetSoft Forum https://www.bbs.xwidget.com/ |
|
Wind direction and Rotator on Android https://www.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: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 |
JuzerNeem wrote: 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! 1. You can switch the Metric/Imperial units using or the right click built-in accuweather tagdode "!SwitchUnit" or from the Weather Details screen/options Check these tutorials viewforum.php?f=23 2. For the wind images, of course you don't have to create 1200 images! As I see from your screeshots you have created 16 pngs and used the "${curWindDirectionEn}" as I suggested. Good. But it doesn't work? ![]() For the text you can't attach function with pngs. Text is text and it will show directly the value using the above tag. I need to test it by myself and made a demo widget to see how it works. To be honest I don't use that because of the difficulty to assign directly wind angle and rotator. Let me see and I will reply asap. PM: I always create widgets on the pc and then pass them to my phone. It's much easier and faster. So I need to test in case that there is actually a bug with this tag and its function with pngs/rotator. |
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!
|
Author: | JuzerNeem [ April 29th, 2019, 1:13 am ] |
Post subject: | Re: Wind direction and Rotator on Android |
Jimking wrote: 2. For the wind images, of course you don't have to create 1200 images! I meant 1200 images for the WindSpeed needed as a 'trick' to convert from km/h to kts or Bft. Or do you know of a better way ? |
Author: | Jimking [ April 29th, 2019, 2:43 am ] | ||
Post subject: | Re: Wind direction and Rotator on Android | ||
JuzerNeem wrote: Jimking wrote: 2. For the wind images, of course you don't have to create 1200 images! I meant 1200 images for the WindSpeed needed as a 'trick' to convert from km/h to kts or Bft. Or do you know of a better way ? No I don't think that we can do more. The best way is to wait Tony to add the tag code for this.. I downloaded the .zip and I'm testing it.. EDIT: The wind directions arrows are wrong JuzerNeem. Should be with these angles. I'll rename them..
|
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
|
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/ |