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.

Flexlib question I

Paul Burton
Paul Burton Member ✭✭
edited May 2017 in SmartSDR API
I am working on a Flexlib-based C# application for the Flex 6K, and in it I have created a new sliceB in a panadapter. The new slice is active and works perfectly, but I want to programmtically enable Transmit (the red TX button) on that slice and have been unable to do that. I set sliceB.Transmit = true , but that didn't enable transmit. Can anyone help?


Paul

Answers

  • James Whiteway
    edited April 2017
    Paul, I haven't looked at this in a long time, but the .transmit command for a slice, just sets the slice/frequency , that the radio will transmit on. There is another command that actually keys (PTT, etc) the radio and puts it in transmit mode. But, I don't have my notes handy to tell you what that is. Sorry for not offering better help.
    James
    WD5GWY
  • Gary L. Robinson
    Gary L. Robinson Member ✭✭
    edited April 2017
    Paul,

    I was going to post some help last night and I got side tracked by the XYL and a honey-do problem.

    In a project of mine I used this code in a MOX button I created to key the rig and a Tune button code below it  to activate a TUNE:


            private void MOXButton_Click(object sender, EventArgs e)
            {
                if (curRadio != null && !curRadio.TX1Enabled)
                {
                    curRadio.TX1Enabled = true;
                }


                if (curRadio != null && curRadio.SliceList.Count > 0)
                {
                    if (curRadio.Mox)
                    {
                        curRadio.Mox = false;
                    }
                    else
                    {
                        curRadio.Mox = true;
                    }
                }
            }

            private void tuneButton_Click(object sender, EventArgs e)
            {
                if (curRadio != null && curRadio.SliceList.Count > 0)
                {
                    if (curRadio != null && !curRadio.TX1Enabled)
                    {
                        curRadio.TX1Enabled = true;
                    }
                    if (curRadio.TXTune)
                    {
                        curRadio.TXTune = false;
                    }
                    else
                    {
                        curRadio.TXTune = true;
                    }
                }
            }

    ++++++++++++++++++++++

    The curRadio variable is a variable I create that is set when the current Radio object is initalized so I can access it anywhere I need to.

    Hope this helps!

    ---Gary
  • James Whiteway
    edited April 2017
    Thanks for sharing Gary! Now, I won't have to dig thru my notes (still boxed from moving)to redo some of my stuff. (still trying to get the Waterfall working correctly though :-) )
    james

  • Paul Burton
    Paul Burton Member ✭✭
    edited April 2017
    Thanks for the replies, but I was not trying to key the transmitter but just enable the slice on which transmit is active (the red button on the slice flag).  I had assumed slice.Transmit = true; would do it, but it doesn't work, and I've looked through all the slice properties and methods and cannot find anything that looks like it will work.  

    This is in conjunction with a "split" operation, where I want to create a second slice for transmitting while leaving the original slice for receiving.  The second slice is created and working just fine, but I don't want to have to manually click the TX button.

    Paul
  • Gary L. Robinson
    Gary L. Robinson Member ✭✭
    edited April 2017
    Paul,

    This is copied out of some of my code
    Try one OR both of these calls together - of course tailor them to your code for the slice you need :

                        curRadio.SliceList[0].Active = true;
                        curRadio.SliceList[0].Transmit = true;


  • Paul Burton
    Paul Burton Member ✭✭
    edited May 2017
    Gary,

    That's exactly what I am doing, but the transmit is not being enabled for that slice.  Also, it goes away for the other slice also.  It must be some other issue.   Thanks.
  • Gary L. Robinson
    Gary L. Robinson Member ✭✭
    edited May 2017
    Paul,

    Since I know the code I pasted works it makes me consider that perhaps your code is working also BUT maybe in one of your event handlers (perhaps for slice properties) code may be changing the setting back immediately.  You might consider doing some run time debugging and/or looking at other areas of your code that may be negating what you are trying to do.  

    Another slimmer possibility could be the version of your smartsdr libraries could be old and might need to be updated to the latest.  Though, I doubt that is the case.

    Just putting forth a few ideas :-)

    ---Gary

     
  • Paul Burton
    Paul Burton Member ✭✭
    edited May 2017
    OK Gary, thanks for the help.  Yes, I had concluded that maybe there was something else causing the problem, but wanted to confirm that the Transmit property is the correct one for enabling transmit on the slice.  When i get more time, I'll look more deeply into it.  My app is to enable the CMD Micro DJ Controller using flexlib.  It is much like the one previoiusly on the forum, but I have tailored it to my likes, and have used it as a learning tool for C# and Visual Studio.  Thanks for the help.

    Paul
  • Paul Burton
    Paul Burton Member ✭✭
    edited May 2017
    OK, I found the problem.  I was creating the second slice OK but neglected to wait for the slice.RadioAck = true, indicating the new new slice was created int he radio.  I needed to do that before setting the new slice to Transmit.  It now works perfectly.

    Gary, thanks for the clue which led me to look more closely at things.  

    Paul  
  • Gary L. Robinson
    Gary L. Robinson Member ✭✭
    edited May 2017
    Fantastic!  Glad to hear you found the problem.  Lots of things to consider working on multiple slice programming, timing issues, etc.  And I have ran into many of them just on simple projects and lost a few gray hairs along the way hihi

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.