BoomX2;509128 Wrote:
> Greg,
>
> I've had pretty good results all week with the current period's data
> staying current. However, I've noticed future periods and records &
> averages are getting stale. The log shows that get10Day and getAverages
> always skip for nearly 24 hours. Pressing + will cause them to
> refresh.
>
> Log snippet:
> [10-01-21 20:38:29.5056] Plugins::SuperDateTime::Plugin::get10day
> (3380) Skipping 10day
> [10-01-21 20:38:29.5066] Plugins::SuperDateTime::Plugin::getAverages
> (2447) Skipping averages...
>
> Source snippet where current 'forecastTOD' is checked against 'last' in
> sub get10Day:
> "if ($wetData{'0'}{'forecastTOD'} ne $averages{'last'}) { #See if the
> averages & 10day need to be refreshed due to a period change"
>
> Source snippet where 'last' is set from 'forecastTOD' at the end of sub
> gotAverages:
> "$averages{'last'} = $wetData{'0'}{'forecastTOD'}; #update last average
> update indicator"
>
> Source snippet hardcoding 'forecastTOD' to "NEXT 6HRS" in gotWeather:
> "if ($contig == 1) { #CONTIG 48 STATES
> $wetData{0}{'forecastTOD'} = 'NEXT 6HRS';"
>
> Source snippet clearing 'last' when + pressed in sub refreshsoon:
> "$averages{'last'} = ''; #Make sure averages/10day will get refreshed
> too"
>
> If I'm reading your code correctly I think data collected in the 10day
> and averages routines are not being updated since
> $wetData{0}{'forecastTOD'} is always set to "NEXT 6HRS" and always
> equals $averages{'last'} also set to "NEXT 6HRS". I suspect this may be
> what most folks here have been seeing when they report their forecasts
> are not updating.
>
> Not sure how you want to fix it, but hopefully you'll find this
> diagnosis helpful.
>
> Don
Thanks Don for putting the time to post this.
Yes, you're right on. That code only updates when the first of the
three period forecasts header name changes. Since NEXT 6HRS is a new
value that never changes it never refreshes. The reason for that logic
is to be nice and only update averages and 10day forecasts a couple
times a day instead of every x minutes.
I didn't have time to address the code in the 5.8.12 but my local copy
has it fixed now (well I hope it does!).
-Greg
--
GoCubs
------------------------------------------------------------------------
GoCubs's Profile: http://forums.slimdevices.com/member.php?userid=312
View this thread: http://forums.slimdevices.com/showthread.php?t=14327
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins