-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Web page locks up if pressure in mbar #4
Comments
I have updated the gauge-data.txt.tmpl file to force the pressure units to mb if WeeWX uses mbar. I think that is the best way of handling this. Could you test this version for me and let me know if it works? If it is OK I'll commit the change. |
Not quite - weewx confuses the issue by adding a leading space to the units! I modified the template file to cover both eventualities: set pressure UoM to match gauge requirements#set $UOM_bar = $unit.label.barometer With that, the units are certainly generated correctly, and I think its working. I'll give it 24 hours. |
Hi, could I suggest using Probably does not make a great deal of difference in this case but I think it gives slightly cleaner code and a better example for those that may follow. Might I suggest the following code:
|
Thanks, that is a better solution. I'll have a look at doing the same for the other UoM as well if the labels can be localised... |
The fix has worked fine for nearly 24 hours now, so I think the principle is proven (it used to fail pretty much instantly). |
I've just implemented gjr80's suggested change, and that's been working OK for 20 minutes or so now. |
I am working on a more general solution (v. part time) that uses I'd like you guys to test it for me before I release it. On 2 March 2016 at 22:03, e107steved notifications@github.com wrote:
|
Sure. |
This should be in the v2.15.16 update 31 Oct 16 |
Using weewx 3.4.0 with VantagePro2 and gauges V2.5.11
Updated ss/skin.conf (or weewx.conf - same effect) with the [[Groups]] definitions to force metric units - in particular:
group_pressure = mbar
Web page with gauges retrieved data once, then locked up - the 'time to next read' counter kept decrementing, but apparently no new data read.
Traced to the fact that in gauge-data.txt we have "pressunit":" mbar", but gauges.js appears to be looking for the string 'mb'
In gauges.js I duplicated every "case 'mb':" statement I could find with "case 'mbar':" and this seems to have solved the problem.
No doubt there is a more elegant solution!
The text was updated successfully, but these errors were encountered: