Increased max frame length. Other minor tweaks.

This commit is contained in:
Mark Qvist 2015-08-05 21:02:16 +02:00
parent 777a0806f6
commit 997e64ff8b
3 changed files with 11 additions and 6 deletions

View File

@ -379,7 +379,7 @@ void AFSK_adc_isr(Afsk *afsk, int8_t currentSample) {
// First we bitshift everything 1 left // First we bitshift everything 1 left
afsk->sampledBits <<= 1; afsk->sampledBits <<= 1;
// And then add the sampled bit to our delay line // And then add the sampled bit to our delay line
afsk->sampledBits |= (afsk->iirY[1] > 0) ? 1 : 0; afsk->sampledBits |= (afsk->iirY[1] > 0) ? 0 : 1;
// Put the current raw sample in the delay FIFO // Put the current raw sample in the delay FIFO
fifo_push(&afsk->delayFifo, currentSample); fifo_push(&afsk->delayFifo, currentSample);
@ -464,7 +464,7 @@ void AFSK_adc_isr(Afsk *afsk, int8_t currentSample) {
///////////////////////////////////////////////// /////////////////////////////////////////////////
// Now we can pass the actual bit to the HDLC parser. // Now we can pass the actual bit to the HDLC parser.
// We are using NRZ coding, so if 2 consecutive bits // We are using NRZ-S coding, so if 2 consecutive bits
// have the same value, we have a 1, otherwise a 0. // have the same value, we have a 1, otherwise a 0.
// We use the TRANSITION_FOUND function to determine this. // We use the TRANSITION_FOUND function to determine this.
// //
@ -476,7 +476,7 @@ void AFSK_adc_isr(Afsk *afsk, int8_t currentSample) {
// not be able to synchronize our phase to the transmitter // not be able to synchronize our phase to the transmitter
// and would start experiencing "bit slip". // and would start experiencing "bit slip".
// //
// By combining bit-stuffing with NRZ coding, we ensure // By combining bit-stuffing with NRZ-S coding, we ensure
// that the signal will regularly make transitions // that the signal will regularly make transitions
// that we can use to synchronize our phase. // that we can use to synchronize our phase.
// //

View File

@ -52,11 +52,16 @@ inline static uint8_t sinSample(uint16_t i) {
#define SAMPLESPERBIT (SAMPLERATE / BITRATE) #define SAMPLESPERBIT (SAMPLERATE / BITRATE)
#define PHASE_INC 1 // Nudge by an eigth of a sample each adjustment #define PHASE_INC 1 // Nudge by an eigth of a sample each adjustment
#if BITRATE == 960 #if BITRATE == 300
#define FILTER_CUTOFF 600
#define MARK_FREQ 1600
#define SPACE_FREQ 1800
#define PHASE_BITS 10 // How much to increment phase counter each sample
#elif BITRATE == 960
#define FILTER_CUTOFF 600 #define FILTER_CUTOFF 600
#define MARK_FREQ 960 #define MARK_FREQ 960
#define SPACE_FREQ 1600 #define SPACE_FREQ 1600
#define PHASE_BITS 10 // How much to increment phase counter each sample #define PHASE_BITS 10
#elif BITRATE == 1200 #elif BITRATE == 1200
#define FILTER_CUTOFF 600 #define FILTER_CUTOFF 600
#define MARK_FREQ 1200 #define MARK_FREQ 1200

View File

@ -7,7 +7,7 @@
#define AX25_MIN_FRAME_LEN 18 #define AX25_MIN_FRAME_LEN 18
#ifndef CUSTOM_FRAME_SIZE #ifndef CUSTOM_FRAME_SIZE
#define AX25_MAX_FRAME_LEN 620 #define AX25_MAX_FRAME_LEN 792
#else #else
#define AX25_MAX_FRAME_LEN CUSTOM_FRAME_SIZE #define AX25_MAX_FRAME_LEN CUSTOM_FRAME_SIZE
#endif #endif