Skip to content

Commit

Permalink
Merge pull request #48 from RI-SE/fix_start_time_valid_value
Browse files Browse the repository at this point in the history
fix isTimestampValid never true
  • Loading branch information
Robert108 authored Jan 13, 2025
2 parents 27d7aa4 + 1b6c206 commit c5f4b9c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions iso22133.c
Original file line number Diff line number Diff line change
Expand Up @@ -782,10 +782,10 @@ enum ISOMessageReturnValue convertSTRTToHostRepresentation(
const struct timeval* currentTime,
StartMessageType * startData) {
uint16_t gpsWeek = 0;
startData->isTimestampValid = 1;
if (currentTime) {
gpsWeek = (uint16_t)getAsGPSWeek(currentTime);
}

if (!STRTData || !startData) {
errno = EINVAL;
fprintf(stderr, "STRT input pointer error");
Expand All @@ -805,7 +805,6 @@ enum ISOMessageReturnValue convertSTRTToHostRepresentation(
}
else {
if (currentTime && STRTData->GPSWeek != gpsWeek) {
fprintf(stderr, "Parsed STRT message with non-matching GPS week");
startData->isTimestampValid = 0;
return MESSAGE_OK;
}
Expand Down

0 comments on commit c5f4b9c

Please sign in to comment.