Welcome to the new FlexRadio Community! Please review the new Community Rules and other important new Community information on the Message Board.
Need the latest SmartSDR, Power Genius, Tuner Genius and Antenna Genius Software?
SmartSDR v3.8.20 and the SmartSDR v3.8.20 Release Notes
SmartSDR v2.12.1 and the SmartSDR v2.12.1 Release Notes
Power Genius XL Utility v3.8.9 and the Power Genius XL Release Notes v3.8.9
Tuner Genius XL Utility v1.2.11 and the Tuner Genius XL Release Notes v1.2.11
Antenna Genius Utility v4.1.8
SmartSDR v3.8.20 and the SmartSDR v3.8.20 Release Notes
SmartSDR v2.12.1 and the SmartSDR v2.12.1 Release Notes
Power Genius XL Utility v3.8.9 and the Power Genius XL Release Notes v3.8.9
Tuner Genius XL Utility v1.2.11 and the Tuner Genius XL Release Notes v1.2.11
Antenna Genius Utility v4.1.8
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.
Need technical support from FlexRadio? It's as simple as Creating a HelpDesk ticket.
Can one lock/unlock a slice via the API?
John G3WGV
Member ✭✭
Is it possible to set the slice lock on/off via the API?. I've tried
Cxx|slice set 0 lock=1
and
Cxx|slice set 0 lock_on=1
to no avail.
TIA,
73, John, G3WGV
Cxx|slice set 0 lock=1
and
Cxx|slice set 0 lock_on=1
to no avail.
TIA,
73, John, G3WGV
0
Answers
-
Ah, great question John. (std disclaimer, not a Flex employee but I just discovered this myself).
No, you can set the lock on, as you did and you'll see the response back, as I recall. I suspect what that does is set a persistence that, upon re-entering SSDRfW or XPSSDR, the slice will be recreated with the lock on, as in slc.getLock() == true (vs false).
What I did is for every slice specific user action, check the lock state first and if set, bypass whatever you were about to do. e.g.
onVolumeChanged() {
if (slice.getLock() == false) {
do stuff
}
It, on the surface, seems logical that would have been better if the radio did something like ignore requests for changes to locked slices but that could not catch everything. For instance, changing the volume, which is an external to the radio action so either by human action or programmatic control the volume setting is changed but the radio's volume isn't. So, there is a logic that says the cleanest approach is block the action at the boundaries, not at the radio.
To force the radio to do it implies a strict interface that from the cause /effect
external action -> notify radio only
radio status change -> update control status
Personally, that's how I did it, however not all external requests get a direct response from the radio. I am not sure why that line was drawn where it was though. But, if the radio does not acknowledge the command, the user/program requesting it has to assume it worked (no other choice). Given that not every command sent to the radio gets responded to the only logical thing to do is put the gate at the boundary.0 -
Thanks for the quick reply Walt. In the meantime I delved into the .net stuff and found, in Slice.cs that it sends
Cxx|slice lock 0
and
Cxx|slice unlock 0
So I coded that into my Arduino controller, et voila! it worked.
0 -
It worked as in set the locked state to true (yes it does that) or
worked as in blocked any action the user or a program could take on the slice?
0 -
Good point! I just checked that and confirm that it only locks the frequency. I can still alter any other parameter on my controller and on Win/Maestro SSDR.
Edit: Re-reading your earlier post, I realise now that you were thinking that I wanted to completely lock the slice. I was after just locking the VFO, so the fix I found does the trick. I realise now that I might not have explained the requirement as precisely as I might have.
To completely lock the Slice (not sure why one would want to do this) I think your method would be the right approach.0 -
Huh? I'll have to check that as I am pretty sure I could still change frequency. Wait, did it just lock the direct update of the frequency text box or does it prevent you from dragging the slice? I believe I just dragged the slice. But yes, it does, indeed, get set by the radio.
0 -
You are correct, a direct update to the freq text is prevented. Dragging the slice is NOT prevented, at least for me.
John, would you verify that?
0 -
I just checked on Win SSDR and when the slice is locked (blue padlock) I can't move it by dragging or by any other means. I'll check the Maestro in a while but I think it will be the same. I'm using version 1.8.4.0
-
That may be a bug that was fixed. The radio here is on 1.6.21 and I use XPSSDR w/XPSLib as the facsimile to flexlib. I can stop the drag by the method I suggested. From the software engineering perspective, stopping 'bad data' from entering the system is better than trusting the code deep inside the system is foolproof. Just for S&Gs, can you mute volume and / or adjust WNB, filters etc? To be sure, they may well have covered what lock means in the manual. Manual? What manual? We don't need no stick'n manual. ;-) Now I have to check before I hit submit. OK, way too hard as multiple sections of the manual talk about slice. I saw no specific place where locking is specifically mentioned...not that one doesn't exist.
0 -
Indeed. As far as I can see everything else can be controlled when the lock is active. Even mode.
Oh! Just found a putative bug. In the RX side panel I can overtype a new frequency when the slice is locked and the panadapter centres on the new frequency... but the slice frequency doesn't move. I can just imagine how that managed to get missed
I'm using Enzo, IW7DMH's excellent Arduino library, now much modified, as the basis of my Arduino controller. It works very well and it's been an interesting exercise learning how it all hangs together, especially as C is not my "first language".
0 -
Just to clarify what you mean by everything else can be controlled when lock is active, do you mean everything else is locked or everything else can be manipulated with lock is set?
0 -
The latter.
0 -
Thanks for checking John.
0
Leave a Comment
Categories
- All Categories
- 260 Community Topics
- 2.1K New Ideas
- 538 The Flea Market
- 7.6K Software
- 6K SmartSDR for Windows
- 139 SmartSDR for Maestro and M models
- 368 SmartSDR for Mac
- 242 SmartSDR for iOS
- 226 SmartSDR CAT
- 175 DAX
- 345 SmartSDR API
- 8.8K Radios and Accessories
- 6.9K FLEX-6000 Signature Series
- 44 FLEX-8000 Signature Series
- 859 Maestro
- 45 FlexControl
- 849 FLEX Series (Legacy) Radios
- 807 Genius Products
- 424 Power Genius XL Amplifier
- 280 Tuner Genius XL
- 87 Antenna Genius
- 227 Shack Infrastructure
- 153 Networking
- 409 Remote Operation (SmartLink)
- 130 Contesting
- 640 Peripherals & Station Integration
- 116 Amateur Radio Interests
- 878 Third-Party Software