-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Added RTCM moving baseline messages and extended amount of GPS channels #2477
Conversation
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This printf
should 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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this 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; |
There was a problem hiding this comment.
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
#ifdef DEBUG_PRINT_PACKAGE | ||
default : printf("Unknown message type %u\n", RTCMgetbitu(s->msg_buff, 24 + 0, 12)); | ||
#endif | ||
return RTCM_OK_CALLBACK_UNDEFINED; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#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; |
No description provided.