diff --git a/hardware/AFSK.c b/hardware/AFSK.c index 5ebac93..50a5214 100755 --- a/hardware/AFSK.c +++ b/hardware/AFSK.c @@ -364,11 +364,11 @@ void AFSK_adc_isr(Afsk *afsk, int8_t currentSample) { // afsk->iirY[1] = afsk->iirX[0] + afsk->iirX[1] + (afsk->iirY[0] * 0.3101172565); #elif FILTER_CUTOFF == 1200 afsk->iirY[1] = afsk->iirX[0] + afsk->iirX[1] + (afsk->iirY[0] / 10); - // The above is a simplification of a first-order 800Hz chebyshev filter: + // The above is a simplification of a first-order 1200Hz chebyshev filter: // afsk->iirY[1] = afsk->iirX[0] + afsk->iirX[1] + (afsk->iirY[0] * 0.1025215106); #elif FILTER_CUTOFF == 1600 afsk->iirY[1] = afsk->iirX[0] + afsk->iirX[1] + -1*(afsk->iirY[0] / 17); - // The above is a simplification of a first-order 800Hz chebyshev filter: + // The above is a simplification of a first-order 1600Hz chebyshev filter: // afsk->iirY[1] = afsk->iirX[0] + afsk->iirX[1] + (afsk->iirY[0] * -0.0630669239); #else #error Unsupported filter cutoff! diff --git a/hardware/AFSK.h b/hardware/AFSK.h index 6b8da2d..be69381 100755 --- a/hardware/AFSK.h +++ b/hardware/AFSK.h @@ -51,17 +51,12 @@ 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 == 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 + +#if BITRATE == 960 #define FILTER_CUTOFF 600 #define MARK_FREQ 960 #define SPACE_FREQ 1600 - #define PHASE_BITS 10 + #define PHASE_BITS 10 // How much to increment phase counter each sample #elif BITRATE == 1200 #define FILTER_CUTOFF 600 #define MARK_FREQ 1200 @@ -72,11 +67,6 @@ inline static uint8_t sinSample(uint16_t i) { #define MARK_FREQ 1600 #define SPACE_FREQ 2600 #define PHASE_BITS 8 -#elif BITRATE == 2400 - #define FILTER_CUTOFF 1600 - #define MARK_FREQ 2400 - #define SPACE_FREQ 4200 - #define PHASE_BITS 4 #else #error Unsupported bitrate! #endif