mirror of
https://github.com/markqvist/OpenModem.git
synced 2024-10-01 03:15:46 -04:00
Increased max frame length. Other minor tweaks.
This commit is contained in:
parent
777a0806f6
commit
997e64ff8b
@ -379,7 +379,7 @@ void AFSK_adc_isr(Afsk *afsk, int8_t currentSample) {
|
||||
// First we bitshift everything 1 left
|
||||
afsk->sampledBits <<= 1;
|
||||
// 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
|
||||
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.
|
||||
// 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.
|
||||
// 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
|
||||
// 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 we can use to synchronize our phase.
|
||||
//
|
||||
|
@ -52,11 +52,16 @@ inline static uint8_t sinSample(uint16_t i) {
|
||||
#define SAMPLESPERBIT (SAMPLERATE / BITRATE)
|
||||
#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 MARK_FREQ 960
|
||||
#define SPACE_FREQ 1600
|
||||
#define PHASE_BITS 10 // How much to increment phase counter each sample
|
||||
#define PHASE_BITS 10
|
||||
#elif BITRATE == 1200
|
||||
#define FILTER_CUTOFF 600
|
||||
#define MARK_FREQ 1200
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#define AX25_MIN_FRAME_LEN 18
|
||||
#ifndef CUSTOM_FRAME_SIZE
|
||||
#define AX25_MAX_FRAME_LEN 620
|
||||
#define AX25_MAX_FRAME_LEN 792
|
||||
#else
|
||||
#define AX25_MAX_FRAME_LEN CUSTOM_FRAME_SIZE
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user