#ubitx uBITX keyer change #ubitx

John Pieper

I was disappointed by the performance of the built-in keyer code in the uBITX when using my paddle. In particular I was having a hard time getting the first code element of a character to come out, especially if it was a dit. It made the whole thing seem clunky and basically unusable. Looking into the code I quickly spotted the likely cause. Near the beginning of cwKeyer():
//if a paddle was used (not a straight key) we should extend the space to be a full dash
//by adding two more dots long space (one has already been added at the end of the dot or dash)
if (cwTimeout > 0 && lastPaddle != PADDLE_STRAIGHT)

    delay(cwSpeed * 2);
This is trying to enforce character spacing, but has the effect that between characters the paddle is only sampled once every two bit times, making it quite unresponsive. My opinion is, let the operator produce the correct character spacing, make the paddle as responsive as possible. I took out those two lines. I also took out the 5 ms delay below, right before the continue statement. Now the paddle is always being sampled at a high rate and the feeling is much smoother. This seems usable now.

While I was in there I also took the opportunity to insert a 10 ms delay after the calls to startTx() and updateDisplay() (lines 120-121), but before the end of the conditional block. This gives the T/R changeover time to settle before the key goes down, so that an initial dit won't get cut off. Finally I redefined CW_TIMEOUT to be a multiple of cwSpeed, so that faster code speeds can have shorter timeouts. 600 ms was way too long for me. I used 7 times cwSpeed; maybe that can become a setting at some point.

John AD0RW

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