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

Added RTCM moving baseline messages and extended amount of GPS channels #2477

Merged
merged 1 commit into from
Dec 17, 2019
Merged

Added RTCM moving baseline messages and extended amount of GPS channels #2477

merged 1 commit into from
Dec 17, 2019

Conversation

chris-djong
Copy link
Contributor

No description provided.

case 1077: s->msg_type = RTCM3_MSG_1077; break;
case 1087: s->msg_type = RTCM3_MSG_1087; break;
default : printf("Unknown message type\n"); return RTCM_OK_CALLBACK_UNDEFINED;
case 1230: s->msg_type = RTCM3_MSG_1230; break;
default : printf("Unknown message type %u\n", RTCMgetbitu(s->msg_buff, 24 + 0, 12)); return RTCM_OK_CALLBACK_UNDEFINED;

Choose a reason for hiding this comment

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

This printfshould be protected with DEBUG_PRINT_PACKAGE like the others. It was not the case, but better make it right now and prevent a print on system that might not support it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I agree. I added the changes.

Choose a reason for hiding this comment

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

Sorry to be annoying, but only the print should be protected, the default case with return code is still needed. It should be something like:

  default:
#ifdef DEBUG_PRINT_PACKAGE
    printf("Unknown message type %u\n", RTCMgetbitu(s->msg_buff, 24 + 0, 12));
#endif
    return RTCM_OK_CALLBACK_UNDEFINED;

As a side note, when creating pull-requests you can allow maintainers to make direct code suggestions (instead of simple comment) to make little changes like this one easier: https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh sure, I overlooked that yesterday. I just added the changes (and edits from maintainers are enabled as well now).
And thank you for the info, still have to get used to git.

@OpenUAS OpenUAS added this to the v5.16 milestone Dec 17, 2019
OpenUAS
OpenUAS previously approved these changes Dec 17, 2019
Copy link
Contributor

@OpenUAS OpenUAS left a comment

Choose a reason for hiding this comment

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

Thanks for adding the last change requested.

case 1077: s->msg_type = RTCM3_MSG_1077; break;
case 1087: s->msg_type = RTCM3_MSG_1087; break;
default : printf("Unknown message type\n"); return RTCM_OK_CALLBACK_UNDEFINED;
case 1230: s->msg_type = RTCM3_MSG_1230; break;
default : printf("Unknown message type %u\n", RTCMgetbitu(s->msg_buff, 24 + 0, 12)); return RTCM_OK_CALLBACK_UNDEFINED;

Choose a reason for hiding this comment

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

Sorry to be annoying, but only the print should be protected, the default case with return code is still needed. It should be something like:

  default:
#ifdef DEBUG_PRINT_PACKAGE
    printf("Unknown message type %u\n", RTCMgetbitu(s->msg_buff, 24 + 0, 12));
#endif
    return RTCM_OK_CALLBACK_UNDEFINED;

As a side note, when creating pull-requests you can allow maintainers to make direct code suggestions (instead of simple comment) to make little changes like this one easier: https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork

Comment on lines 372 to 376
#ifdef DEBUG_PRINT_PACKAGE
default : printf("Unknown message type %u\n", RTCMgetbitu(s->msg_buff, 24 + 0, 12));
#endif
return RTCM_OK_CALLBACK_UNDEFINED;

Choose a reason for hiding this comment

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

Suggested change
#ifdef DEBUG_PRINT_PACKAGE
default : printf("Unknown message type %u\n", RTCMgetbitu(s->msg_buff, 24 + 0, 12));
#endif
return RTCM_OK_CALLBACK_UNDEFINED;
default:
#ifdef DEBUG_PRINT_PACKAGE
printf("Unknown message type %u\n", RTCMgetbitu(s->msg_buff, 24 + 0, 12));
#endif
return RTCM_OK_CALLBACK_UNDEFINED;

@gautierhattenberger gautierhattenberger merged commit 364a26d into paparazzi:master Dec 17, 2019
@chris-djong chris-djong deleted the moving-baseline-and-extended-GPS branch July 6, 2020 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improve upon exiting functionality Not a defect
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants