Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

mStart = -1 #3

Open
p2122 opened this issue Feb 29, 2024 · 1 comment
Open

mStart = -1 #3

p2122 opened this issue Feb 29, 2024 · 1 comment

Comments

@p2122
Copy link
Contributor

p2122 commented Feb 29, 2024

Hello,

the program aborted with an error when it couldn't find the start bytes and mStart became -1. I added the following to line 38 in smartmeter.py to avoid it:
if ((mStart + mLen + 2) <= len(data) and mStart > 0):

Regards, Peter

@aburgr
Copy link
Owner

aburgr commented Mar 1, 2024

Hi Peter!
Thank you for pointing this out. May I ask you to raise a PR for that?
Best regards, Andreas

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants