Skip to content

Port Alex's change to raise the maximum register length from 20 to 65535 - #1

Merged
j2martorelliedo merged 3 commits into
mainfrom
feature/increase-max-register-length
Nov 17, 2026
Merged

j2martorelliedo merged 3 commits into
mainfrom
feature/increase-max-register-length

Conversation

@j2martorelliedo

Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread src/modbuslimits.h Outdated
return zeroBased ? QRange<int>(0, 65535) : QRange<int>(1, 65536);
}
static QRange<int> lengthRange() { return { 1, 200 }; }
static QRange<int> lengthRange() { return { 1, 65535 }; }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⛏️ Using a constant for 65535 🥶 I know in the project there're many magic numbers, but I wouldn't follow this bad practice.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ I agree with @giustiandreaj2, let's avoid magic numbers everywhere 👿

@j2martorelliedo
j2martorelliedo merged commit 05c9b0c into main Nov 17, 2026
11 of 12 checks passed
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.

4 participants