Odd result from checking .SliceList.Count

  • 1
  • Question
  • Updated 4 years ago
Given that _thisRadio is a found and connected instance of Radio, I have found what seems to be an odd result from a test of the value of _thisRadio.SliceList.Count.

In this case, the radio is a 6300. If two slices are 'active', it is my assumption, that on connecting to said radio, SliceList.Count will be 2. Single stepping thru a simple program shows this to be the case until it gets to a line that says "If (_thisRadio.SliceList.Count > 1)", etc.

At this point, SliceList,Count becomes 0. If I set a variable to SliceList.Count, and test the variable there's no issue, but if I test directly, it will get changed to 0 every time.

I assume something is changing it, but there's nothing in place in the program that does so and I am unable to find anything in Flexlib that might be doing it (though searching thru it is a bit tedious when you aren't sure what you're looking for).
Photo of Anthony Bowyer

Anthony Bowyer

  • 33 Posts
  • 8 Reply Likes

Posted 4 years ago

  • 1
Photo of James Whiteway

James Whiteway

  • 856 Posts
  • 186 Reply Likes
I believe that the slice count starts at 0.
Slice A=0 Slice B=1, etc.
So, if you are getting 1 back, then that "should" mean you have two active slices. I'm sure I read that somewhere here in a post by Steve.
James
WD5GWY
Photo of James Whiteway

James Whiteway

  • 856 Posts
  • 186 Reply Likes
I'm too quick on the trigger! My response wasn't what you were looking for. Sorry about that.