I've been having problems with bumping the encoder knob so shifting the frequency.
So, here is a mod.
Now, a front panel button toggles the LOCK/TUNE, and another toggles the USB/LSB selection.
An easy way to lock the encoder is to ...
step_size = 0; // LOCK
or..
step_size = 2; // TUNE
Originally, the step_size was 1000. I had 10 but now 2.
For some reason, a step size of 1 does not work correctly?????
If the encoder knob it turned rapidly, it still changes the tuning as the acceleration is still working, but this will do I think.
The LOCK/TUNE label may be moved to the top left, under the frequency display when I figure out just how the display positioning has be set up, but I may just keep it where it is.
FYI, here is the code.