Skip to content

Commit

Permalink
Don't test for lost sync at pointer changes
Browse files Browse the repository at this point in the history
On some stations the old data is not immediately overwritten when the
"current pointer" advances to the next memory slot.

Signed-off-by: Jim Easterbrook <[email protected]>
  • Loading branch information
jim-easterbrook committed Jan 29, 2024
1 parent b3f1af0 commit 073df0c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/pywws/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = '23.6.0'
_release = '1706'
_commit = 'c09f586'
__version__ = '24.1.0'
_release = '1707'
_commit = 'b3f1af0'
5 changes: 3 additions & 2 deletions src/pywws/weatherstation.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# pywws - Python software for USB Wireless Weather Stations
# http://github.com/jim-easterbrook/pywws
# Copyright (C) 2008-22 pywws contributors
# Copyright (C) 2008-24 pywws contributors

# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand Down Expand Up @@ -573,7 +573,8 @@ def live_data(self, logged_only=False):
if data_time - last_data_time < self.margin:
# data has just changed, so definitely at a 48s update time
self._sensor_clock.set_clock(data_time)
elif next_live and data_time < next_live - self.margin:
elif (new_ptr == old_ptr
and next_live and data_time < next_live - self.margin):
logger.warning(
'live_data lost sync %g', data_time - next_live)
logger.warning('old data %s', str(old_data))
Expand Down

0 comments on commit 073df0c

Please sign in to comment.