2.16 Learning guide:  Buttons groups (and more data values than buttons?)

Grouped buttons

Only one button of a group can remain selected and its selection deselects the others in the group.

Buttons are defined in table: buttonshl (HAMLB), buttons (ASCII and YAESU5) and buttonsciv (CIV).

The button table data is used on the client  (ie: in javascript code in the web browser)

piWebCAT recoginises buttons as belonging to a group if they have action = G and the same code.


The group acts on a single rig parameter and each button is associated with a different value for
that parameter.   eg: three buttons controlling AGC decay:  fast, medium and slow.

Note that in dual receiver systems when using --vfo mode, the group may have two server records

in the catcodes table ( or catcoedshl or catcodesciv  ). One record is for VFOA and one is for VFOB.


The data values for grouped buttons are contained in fields nset and nans (or bgsdata for Icom CIV).

The nset, nans and bgsdata fields are only used for grouped buttons.

(Toggling and single shot buttons use anson, ansoff, seton and setoff)


  • The nset field specifies the data value to be sent to the server when the button is clicked.
  • The nans field is used for data reads from the server (ie: from the rig). piWebCAT scans the group
    for a button with an nans value that matches the returned data and sets it.  The others are cleared.


Buttons states are set from the rig values at startup.
Button state are subsequently repetitively updated only if the buttons are configured with active=S (sync).

( It is wise to avoid having too many buttons on auto-update with active=S .... but be aware that a group
of buttons only needs a single update!)


It is possible to have more values for the controlled parameter than there are buttons to match.

For example: AGC decay on the FTdx101D.
 We can configure fast, mid and slow decay times (for each mode) in the rig's menus
and then select fast, mid or slow either on the rig touch screen or via CAT control.


From the CAT manual (GT command)

  • Setting ACG   (nset values). There are five options: agc off,  fast,  mid,  slow  or  auto.
  • Reading AGC (nans matches).There seven options:  agc off, fast, mid, slow, auto-fast, auto-mid, auto-slow.


The question immediately arises as to what to do with seven data values returning to fewer buttons.

Firstly, I choose not to deal with AGC OFF  (we can do that on the rig when we really need to).

There are two ways to deal with this:

  1. Provide four buttons: FAST, MID, SLOW and AUTO.  (The rig's user interface does this)
    Configure  nset values to send:  fast, mid, slow and auto.
    Configure nans values so that: fast sets FAST, mid sets MID, slow sets SLOW
        and auto-fast, auto-mid and auto-slow all set AUTO.
  2. Provide three buttons, FAST, MID and SLOW . (So I can't then actually set auto)
    Configure nset values to send: fast, mid and slow.
    Conigure nans value so that: fast and auto-fast sets FAST, mid and auto-mid sets MID,
          and slow and auto-slow sets SLOW.
       

For the direct (not Hamlib) FTdx101D configuration, I use option 1.

For FTdx101D-H  I have no choice other than to use option 1. This is because Hamlib rigctld returns
fast, mid, slow or auto. ie: it combines auto-fast, auto-mid and auto-slow into a single auto value
before returning the data to piWebCAT.


Combining data values (only relevant to grouped buttons)

Examine the FTdx101D configuration buttons table. Find the four AGC decay buttons.

The nans field for the ACGauto buttons is set to 4 | 5 | 6.
The | character means OR.  4,5 and 6  are the return codes for auto-fast, auto-mid and auto-slow.
Thus any auto-ACG return value will select the auto button.


Examine he FTdx101D-H configuration buttonshl table.

You will see returns CW and CWR combined on the CW button using CW | CWR.  Likewise RTTY | RTTYR.