11.5 piWebCAT operation - MOX, S meter , Tx meters
MOX / Tx status.
The radio's transmit status is monitored every 1000ms (database timer table setting)
piWebCAT can be switched to transmit by the on screen MOX button
- the MOX button lights up and the meter displays the currently selected Tx meter data..
However - we need to use piWebCAT with microphone PTT - hence the MOX data requests
to the radio to allow piWebCAT to respond to radio R/T status change.
For the FTdx101D, there is a read / write MOX data request: MX;
This responds to operation of the radio's MOX button, but not PTT.
I therefore configure the database MOX button command to use the TX; command
which does respond to PTT.
S meter and Tx Meters
There are five Tx meter buttons.
The meter table contains S meter and Tx meter records for each radio.
Some of its data is loaded to the client MeterArray at startup.
ie: mult and divide for scaling and usecal (Y or N) for calibration table lookup.
Some is only used on the server for communication with the radio.
For my FTdx101D, the meter table has 9 records:
- S meter RxA and S meter RxB
- Seven Tx meters: PC, ALC, Comp, IDD, SWR, VDD and Temperature.
The five buttons are numbers 61 to 65 (code = TxmA to TxmE) These are fixed button numbers.
The allocation of five Tx values to these buttons is made in the database meter table.
(The unused values simply have btnno = 0;)
The left most button (TxmA) is selected at startup.
smeterCAT() is called by a repeat timer at an interval set in the timing database table.
A repeat interval of 100ms gives a satisfactory display.
The client knows the current VFO (for S meter) or the current Tx meter
and sends an appropriate read request via the ajax queuing system.
The returned data is optionally scaled and then adjusted by the calibration table
and then applied to the meter driver code.
At each update, the 250x110 pixel meter background is redrawn followed by the needle.
There is no flicker from the background redraw. (I do not have any slow PCs here !!)
S meter backgrounds
These are 250x110 pixel bitmaps.
piWebCAT holds six - one for S meter and one for each of the five Tx buttons.
They can be replaced for different displays.
If you design your own, then accuracy is achieved by the 20 point interpolated
calibration tables for each meter.