Active Topics

 


Reply
Thread Tools
Markkyboy's Avatar
Posts: 433 | Thanked: 727 times | Joined on Oct 2012 @ Costa Blanca, Espaņa
#31
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..?
__________________
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..
 

The Following User Says Thank You to Markkyboy For This Useful Post:
Ancelad's Avatar
Posts: 1,552 | Thanked: 3,108 times | Joined on Jun 2012 @ Russia, 96
#32
Originally Posted by Markkyboy View Post
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..?
It will show 0 until wind-direction will change the first time.
 

The Following User Says Thank You to Ancelad For This Useful Post:
Markkyboy's Avatar
Posts: 433 | Thanked: 727 times | Joined on Oct 2012 @ Costa Blanca, Espaņa
#33
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?
__________________
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..
 

The Following User Says Thank You to Markkyboy For This Useful Post:
Ancelad's Avatar
Posts: 1,552 | Thanked: 3,108 times | Joined on Jun 2012 @ Russia, 96
#34
Yes, it shows different values according weather-forecast (I've changed system date some times to see).
 
Markkyboy's Avatar
Posts: 433 | Thanked: 727 times | Joined on Oct 2012 @ Costa Blanca, Espaņa
#35
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/
__________________
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..
 

The Following User Says Thank You to Markkyboy For This Useful Post:
Ancelad's Avatar
Posts: 1,552 | Thanked: 3,108 times | Joined on Jun 2012 @ Russia, 96
#36
I've used my analog clock configuration path for test.
 

The Following User Says Thank You to Ancelad For This Useful Post:
Markkyboy's Avatar
Posts: 433 | Thanked: 727 times | Joined on Oct 2012 @ Costa Blanca, Espaņa
#37
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!
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!)
__________________
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..
 

The Following User Says Thank You to Markkyboy For This Useful Post:
Markkyboy's Avatar
Posts: 433 | Thanked: 727 times | Joined on Oct 2012 @ Costa Blanca, Espaņa
#38
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.
__________________
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..
 

The Following User Says Thank You to Markkyboy For This Useful Post:
Ancelad's Avatar
Posts: 1,552 | Thanked: 3,108 times | Joined on Jun 2012 @ Russia, 96
#39
You can do something like "angle - 360" if angle is more than 360.
 

The Following User Says Thank You to Ancelad For This Useful Post:
Markkyboy's Avatar
Posts: 433 | Thanked: 727 times | Joined on Oct 2012 @ Costa Blanca, Espaņa
#40
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
__________________
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..
 

The Following User Says Thank You to Markkyboy For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 15:40.