Announcement

Collapse
No announcement yet.

Rig Control API Question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Rig Control API Question

    Good day,

    I am using the Rig Control API to control HRD via an external tuning dial (with some extra buttons and knobs) and for the most part, the API works as expected, but I have two issues I can't figure out on my own:

    UPDATE: Figured these out by reading this post more carefully: https://forums.hamradiodeluxe.com/node/34951


    Problem 1: Any of the slider commands, commands such as "get slider-pos", "get slider-range", and "set slider pos" work just fine as long as the name of the slider is a single word, but fail when the name of the slider contains spaces

    Problem 2: How to set the value of a dropdown, I can read the current value (via "get dropdown-text", and the list of possible values for a drop down (via "get dropdown-list") but all attempts to set the value of a drop-down fail to work, with one exception, if I set a dropdown via HRD to a value other than it's first value I can cause it to switch back to the original top value in it's list, which means I am identifying the correct drop down:

    Figured this one out as well, you have to pass the text of the drop-down's value and it's position in the list returned by "get dropdown-list" like this:

    Code:
    Enter Text: [161] set dropdown Mode USB 1
    ---------------------------------------------
    User Entered Data:
    ---------------------------------------------
    00000000  5b 31 36 31 5d 20 73 65  74 20 64 72 6f 70 64 6f  |[161] set dropdo|
    00000010  77 6e 20 4d 6f 64 65 20  55 53 42 20 31           |wn Mode USB 1|
    ---------------------------------------------
    HRD Request Data
    ---------------------------------------------
    00000000  50 00 00 00 cd ab 34 12  34 12 cd ab 00 00 00 00  |P.....4.4.......|
    00000010  5b 00 31 00 36 00 31 00  5d 00 20 00 73 00 65 00  |[.1.6.1.]. .s.e.|
    00000020  74 00 20 00 64 00 72 00  6f 00 70 00 64 00 6f 00  |t. .d.r.o.p.d.o.|
    00000030  77 00 6e 00 20 00 4d 00  6f 00 64 00 65 00 20 00  |w.n. .M.o.d.e. .|
    00000040  55 00 53 00 42 00 20 00  31 00 00 00 00 00 00 00  |U.S.B. .1.......|
    ---------------------------------------------
    HRD Response
    ---------------------------------------------
    00000000  4f 00 4b 00                                       |O.K.|
    NOTE: The same issue applies as problem 1 above, if the name of the dropdown contains spaces, they must be converted to ~ before calling "set dropdown".

    Thanks
    Terry (K4FXD)
    Last edited by trbayne; 01-12-20, 23:31. Reason: Figured out the issue, updated the post
Working...
X