Re: raduino 1.27 upgrade

at91r40008
 

I didn't change the delay but did modify the increments to make the tuning smoother. Especially for CW the 10Hz 
increments makes it easier to tune to the correct frequency and avoid the sudden jumps in the wilderness:

void doTuning(){
  int s;
  unsigned long prev_freq;
 
  s = enc_read();
  if (s){
    prev_freq = frequency;
    
    if (s > 10)
      frequency += 20000l; //!!200000
    if (s > 7)
      frequency += 1000l; //!!10000
    else if (s > 4)
      frequency += 500l; //!!1000
    else if (s > 2)
      frequency += 100l; //!!500
    else if (s > 0)
      frequency +=  10l; //!!50
    else if (s > -2)
      frequency -= 10l; //!!50
    else if (s > -4)
      frequency -= 100l;
    else if (s > -7)
      frequency -= 500l;
    else if (s > -9)
      frequency -= 1000l;
    else
      frequency -= 20000l;
      
    if (prev_freq < 10000000l && frequency > 10000000l)
      isUSB = true;
      
    if (prev_freq > 10000000l && frequency < 10000000l)
      isUSB = false;
 
    setFrequency(frequency);
    updateDisplay();
  }
--
73, Yvon NU6I

Join BITX20@groups.io to automatically receive all group messages.