Glenn,
I think you will find the threading reference in the wxt5x0 driver is an
incomplete cut and paste when Matthew was updating the wxt5x0 driver
logging code with that from the sdr driver. You can drop the threading
import and change:
def logmsg(level, msg):
syslog.syslog(level, 'sdr: %s: %s' %
(threading.currentThread().getName(), msg))
to
def logmsg(level, msg):
syslog.syslog(level, 'wxt5x0: %s' % (msg,))
Gary
On Friday, 14 August 2020 13:10:41 UTC+10, Glenn McKechnie wrote:
>
> Using
> https://github.com/matthewwall/weewx-wxt5x0/blob/master/bin/user/wxt5x0.py
>
> In the absence of Mathews expertise, try the attached copy of that
> original file.
> Save yours, replace it with the attached wxt5x0-trimmed.py file (yes,
> rename it)
> Restart weewx.
>
>
> I'm no expert, so fingers crossed ;-)
>
>
> It removes the duplicate syslog code between lines 114 and 126
> It also imports the threading module to satisfy pyflakes.
>
> ie:-
> 01:04 PM $ diff -u2r wxt5x0.py wxt5x0-trimmed.py
> --- wxt5x0.py 2020-08-14 13:00:54.026076071 +1000
> +++ wxt5x0-trimmed.py 2020-08-14 12:50:56.169586563 +1000
> @@ -78,4 +78,5 @@
> # Old-style weewx logging
> import syslog
> + import threading
>
> def logmsg(level, msg):
> @@ -112,18 +113,4 @@
> return WXT5x0ConfigurationEditor()
>
> -
> -def logmsg(level, msg):
> - syslog.syslog(level, 'wxt5x0: %s' % msg)
> -
> -def logdbg(msg):
> - logmsg(syslog.LOG_DEBUG, msg)
> -
> -def loginf(msg):
> - logmsg(syslog.LOG_INFO, msg)
> -
> -def logerr(msg):
> - logmsg(syslog.LOG_ERR, msg)
> -
> -
> def _fmt(x):
> """
> @@ -491,5 +478,5 @@
> def hardware_name(self):
> return self._model
> -
> +
> def genLoopPackets(self):
> while True:
>
>
>
>
> On 14/08/2020, Chris Howard <[email protected]> wrote:
> > The driver author is Matthew Wall. His github site was pretty active
> until
> >
> > June and then it has gone quiet.
> > With the state of the world these days, it's hard to know what that
> means.
> >
> > I hope the guy is healthy
> > and lounging on a beach somewhere.
> >
> > Until his return, is there a document or someone who can help me sort
> out
> > the 3v-4v differences?
> >
> >
> >
> > --
> > 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/2dbdebb0-3fb8-458c-a2ad-17ae19931a5do%40googlegroups.com.
>
>
> >
>
>
> --
>
>
> Cheers
> Glenn
>
> rorpi - read only raspberry pi & various weewx addons
> https://github.com/glennmckechnie
>
--
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/ed6d4acc-4820-4d6f-8473-69dc8f3b4b11o%40googlegroups.com.