![]() |
Re: Wind speed and direction on lockscreen
I now have a zero showing on my homescreen/lockscreen, zero indicates North, but the actual weather forecast shows SE, which is 135 in numerical terms.
Is it working for you?, do you get output other than 0..? |
Re: Wind speed and direction on lockscreen
Quote:
|
Re: Wind speed and direction on lockscreen
I need to tidy up my system and try again.
When I tried your code the first time round, I did find that I could not access the second page the sailfish weather app and there were no changes to the output of zero on the lockscreen - meaning that no matter what weather destination I changed to, the output stays at zero. I'm not sure I understand what you mean, surely the output should change to any output other than zero if zero(north) is not the case......but then my device is well played with, hence a tidy and another try with your code. So you are getting output other than zero? |
Re: Wind speed and direction on lockscreen
Yes, it shows different values according weather-forecast (I've changed system date some times to see).
|
Re: Wind speed and direction on lockscreen
Hmm, not happening for me. Still got zero. Changing the date makes no difference. I'll keep playing! :)
What do you have set in 'path' of configgroup?, I'm using /sailfish/weather/ |
Re: Wind speed and direction on lockscreen
I've used my analog clock configuration path for test.
|
Re: Wind speed and direction on lockscreen
Okay, I had it working, dynamically. \it was spewing out some odd figures. so I changed the int value of configgroup and the numbers came up correctly. But in my Label in Clock.qml, I've fiddled with the 'text:' part and cannot remember what I had it written as - now I can't see homescreen when i restart lipstick, bollocks! :D
As soon as I can recall what the line of code was, I can convert the output to letters. So, yeha, cool, with a few tweaks, it works more or les as expected!, now.......what did I write in that Label text ????? (doh!) |
Re: Wind speed and direction on lockscreen
Okay, I got it working again, silly editing mistake. It is still spewing some odd figures and so getting the output as text is not working as it should. one of the figures was 405, which is 360 + 45. 360 is not or should I say, isn't one of the ouputs we expect, there is some maths applied to rotation of WindDirectionIcon in WeatherDetailsHeader but it is being ignored, it is this maths that prevents spewing of figures above 315 degrees; (rotation: model ? model ? windDirection +180 : -1).
My output changes to whatever weather destination is chosen in sailfish-weather, but I cannot assign compass bearing text (N, NE, etc) with the config spitting out figures above 315. I have tried applying the '+ 180 : -1' math in various places but to no avail. |
Re: Wind speed and direction on lockscreen
You can do something like "angle - 360" if angle is more than 360.
|
Re: Wind speed and direction on lockscreen
So, the code gets more and more complex/bitty to get over a problem that is already gotten over in the weather app.
ConfigurationGroup is clearly calling on WindDirection module, yes? (I believe it is?), in which case, 360 does not exist. The scope of compass points starts with a default of 0(north) and ends at 315(nw) back to 0(north), so I have no idea where the adding up is coming from. I'm seeing 405 and 450, which is clearly (again) 405 + 45(angle)=450, this is no good when it comes to naming (N, NE, S, SE, etc). I'm not getting on at you by the way, I appreciate your help, but I am frustrated at how hard this is to achieve. I honestly thought I would have licked this months ago. In WeatherDetailsHeader.qml under id: weatherIconDirection, we have a line of code; rotation: model ? model.direction +180 : -1 // this is what prevents figures like 360 or 405 from being presented, would you agree with that?, I do believe this is the case and have tried inserting it in various places, but then the output on lockscreen does not even appear. At some point soon, I will paste my current code here, as I have added more to what you've already created, at least then we can sing from the same hymn sheet! I wouldn't know where to put 'angle - 360' or how to tie it in with the current problem, especially as 360 shouldn't exist in this scenario. Weird, oh well, I have the rest of my life to figure it out :D |
| All times are GMT. The time now is 05:52. |
vBulletin® Version 3.8.8