FlexAPI Waterfall Gain and Black Level

  • 1
  • Question
  • Updated 2 months ago
Help: I'm using the FlexAPI waterfall FallGain and FallBlackLevel, but changing them makes no difference to the data received.
Photo of Mark Erbaugh

Mark Erbaugh

  • 516 Posts
  • 45 Reply Likes

Posted 2 months ago

  • 1
Photo of Doug - K3TZR

Doug - K3TZR

  • 120 Posts
  • 17 Reply Likes
Mark,

The data in the waterfall stream, the gain, the black level and auto black level (if auto black is selected) are all used to decide what color any point should be. Using them a value is calculated that is then used to index into a color gradient. All of this is done in the client (i.e. SmartSDR) so nothing coming from the radio changes. Somewhere I have a piece of code that Eric sent me a few years ago that illustrated what is done. If I can find it, I'll post it here.

If you want to look at an example of the technique, look at the Waterfall code in my Mac client on GitHub (DougPA/xSDR6000).

I hope that helps.

73's
Photo of Mark Erbaugh

Mark Erbaugh

  • 516 Posts
  • 45 Reply Likes
Doug,

That helps. I thought it might be the case that the waterfall display was changed in the SSDR client. If you adjust the gain and black level sliders in SSDR Windows, the whole waterfall changes colors, not just the new data.

So the question is, what do the TCP/IP commands:

display panafall set 0x42000000 black_level=###

display panafall set 0x42000000 color_gain=###

do to the radio, especially if both of those things are simply managed by the GUI client?

According to the FlexAPI, they change the color gain and black level.


I ran Wireshark and monitored commands between SSDR Windows and the 6700. I see SSDR issuing the commands above.  I would think there would be no need to do that if the radio isn't changing the data sent to the client.
Photo of Doug - K3TZR

Doug - K3TZR

  • 120 Posts
  • 17 Reply Likes
The radio simply persists the state of those values. It doesn't actually use them. There are lots of parameters that the radio persists and some of them, like these, are really only used in the client (e.g. SmartSDR)
Photo of James Whiteway

James Whiteway

  • 1057 Posts
  • 302 Reply Likes
Mark, I don't believe SSDR does any color processing, other than setting and getting the gain and black levels.
https://www.flexradio.com/flexlib/cla...
I had issues with not understanding Threading and that some events may not occur in the same thread.
Might this be part of the problem?
I am not where I can look at how I fixed the problem. This was one of several things that Eric pointed out to me when I had problems with events not updating like I thought they should.
Just some thoughts.
James
Photo of Mark Erbaugh

Mark Erbaugh

  • 516 Posts
  • 45 Reply Likes
Thank you for the information. Is there a list of the parameters that are just persisted by the radio and are actually implemented by the client? IOW, is there a list of the UI features that are the responsibility of the client and not the radio? I want my client to take advantage of all the features of the radio that it can.

Also, on a slightly different topic, there are events that indicate that a certain object, i.e. Radio, Panadapter, Slice, Meter has been added or removed. Is there a flow chart of how those objects are added an removed in normal and abnormal situations, so that The client can know when to create and destroy the appropriate software objects?
Photo of Doug - K3TZR

Doug - K3TZR

  • 120 Posts
  • 17 Reply Likes
Mark,

The SmartSDR User’s Guide is the only documentation that I know of that describes the functioning of SmartSDR, i.e. the client. The API ‘s source code is the best documentation for the API, i.e. FlexLib. There are a lot of questions / answers on this board that address some of your questions. The WIKI is out of date, incomplete., and occasionally incorrect.

The events that occur, their sequence and timing is a topic that I have struggled with in my own app. As far as I know, there is no documentation, other than reading the API source code, that will help you with this.

I wrote an app (xAPITester) just to be able to easily observe the action of the API. A lot of what I know came from that. If you have access to a Mac, you should try it.