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

revert to setting lastvalue in only success case #2511

Closed
wants to merge 1 commit into from

Conversation

dockSquadron
Copy link
Contributor

fixes bug #2505

@caco3 caco3 linked an issue Jul 12, 2023 that may be closed by this pull request
@Slider0007
Copy link
Collaborator

Slider0007 commented Oct 31, 2023

Be careful: Lastvalue timestamp is also used for data logging faeture. Reverting this only back will distort data logging feature (Multiple lines with same timestamp from last successful reading whenever a "bad" reading is logged).

In my opinion two separate timestamps are required, one for data logging feature to ensure growing timestamps for every reading and one for your need which is only updated on succesful reading.

@caco3 caco3 marked this pull request as draft February 2, 2024 12:36
@dockSquadron dockSquadron marked this pull request as ready for review February 9, 2024 17:35
@caco3
Copy link
Collaborator

caco3 commented Jun 1, 2024

@Slider0007 What do you think? Nobody else has an issue with it. And as you say, it changes the behaviour, so I would not merge it.

@Slider0007
Copy link
Collaborator

Slider0007 commented Jun 2, 2024

@Slider0007 What do you think? Nobody else has an issue with it. And as you say, it changes the behaviour, so I would not merge it.

@caco3: In my opinion, this change is necessary to fulfill the 'self-healing' feature of Rate too high with the RateChange setting, so it is correct in principle. However, the PR would have to be extended to solve both related topics. If only this PR gets merged, the problem of data logging would be open again, which was already addressed in #1839. Therefore, I would suggest using two separate timestamps for the contrary purposes of 'Max Rate Check purpose' (update timepstamp only on a valid reading) and 'Data Logging purpose' (update timestamp on every cycle).

@caco3
Copy link
Collaborator

caco3 commented Aug 26, 2024

@SybexX Do you think we should add this to the next release?
It sounds as if there is some more work and testing required.

@SybexX
Copy link
Collaborator

SybexX commented Aug 26, 2024

is fixed: f8eb4db

@caco3
Copy link
Collaborator

caco3 commented Aug 26, 2024

is fixed: f8eb4db

Does that mean the issue got solved in #3180 and we can close this PR without further work?

@SybexX
Copy link
Collaborator

SybexX commented Aug 26, 2024

Yes, exactly and @Slider0007's concerns were also taken into account/incorporated.

    time_t timeStampLastValue;     // Timestamp for the last read value; is used for the log
    time_t timeStampLastPreValue;  // Timestamp for the last PreValue set; is used for useMaxRateValue

@caco3 caco3 closed this Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rate Change no longer grows with time
5 participants