Skip to content

Commit

Permalink
#382 Break loop as soon as possible when looking for sync sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
krichardsson committed Dec 5, 2018
1 parent 27b6f16 commit a988301
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/utils/src/lighthouse/pulse_processor.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ static void synchronize(pulseProcessor_t *state, int sensor, uint32_t timestamp,
state->synchronized = true;
state->lastSync = state->currentSync0;
state->currentSync1 = state->currentSync0 + SYNC_SEPARATION;
break;
}
}

Expand Down
2 changes: 1 addition & 1 deletion test/utils/src/lighthouse/test_pulse_processor.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ void testThatGetSystemSyncTimeDoesNotReturnTimestampIfTooMuchTimestampsSpread()
{
// Fixture
uint32_t unused = 0;
uint32_t syncTimes[8] = {1, 500, 3};
uint32_t syncTimes[8] = {1, 900, 3};
size_t nSyncTimes = 3;

// Test
Expand Down

0 comments on commit a988301

Please sign in to comment.