Skip to content

Commit

Permalink
validate acknowledge messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
gluap committed Jan 3, 2024
1 parent ea373ac commit 322615c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 4 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ commands instead of buying a weather station.

Changelog
=========
**0.36**

- add rudimentary tracking of successfully sent messages and resending of unacknowledged ones.

**0.35.1**

- fix issue with crashes when "sets" was not defined because a bogous device type was present in duofern config.
Expand Down
2 changes: 1 addition & 1 deletion pyduofern/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
__version__ = "0.35.2"
__version__ = "0.36.0"

__all__ = ['DuofernException', 'DuofernStick', 'DuofernStickAsync', 'duoACK']

Expand Down
3 changes: 1 addition & 2 deletions pyduofern/duofern_stick.py
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ def run(self):
self.serial_connection.timeout = 1
if not self.write_queue.empty() or not self.rewrite_queue.empty() and (
(datetime.datetime.now() - self.last_send) >= datetime.timedelta(milliseconds=MIN_MESSAGE_INTERVAL_MILLIS)):
if toggle:
if toggle or self.rewrite_queue:
self.handle_write_queue()
else:
self.handle_rewrite_queue()
Expand All @@ -645,7 +645,6 @@ def run(self):
last_resend_check = datetime.datetime.now()

def handle_resends(self):
logger.debug(self.unacknowledged)
done = set()
t = datetime.datetime.now()
for k in self.unacknowledged.keys():
Expand Down

0 comments on commit 322615c

Please sign in to comment.