Welcome to the new FlexRadio Community! Please review the new Community Rules and other important new Community information on the Message Board.
If you are having a problem, please refer to the product documentation or check the Help Center for known solutions.
Need technical support from FlexRadio? It's as simple as Creating a HelpDesk ticket.

FlexAPI Waterfall Gain and Black Level

Mark Erbaugh
Mark Erbaugh Member ✭✭
edited February 2020 in SmartSDR API
Help: I'm using the FlexAPI waterfall FallGain and FallBlackLevel, but changing them makes no difference to the data received.

Answers

  • Doug - K3TZR
    Doug - K3TZR Member
    edited August 2019
    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
  • Mark Erbaugh
    Mark Erbaugh Member ✭✭
    edited February 2020
    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.
  • James Whiteway
    edited August 2019
    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/class_flex_1_1_smoothlake_1_1_flex_lib_1_1_waterfall.html 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
  • Doug - K3TZR
    Doug - K3TZR Member
    edited August 2019
    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)
  • Mark Erbaugh
    Mark Erbaugh Member ✭✭
    edited February 2020
    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?
  • Doug - K3TZR
    Doug - K3TZR Member
    edited August 2019
    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.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.