Aux Encoder Configuration - K7MDL2/KEITHSDR Wiki

From a Sept 23, 2022 forum post where I explain a bit about how to change encoder assignments.

In SDR_Data.h there are currently 3 sample profiles in user_settings table. Most people will use either the first or 2nd profile (aka row).

There is a an optional Main VFO encoder then optional auxiliary encoders, currently I support 6 i2c or direct connected aux encoders labeled Enc1-6.

In the sample table Enc1 is by assignment (DefMFknob) the Multifunction Encoder (MF knob). MFTUNE is a functionality assignment for VFO tuning using the MF Encoder (Enc1). I believe it will work with Enc2-6 as well.

Many function buttons are MF enabled, not all. These are mostly controls that can select a range of values rather than just simple on/off control. When such a button is pressed, a timer is set and the value range is displayed in the S-Meter window, and rotation of the MF knob will asdjt that value. The timeout is extended until there is no more adjustment (Touch or encoder). When the MF knob is operated without any function buttons pressed (active) the default assignment is used, here VFO. If a button is pushed the MF knob is temporarily assigned to the MF knob until the timeout expires. For touch, dragging right/left is the same as rotating and encoder.

For all other non-MF aux encoders they are dedicated to the assigned functionality in the table. For enc2, in all rows above, it has 3 assignments possible. Enc2 = rotation, enc2_sw = short switch push, and Enc2_sw1 is a long switch push.

The assignment for Enc2 (or EncX) must be one of the range adjustment controls. As seen in the table encoders 1 to 6 are assigned as follows

  3. PAN_BTN
  4. NB_BTN

NR_BTN (need to verify) and ATTEN_BTN (useful only when a supported step attenuator is installed) are also adjustable controls that could be assigned. When the BAND menu is active, The MF knob can be used to highlight a band, then push to select (before the timeout).

The attenuator variable control is only useful if you have a digital step attenuator. I support the PE

For your desired config you want to assign Enc2 to AFGAIN_BTN.

You also need to ensure you have your I/O pin assignments correct so enc1 and 2 are not reading the same I/O pins.

In RadioConfig.h check around line 247 depending on the PCB or proto board wiring you are using. Below Enc 2 and 1 (Pins A and B) are on separate I/O pins.