2.4 Text display box - this section is repeated in Hamlib configuration
A late modification was to replace the lowermost slider in the middle section by a text display box.
The box has four text data items, each with a caption in black and data text in a user defined colour.
The four text items appear in the sliders / slidersciv /slidershl tables with slidernos: 51 to 54.
Each item is essentially a slider caption and a slider text data display without the slider in between them.
The caption is defined by slider.caption The slider.color field is used for the data text colour.
The mult, divide, offset, units, lookup and decpoint fields act on the data display exactly as for sliders.
min and max are unused. ( They are used by sliders to match slider travel to min and max data range limits.)
In this example, the RIT and XIT items, 52 and 54 are synchronised to the data values in the rig.
The BW items, 51 and 53 here are using a special Hamlib feature. This is related to the fact that the necessary repetitive Hamlib mode readings also automatically return bandwidth.
This example is from my FTdx101-H Hamlib configuration (ie: connecting using the Hamlib rigctld daemon.)
The CAT data configuration is the same as for a slider (except min and max unused)
So please refer to the appropriate slider section for your configuration (ie: ASCII, YAESU5, CIV or HAMLIB)
( ASCII will user answermask to match the data. CIV uses binary data has a dedicated communication system.)
The above table is split into left and right parts. The unused setmask and answermask fields are not shown.
(Note that answermask would be used with \send_cmd_rx for a CAT command that is not supported by Hamlib)
The BW main and BW sub above are a special Hamlib feature, see below.
The RIT and XIT items represent the usual configuration of these text data items for all other level data.
RIT and XIT offset
The CAT data field here is readmask which with Hamlib rigctld is simply: \get_rit Main.
(See: rigctl documentation )
The offset frequency data is returned as a numeric with range -9990 to +9990.
This needs no scaling and so mult = 1 and divide = 1.
(For AF gain with range 0.000 to 1.000 we might set mult = 100 to scale the displayed value to 0 - 100)
Above, I have used code=RITO and code=XITO. I could have used any code of my choice.
code and vx are sent to the client. code and abx are used on the server. They form the client - server link.
(See: README - vx and abx )
active = T
For a text data item, we set active = T as in the above table.
This has the same effect as setting active = S (sync) for a slider.
This is essential so that the text item is repetitively updated together with other controls with active = S or T.
Hamlib rigctld - Bandwidth display
In the above text box and associated slidershl records, the BW Main and BW Sub items use a feature
that is only available using Hamlib.
(Main and Sub are FTdx101D terminology. Most rigs refer to VFOA and VFOB)
However, you can still display BW Main and BW Sub with other configurations (eg: ASCII) using the
configuration technique that RIT and XIT use in the above example.
Hamlib rigctld reads and sets Mode and Bandwidth together in a single command.
rigctld \get_mode Main and \get_mode Sub are configured like any other rigctld command
but return current bandwidth as a bonus. So we have regular bandwidth updates without having
to set up a specific bandwidth read.
Reading Main (or VFOA) Mode and Sub (or VFOB) Mode from the rig each have a dedicated repetitive process.
The repetition intervals for these reads are set in the timing table using fields:
modecur ( currently selected VFO) and modezz (sleeping VFO)
Mode data read events are set up in the buttonshl and catcodeshl tables.
When the bandwidth data is returned with mode data, piWebCAT checks for sliderhl text item records
with active=W and with code field set as follows:
- With Hamlib --vfo mode use code=WRXA for Main/VFOA
and code=WRXB for Sub/VFOB.
- When not using --vfo mode (eg: Icom) use code = WRXX.
Hamlib --vfo mode is determined by vfomode=Y or vfomode=N in the rigs table entry for the rig.
The bandwidth data display is then updated.
With Hamlib, operating mode and receiver bandwidth share the command \get_mode.
The returned vfo identifier of \get_mode is A or B for vfomode = Y and X for vfomode = N.
These identifiers originate from the abx field of the mode button field in the catcodeshl table.
They must be appropriately set:
- For vfomode = Y, there will be two entries, one with abx =A and one with abx = B.
- For vfomode = N, there will be a single entry with abx = X.