It is currently April 25th, 2024, 5:28 pm

SmallWeather - work in progress

Weather skins
ms310
Posts: 225
Joined: April 1st, 2015, 7:16 am

Re: SmallWeather - work in progress

Post by ms310 »

eclectic-tech wrote: June 14th, 2020, 11:56 am Where are those values coming from?
Does the measure return a value even though there is a calc error?

I would need to see your entire code, but it may be caused by the referenced measures being child webparser measures, and do not return a value until the parent webparser measure updates.

Try having the measure disabled, then add a FinishAction to the parent webparser to enable it and update it.
Thanks - actually - I sorted it out - I am sorry, I thought I edited the post - I must have not clicked submit. It is as you suggest - there is a timing issue. I remember needing to do this to avoid division by zero when I was tinkering with COVID skins doing some maths - you need the webparser to finish first before doing calculations that depend on them!

The skin is coming along nicely - the screenshot below shows my debugging text. The logic is simple - I assign a value for "Day or Night" - this is 10 or 20, then add to that a value for "precipitationDescription's" which are mapped to numeric values, then the same thing for "skyDescriptions's". The resulting SUM is then used to call and image file. There are a few cases where I reuse the same image for multiple numbers, but it is only a few. Anyway - some more tinkering to do before I post it here. As you can see the image to be displayed is "221" which is mapped to NIGHT (20), light_rain (1) and partly_cloudy (200). As there are a lot of duplicates for "light rain" - such as DRIZZLE, I map multiple values to =1 in a variables file.
2020-06-14_23h26_35.png
You do not have the required permissions to view the files attached to this post.