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

Add block 'Check Hex String' #710

Closed
wants to merge 26 commits into from
Closed

Add block 'Check Hex String' #710

wants to merge 26 commits into from

Conversation

DL7NDR
Copy link
Contributor

@DL7NDR DL7NDR commented Dec 27, 2024

Checks data from input port from "Starting Position" on for "Hex String".

If the incoming string matches the entered string, data will be passed to output port "ok", else to "fail".

Example:
Hex String = c0ffee
Starting Position = 1

=> Match for "ff"

changes made as discussed
added default value '' for argument digicallsign in class constructor
added default value '' to parameter digicallsign
    Checks data from input port "in" from the first byte on for an ASCII string entered in field "Address".
    
    If the incoming string matches the entered string, data will be passed to output port "ok", else to output port "fail".
    
    Unlike block 'check_address' (label: Check AX.25 address) 'check_address2' does not bitshift the bytes.
    If you are looking for the ASCII letter "A" (entered in field "Address"), the match would be 0x41. 'check_address' would match on 0x82.
Copy link
Contributor Author

@DL7NDR DL7NDR left a comment

Choose a reason for hiding this comment

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

deleted "check_address2" files and reduced length of a line.

Copy link
Owner

@daniestevez daniestevez left a comment

Choose a reason for hiding this comment

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

I would have preferred that you had used #691 rather than closing it and opening a new PR, since the previous PR contains the discussion that impacted the design of these changes. But anyhow.

The code looks good except for a few comments that I've made. Can you also squash all the commits into a single one with a descriptive commit message? There is no reason to submit a PR with 21 commits just to add a simple block.

grc/satellites_check_hex_string.block.yml Outdated Show resolved Hide resolved
python/check_hex_string.py Outdated Show resolved Hide resolved
python/check_hex_string.py Outdated Show resolved Hide resolved
python/check_hex_string.py Outdated Show resolved Hide resolved
python/check_hex_string.py Outdated Show resolved Hide resolved
@DL7NDR
Copy link
Contributor Author

DL7NDR commented Dec 28, 2024

Can you also squash all the commits into a single one with a descriptive commit message?

Cannot find a function for that for github website only user.

@daniestevez
Copy link
Owner

removed the check in L40-L43
@DL7NDR
Copy link
Contributor Author

DL7NDR commented Dec 28, 2024

See for instance https://www.designgurus.io/answers/detail/how-do-i-squash-my-last-n-commits-together

I'm a github website -only- user.

@daniestevez
Copy link
Owner

While the Github web UI is useful, it has limited functionality, and many operations need to be done with the git command line application.

I'm a github website -only- user.

This comes across as "I don't want to learn how to use git, so others should do the work for me."

@DL7NDR
Copy link
Contributor Author

DL7NDR commented Dec 28, 2024

You are totally right, I don't want to learn git.
I just want to extend gr-satellites!
And if I really wanted to let others do the work for me, I wouldn't invest time in extending blocks by myself.

Not with bad intentions, but one might claim that also your sentence

"Can you also squash all the commits (...)"

comes across as "I want the commits to be squashed, but expect others to do the work for me."

However, if you still insist on squashed commits, I'll give it another try. Just let me know.

@daniestevez
Copy link
Owner

comes across as "I want the commits to be squashed, but expect others to do the work for me."

On the contrary. Having a single commit for each set of changes that can be grouped as one unit is often regarded as good practice (and this means one commit per PR in most cases). gr-satellites (or GNU Radio) don't mention this explicitly in the contributing guidelines, but they stress that commit messages are very important. Having 22 different commits with trivial changes just to add a new block goes against this recommendation. The duty to reformat git history appropriately falls on the PR submitter, not on the project maintainers.

You are totally right, I don't want to learn git. I just want to extend gr-satellites!

Having to learn some git to contribute to a project that uses git as its VCS is a rather reasonable thing.

@DL7NDR
Copy link
Contributor Author

DL7NDR commented Jan 4, 2025

I'll try it with a new pull request to get rid of the unnecessary commits.

However, I'm interpreting "commit messages are very important" exactly the other way round.
Since by squashing commits the messages of every single commit are no longer directly visible (as far as I understood that), commits shouldn't be squashed to keep every commit message (because: "very important").

@DL7NDR DL7NDR closed this Jan 4, 2025
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