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

adapt limits #302

Merged
merged 2 commits into from
Jan 18, 2022
Merged

adapt limits #302

merged 2 commits into from
Jan 18, 2022

Conversation

MichaelDvP
Copy link
Contributor

No description provided.

@@ -1070,9 +1070,10 @@ bool EMSdevice::get_value_info(JsonObject & output, const char * cmd, const int8

json["writeable"] = dv.has_cmd;
// if we have individual limits, overwrite the common limits
// limits are not scaled with divider and temperatures are °C
if (dv.min != 0 || dv.max != 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as this overrides the previous json[min] & json[max] assignments is there not a more efficient way of doing this? It's a costly operation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now we have only 2 or 3 values with stored limits. It's a lot of work to examine all the limits. We can use a bool and check this for all limit settings.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok. ArduinoJSON can be a pig sometimes

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.

2 participants