2.12  Learning guide -Transceiver-H-B (--vfo)  Transceiver-H-A-NV (non --vfo)   

           - metering and a few controls added

Now change the radio selector to Generic Hamlib TRX B

This adds Rx and Tx metering, VFO swap, copy and split, Tx power and AF and RF gain.

Note that there is no VFO copy B > A button. Hamlib doesn't support it.


Examine the slidershl table. The left side is shown below


Note that AFGN and RFGN each have two records, one with abx = A for VFOA  and one with abx = B for VFOB.
These two entries are used on the server.

The client (web browser) data is extracted from only one of these two records  
... the first to be encountered in the startup.  So for safety, we put the client data in both, ie: vx, mult, div etc)

Both client and server data will have the code = AFGN  or  code = RFGN to link to the server records.

The client records have vx = V (for VFO).
This makes the client send gain change commands to the server with the current VFO selection, A or B.
The server then knows whether to communicate with the rig using the A or B record for gain setting or reading.
For a more detailed explanation of this, see   3.10 README   vx and abx


active = S (rather than active = Y)  adds the slider to a  list of controls for regular update to follow
any changes on the rig. (Doing this with all controls it might use too much data transfer bandwidth.)


The sliderno field contains the slider's fixed reference number. See 3.6  Button and Slider numbering


Note that Tx power (PWRF) only has a single record in this table slidershl.
This is because it is not specific to VFOA or VFOB.

The client data has vx=X. The server data has abx=X.  The command from client contains X (rather than A or B).

Note the Hamlib commands in:

  • readmask:          \get_level VFOA RFPOWER   (or \get_level RFPOWER in non---vfo mode)
  • setmask:          \set_level VFOA RFPOWER #    The # character is replaced by the data from the client.


In --vfo mode,  the VFOA parameter is a dummy. The RF power control is not VFO specific, but Hamlib rigctld
requires us to include either VFOA or VFOB.... because we are in Hamlib VFO mode  
(As configured for the radio in the radios table.)


Metering   - S meter    Tx meters

The Tx meter buttons determine which transmit meter will be displayed on transmit.
They can be switched whilst on receive or whilst on transmit.

They cause the appropriate meter background bitmap image to be presented on transmit and the appropriate
value for display to be repetitively read from the radio.  See Section 9.1 Meter background images

There are five transmit bitmaps and one for receive (the S meter).The bitmaps are accessible for editing (care!).
The meter scales can be made to accurately match those on the radio by optional use of the metercal table.
The metercal table contains up to 20 user-defined calibration points per meter with linear interpolation.


The image below is of the meter table for Transceiver-H_B with unused columns collapsed for a compact image.

Note that only five of the eight Tx metering records are configured. These have btnno field = 61 to 65.
The unused records have btnno field = 0)


Below are the five Tx metering button configurations in table buttonshl.
None of the data fields are used for these buttons and so they are omitted here for a more compact image.


The Tx meter buttons work as a group but have action = M rather than the usual G for groups.

They have fixed positions beneath the meter and have fixed btnno fields = 61 to 65.

They link, using the btnno to five of the records in the meterhl table shown above.


The meter captions are defined in the meterhl table  (The caption fields in buttonshl are not used)

The CAT commands are shown above, eg: \get_level VFOA RFPOWER_METER_WATTS
(VFOA is a dummy parameter because we are running rigctl in --vfo mode)


The power meter above is configured for my FTdx101D.
Initally, with no scaling (mult=1, div=1) it was reading less than half scale at 100w.
Setting mult=208 and div=100 set the 100w point correctly but lower power levels were very inaccurate.
So I performed a calibration (examine metercal) and then switched it in by setting meterhl.usecal = Y.
The result was near perfect match between radio and piWebCAT.   See Section 9.2 Meter calibration


The S meter here doesn't need the calibration table as it was carefully modelled on that of the FTdx101D.
The calibration table is available when needed .... as it was for the IC7000 configurations.