5.11  FT920 and FT818 rigfix


Rigfix

If there are a few commands that cannot be implemented on certain radios, then a rigfix might be needed.

A rigfix is hard coded in PHP server code. A rigfix is applied to a radio by the rigfix  field in the rigs table.

It has drop down selector data entry to select from the currently available options.


Only one rigfix option is selectable per radio. Rigfixes may share common  PHP server code sections.

Rigfixes are named by the name of a radio (eg: FT920) but may be applied to other radios with the same
command structure.


FT920 rigfix  - caching of frequency and status reads


Frequency, mode, clarifier


Frequency, mode, clarifier offset and flag (for clar on/off) are read in a  2 x 14 bytes block for the two VFOs.

See:  Example FT920 frequency 


piWebCAT is structured to read one control items at a time.
This results in the same 28 byte block being read repeatedly to extract the different data items.

The FT920 only has one serial baudrate - 4800 baud and so frequent repetitive reads of 28 bytes potentially

compromise its data bandwidth because of the repetitive tasks

Time periods, per rig are in the timings table. My current FT920 settings are:  

  • fmain        200ms          Read radio's main VFO (to follow the radios and for band change)
  • fsub        600ms          Read the radio's sub VFO
  • chkmode        2000ms          Check mode on radio
  • sync        300ms          Clarifier on/off button has active = S   so has repetitive updates from the flag byte.

                         The clarifier slider has active = S  so has repetitive updates from the 28 bytes block.

With rigfix = FT920 selected:

Reading of VFO A (fmain ..200ms) reads the 28 byte block, uses it, and stores it in a SESSION variable.

All other repetitive reads from the 28 byte block use the SESSION variable copy and so do not need to
access the radio,


Server SESSION variables. 

Server PHP code is launched for each individual read or write task. When the task is complete, the PHP process

dies and all associated internal data is lost.  We therefore store data in a server SESSION variable which persists
for the duration of the web browser session.


FT920 rigfix - caching of read-only sliders and SWR buttons


The six sliders have active = L. 

This makes them follow the radio values with a period determined by the sync field in timings.


The SWR indicator button has active = L and colour = fuchsia. 
It follows the high SWR indication on the radio changing from OFF = black to ON = fuchsia.


All such sliders and buttons are read in turn from a circular queue which steps every sync ms.
Here the queue has six sliders and one button.


The slider values are read only. The FT920 CAT systems does not provide for remotely setting them.

The values are read using Read Meter (Opcode F7) which is also used for S meter, power meter etc.

There are four options, each returning four bytes plus a padding byte (F7)

Caching occurs, where possible,  within each byte in order to reduce the number of actual reads from the radio.


FT920 and FT818  rigfixes  changing   --  and  ++    to  FF and 00


This is used for setting clarifier offset.    See: FT920 clarifier slider tuning


setmask = ht0mssFF09     The numeric value is m h t  (thousands, hundreds, tens (no units)

                             ss is the sign  (twice)


       So the mask converts  -5230 into 2305--FF09


The rigfix converts the  --  to FF   (or ++ to 00)    to send 2305FFFF09 to the radio.


Note that for the FT818  , the manual simply specifies non-zero rather than FF for negative.  


 FF is non-zero   and so does the job !