frazierjason / N1mmCommands-TouchPortal

N1MM plugin for TouchPortal to integrate sending transmit strings, macros and other actions
MIT License
2 stars 0 forks source link

Rig control button labels show the wrong action state, or "??" #11

Open frazierjason opened 1 year ago

frazierjason commented 1 year ago

Describe the bug After starting TouchPortal and connecting to my tablet, many of the radio adjustment buttons don't show any command status, they just end in a double question mark like "AGC ??". They don't get fixed until tapping on the button, and only after that do they show status like On/Off, High/Low, etc.

To Reproduce Steps to reproduce the ?? button behavior:

  1. Restart N1MM+, restart TouchPortal for Windows, connect tablet to TouchPortal
  2. Go to the Radio Adjustment page for my rig
  3. Look at some of the radio adjustment buttons.
    BUG: The button action doesn't have to be CAT control, it can even just use keystrokes to tell N1MM+ to do stuff like Alt+Quote to toggle the radio filter between Narrow and Wide.

Steps to reproduce the wrong state behavior:

  1. Follow the steps above
  2. Now press a button, for example "Moni ??" and tap it until it says Moni On
  3. On the rig, directly change the Monitor feature to be off
  4. Now look at the TP button you were just pressing in step 2 BUG: the button still says Moni On, even though it's actually off

Expected behavior Show the real status, or tell me what the next state is if I touch the button

Screenshots A cat

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Using ICOM IC-705 over USB CAT CI-V

frazierjason commented 1 year ago

This behavior is currently by design for nearly all buttons. Many sample buttons for radio adjustment rely on TP Value variables to store what state a button is considered to be cycled onto (toggle for two states, loop for multiple states). When TP first starts up, these values are not yet initialized.

In the interest of keeping the door open to future ability to fetch the real radio states for these, the radio adjustment button action samples were designed to start in the unknown state "??". On first touch of the button, it will repopulate to the first of the toggle/cycle of possibilities (On/Off, Fast/Medium/Slow, etc). You'll then see the new state that you've just now sent to the rig as a command. Keep tapping the button to send more commands and further change the desired radio feature.

If ways are discovered to reliably retrieve the current status of a feature, without unnecessarily encumbering N1MM+ or its developers/community, the plugin may be updated in the future to replace the question marks with the live real radio status, and track the actual state even if the radio is edited directly outside of TP/N1MM+.

The first button where an enhancement implementation can be tried is Mode (CW/SSB/RTTY), since we do get this data in N1MM+ RadioInfo messages over UDP. There isn't much more available to improve at this time.