when development a custom anaylzyer for saleae, there are two question:
is there any method to connect the ‘sample number’ of the analyzer side and the ''time line spot" of the saleae gui. for example, when dev the analyzer, we call mCLK.GetSampleNumber() to get the source sample posion, but where is it at the saleae GUI?
how to output debug message to the console of launching saleae.exe?
i currentlly output debug message using OutputDebugString() in Windows. but i see
Environment
Executable path: E:\Program\Logic2\Logic.exe
Executable directory: E:\Program\Logic2
Original working directory: E:\Work\Firmware\saleae\2024\SLE44xxAnalyzer\build
Current working directory: E:\Program\Logic2
Process ID: 15756
Crash reporting enabled. Machine ID: a9b9bbb5-7aec-4738-9039-66be701a073f
[2024-08-15 19:46:41.465108] [C] [tid 4456] [main] [saleae_log.cpp:296] Global logging level is set to: debug
... ...
when i launch saleae.exe from a console. i think, this maybe a more useful channel to show debug message when dev a cusom analyzer.
Re #1: See the GetTimeString() helper function from the SampleAnalyzer API docs on GitHub. This function will calculate the timestamp for a given sample point (as a string) based on the GetTriggerSample() and the GetSampleRate() functions. Note: this provides a result only as a text string, not as a numeric value.
Meanwhile, did you try sending to stdout or stderr (using fprintf() from <cstdio>) and/or to std::cout or std::cerr (via <iostream>)? Otherwise, hopefully Saleae can comment on best practice recommendations and whether your requested feature is actually supported