Hi Jerry, That’s excellent information. I will be very interested to have a copy of the livedata and other file changes when you have completed them. Thank you very much, Ian
Sent from my iPhone > On 27 May 2019, at 17:53, Jd D <[email protected]> wrote: > > Hi Ian, > > Here are a couple more. The following code exists in multiple graphs and > causes the graphs to be messed up since the data is already Fahrenheit . Not > sure why this was needed at all. I commented it out to fixed the graphs > .// if ($tempunit == 'F') { > // $conv = '(9 / 5) + 32'; > // } else { > $conv = '1'; > // } > > Also in shared.php looks like a cut and paste error deleted most of the code > for function anyToF. The bold text below was what I added. > > function anyToF($field){ > global $weather; > if ($weather["temp_units"] == 'F'){ > return $field; > } else { > > return cToFDirect ($field); > } > } > > In barometer.php there is a hard coded 100 in a for loop that blows up. I > changed it to be the sizeof the array. > for ($i = 0; $i < sizeof($parsed_json); $i++) { > $magnitude[$i]=$parsed_json{$i}{'magnitude'};$eqtitle[$i]=$parsed_json{$i}['title'];$depth[$i]=$parsed_json{$i}['depth'];$time[$i]=$parsed_json{$i}['date_time']; > > In livedata.php I made a number of changes to handle when the data was not as > expected. Like if the time value was a string instead of a integer. I just > put a (int) in front of the variable so that it would work for both string > and integer values. Did the same for float for wind speed. Also there were a > number of places where N/A was used when data did not exists and then those > variables where used in a number format function which then errors out. I > just check to see if the variable is_numeric before calling the number format > function. I will send you my livedata.php and other files that I have changed > when I am all done if you like. > > I still see few more things that do not look right that I still need to track > down. > Take care > Jerry >>> > > -- > You received this message because you are subscribed to the Google Groups > "weewx-user" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/weewx-user/271661a7-066c-40ae-a6c9-40c622b1faed%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/38968EB8-CCDB-4E94-83F0-0D4FB7050282%40gmail.com. For more options, visit https://groups.google.com/d/optout.
