Forums › General Discussions › shr_parser errors
- This topic has 2 replies, 2 voices, and was last updated 1 day, 13 hours ago by
Joe.
Viewing 3 posts - 1 through 3 (of 3 total)
- AuthorPosts
JoeParticipantI am trying to compile the example signal_hound_sdk/shr_parser/main.cpp. When viewing the source file in VS Code (WSL: Ubuntu) line 40 and 42 cause the error “format ‘%f’ expects argument of type ‘double’, but argument 2 has type ‘int32_t’ {aka ‘int’} [-Wformat=]”
Is this expected behavior? Can you please clarify what the type should be?

AndrewModeratorHi Joe,
Looks like an incomplete branch. Looks like it was copied from the branch above and not finished.
It should probably look more like this,
if(state.header.decimationDetector == SHRDecimationDetectorAvg) { printf("Averaged trace(s) for %.2f seconds per output trace\n", state.header.decimationTimeMs / 1000.0); } else { printf("Max held trace(s) for %.2f seconds per output trace\n", state.header.decimationTimeMs / 1000.0); }This is untested, but I think is closer to what was intended. If you are able to try that, let me know if it prints what you expect.
JoeParticipantAndrew,
Thanks that worked!
- AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.