Closed BorisKingma closed 5 years ago
Possibly I think it should be as a toast rather than written within the panel.
sounds intuitive, and also easy to implement. onFail listeners are easily implemented for geolocation and weather data.
good one to fix for next weeks update ;-)
There seems to be something completely off..
We are checking if the currentindex
is -1
and the absolute time difference Math.abs(dif)
is < 2
but debugging it now, the value of dif
is 91
. This seems to be an unexpectedly large value?
I have the exact same problem as Nikola. Will investigate further tomorrow, might need some explanation of the exact logic to understand the expected output values.
that part is where it goes through a time sorted array
the intended behavior there is:
currentindex==-1 if not yet found
abs diff <2 means that hour difference is less than 2.
no priority issue. it solves itself in 1 hour = when the weatherreport is in right timeslot.
this occurs when forecast is too far from now, no timepoint 'around now' available.
Weather information is received, however the logic does not allow for an update of the dashboard. I cannot seem to find the error, but something in the logic does not work as expected.
It seems to be the UTC that is causing the trouble. I am not sure exactly what you want to acheive with the different dates, but the dates fetched are several days from today. I don't think I will be able to solve this problem myself.
1st part: the database holds records for a given lat/lon, and with the UTC parameter we tell the database which datetime it should fetch. Apparently, there is a translation error of UTC dates between the platforms, but only for specific devices: otherwise all devices would have the problem. It could be a localisation issue we should enwrap.
this relates to the UTC trouble I was talking about on whatsapp.
we have this proces: JS - > UTC date conversion -> to string PHP -> receive UTC field as string MySQL -> interpret UTC string and compare to UTC dates in database - return records centered around input UTC
Okay, I solved the issue....
the sensationmapss API had a bug.
abstract explanation:
function functionWithBug( $input1, $input2, $inputActuallyBelongingToFunctionX ){ //$inputActuallyBelongingToFunctionX was copied by mistake into input parameter line }
function functionX( $input1, $input2, $inputActuallyBelongingToFunctionX ){ ... if( $criterion ){ return functionWithBug( $input1, $input2 ); // and this ofcourse fails!! because not enough input parameters } }
---stupid
Regards, Boris
Ahh. I see. Nice that you got it fixed 😺 Finding that all the data was actually existing in the app and being sent correctly, but still resulting in errors was kind of frustrating. I have some minor changes that I will add to your pull request today.
We need to inform the user what is causing a problem in obtaining weather data: