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

possible: wrong variable reset #26

Closed
stbaumg opened this issue May 9, 2022 · 3 comments
Closed

possible: wrong variable reset #26

stbaumg opened this issue May 9, 2022 · 3 comments
Labels
bug Something isn't working fixed dev fixed

Comments

@stbaumg
Copy link

stbaumg commented May 9, 2022

critical code

if(++mMqttTicker > mMqttInterval) {
                mMqttInterval = 0;

if(++mSerialTicker > mSerialInterval) {
                mSerialInterval = 0;

suggestion:

if(++mMqttTicker >= mMqttInterval) {
                mMqttTicker = 0;

if(++mSerialTicker >= mSerialInterval) {
                mSerialTicker = 0;
@lumapu lumapu closed this as completed in b485cb8 May 10, 2022
@stbaumg
Copy link
Author

stbaumg commented May 12, 2022

now, after latest update line 181:
mMqttInterval = 0;
and line 202:
mSerialInterval = 0;
are wrong again.

the ticker needs to be set to 0, not the interval:
mMqttTicker = 0;
mSerialTicker = 0

1 similar comment
@stbaumg
Copy link
Author

stbaumg commented May 12, 2022

now, after latest update line 181:
mMqttInterval = 0;
and line 202:
mSerialInterval = 0;
are wrong again.

the ticker needs to be set to 0, not the interval:
mMqttTicker = 0;
mSerialTicker = 0

@lumapu
Copy link
Owner

lumapu commented May 13, 2022

thank you for contribution! I fixed it - hopefully some related issues with MQTT are fixed as well.

@stefan123t stefan123t added bug Something isn't working fixed dev fixed labels Jan 13, 2023
tictrick added a commit that referenced this issue Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed dev fixed
Projects
None yet
Development

No branches or pull requests

3 participants