11.6 piWbCAT operation - Buttons Testing. See: timing.disable
Startup
The state of most of the buttons is read for the current VFO (using the queue) at startup.
Exceptions to this are:
- The Tx Meter buttons whose control data is local to the client.
- The Band buttons (FTdx101D has no band-read, IC7000 uses band stacking resister.)
The database buttons.action field controls what happens when a button is clicked:
- action - S Single (momentary) - There is no client held state, so no startup action.
- action = T Toggled - start up state sets the buttons state.
- action = G Grouped (sharing a common code ) The radio returns a selection code
which allows the correct button to highlight (the rest of the group clear). - action = M Tx meter button - no action as stated above
- action = R Slider reset button - sets slider to def value - local momentary action.
- action = U Unused button
Normal operation (For band switching buttons - see the separate section on these)
When a button is clicked, the action field determines the outcome.
Button actions are write-only ... there is no feedback from the radio.
If button values are altered on the radio, the corresponding button states are only updated
on piWebCAT if they are configured with active=S (sync) rather than active =Y.
There are up to 84 buttons to repetitively read. We limit the number of sync buttons because
repetitive reading from the rig for all buttons would compromise the more important repetitive
tasks (ie: meter read and frequency set)
However, piWebCAT provides a Reconnect button to resychronise piWebCAT's buttons and
sliders after operation of controls on the radio. A further feature is that piWebCAT remembers
this control data for the last band of each VFO so that simply toggling between VFOs doesn't
need an auto-reload of control states.
The 27 slider controls are treated in the same way as buttons.
The button actions on clicking are:
- action = S Single (momentary) Send the programmed command.
(I programmed these buttons to flash on for 250ms to give user feedback)
- action = T Toggled. Client code checks the button's on/off record and then toggles
the button's appearance and sends the appropriate on or off command to the radio. - action = G The button is in a group. Each button has a separate entry in the buttons table
(or buttonsciv table) which contains the value to be sent with the command.
The other members of the group are identified from the ButtonsArray on the client.
(They have action = G and the same code)
The group has one or two records in the catcodes or catcodesciv table on the server
These control the data transfers.
Two records are present if there are separate VFO A and B settings.
Code on the client highlights the clicked button and clears the rest of the group.
- action = M Tx meter button. The clicked buttons is highlighted and the associated record on
the client is set so that the selected meter background and data will be displayed
on subsequent transmit - action = R Slider reset to default button. The ButtonData list in the client contains the id
of the associated slider (rather than the button's id) The SliderArray (from the
database at startup) contains the default value for reset buttons action.
The slider is moved to the reset position and its numeric data display updated.