Forums › General Discussions › shr_parser errors
- This topic has 2 replies, 2 voices, and was last updated 6 months ago by
Joe.
Viewing 3 posts - 1 through 3 (of 3 total)
- AuthorPosts
- March 29, 2026 at 10:21 am #255014
Joe
ParticipantI 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?
March 30, 2026 at 12:01 pm #255018
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.
March 31, 2026 at 3:12 pm #255038Joe
ParticipantAndrew,
Thanks that worked!
- AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
