Skip to content
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

fix notification sent twice bug when printing with octolapse (#13) #423

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

damned-me
Copy link

When printing with the Octolapse plugin enabled, the msgZChange and so the is_notification_necessary routine is executed twice, resulting in a double notification sent by OctoPrint-Telegram. As checks to prevent sending a notification when the new Z value is negative was missing, this pull request aim to both fix the bug mentioned in #13 (the part regarding Octolapse) and adding this data consistency check.
This will not fix the whole bug, as the maintainer reported in the aforementioned issue, the instruction new_z < self.last_z may be removed, but I defer to his judgment.

…nline#13)

add check to make sure that `new_z` height is always more than zero,
this prevents the plugin to send the same notification twice

 Changes to be committed:
	modified:   octoprint_telegram/telegramNotifications.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant