afarhan / sbitx

168 stars 58 forks source link

Improve straight key operation #65

Closed n1ai closed 9 months ago

n1ai commented 10 months ago

I have a straight key wired with a mono plug. When I insert it into sbitx in CW mode, it immediately keys the radio. This does not happen on any of the other radios I have access to, for instance Flex and Hermes Lite. It's common to use mono plugs for straight keys, they are cheaper. The straight key code should just look for when the tip is low, not when ring or sleeve is low, because ring and sleeve are always connected and they will always be low.

n1ai commented 9 months ago

The current code changes work for CW mode but cause the mic push-to-talk to not work in voice mode, it gets ignored.

I am closing this PR till I have a better set of changes.

n1ai commented 9 months ago

To close this out, the idea to use a mono plug is a non-starter.

I learned that the PTT line is shared between the mic jack and the key jack.

This means you can't have independent logic for CW vs Voice.

The instant I plug in a mono plug the PTT for both CW and Voice are asserted.

Given the line is shared, there's no way for the software to treat CW and Voice independently.

In theory I could wire up an independent GPIO for each but then I have my own unique configuration.

In the real world it's far better to just wire up a stereo plug with ring floating for the straight key.