Flexlib question I

  • 1
  • Question
  • Updated 1 year ago
  • Answered
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
Photo of Paul Burton

Paul Burton

  • 96 Posts
  • 14 Reply Likes

Posted 1 year ago

  • 1
Photo of James Whiteway

James Whiteway

  • 856 Posts
  • 186 Reply Likes
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
(Edited)
Photo of Gary L. Robinson

Gary L. Robinson

  • 218 Posts
  • 42 Reply Likes
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
Photo of James Whiteway

James Whiteway

  • 856 Posts
  • 186 Reply Likes
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
Photo of Paul Burton

Paul Burton

  • 96 Posts
  • 14 Reply Likes
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
Photo of Gary L. Robinson

Gary L. Robinson

  • 218 Posts
  • 42 Reply Likes
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;
Photo of Paul Burton

Paul Burton

  • 96 Posts
  • 14 Reply Likes
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.
Photo of Gary L. Robinson

Gary L. Robinson

  • 218 Posts
  • 42 Reply Likes
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

 
Photo of Paul Burton

Paul Burton

  • 96 Posts
  • 14 Reply Likes
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
Photo of Paul Burton

Paul Burton

  • 96 Posts
  • 14 Reply Likes
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  
Photo of Gary L. Robinson

Gary L. Robinson

  • 218 Posts
  • 42 Reply Likes
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

This conversation is no longer open for comments or replies.