handiko / Arduino-APRS

Create simple APRS modulator using Arduino UNO
https://handiko.github.io/Arduino-APRS/
GNU General Public License v3.0
92 stars 59 forks source link

AFSK tone reversal #6

Open W4KRL opened 2 years ago

W4KRL commented 2 years ago

If you listen to the audio output of pin 2 using the Hello World example, you will notice that the preamble has a high pitch on every other transmission. Printing the first bit of each message looks like this:

MYCALL-1>APRS,WIDE2-1:>Hello World !! 1 MYCALL-1>APRS,WIDE2-1:>Hello World !! 0 MYCALL-1>APRS,WIDE2-1:>Hello World !! 1 MYCALL-1>APRS,WIDE2-1:>Hello World !! 0 MYCALL-1>APRS,WIDE2-1:>Hello World !! 1

The AFSK tones must be reversed on each transmission. Is this the expected operation?

Also, the comment says that the crc is calculated with 0x1024 but the code uses 0x8408:

/*

rogerclarkmelbourne commented 1 year ago

I'm not sure if this the problem with the 'high pitch' thing you noticed

But the global variable called nada is only initialised when the sketch first loads, and the state of this variable (which is a single binary bit) is changed as each packet is sent.

I think this should be set to its default value before each packet is sent.