From 6b496c35ebe0a1f5eb27b2a4b9c1bc4a61391877 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Fri, 4 Apr 2014 08:58:18 +0200 Subject: [PATCH] Cleanup --- Modem/afsk.c | 7 ++----- Modem/afsk.h | 10 +++------- buildrev.h | 2 +- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/Modem/afsk.c b/Modem/afsk.c index c4ad488..307328d 100644 --- a/Modem/afsk.c +++ b/Modem/afsk.c @@ -5,12 +5,9 @@ #include #include -#include - #include #include #include - #include // Sine table for DAC DDS @@ -28,7 +25,7 @@ static const uint8_t PROGMEM sin_table[] = }; STATIC_ASSERT(sizeof(sin_table) == SIN_LEN / 4); -// Calculate Sine value from quarter sine table +// Calculate any sine value from quarter wave sine table INLINE uint8_t sinSample(uint16_t i) { ASSERT(i < SIN_LEN); uint16_t newI = i % (SIN_LEN/2); @@ -147,7 +144,7 @@ void afsk_adc_isr(Afsk *afsk, int8_t currentSample) { // the bit of the sample, we multiply the sample by // a sample delayed by (samples per bit / 2). // We then lowpass-filter the sample with a first - // order 600Hz filter + // order 600Hz filter. This is a Chebyshev filter. afsk->iirX[0] = afsk->iirX[1]; afsk->iirX[1] = ((int8_t)fifo_pop(&afsk->delayFifo) * currentSample) >> 2; diff --git a/Modem/afsk.h b/Modem/afsk.h index 9801d51..406711e 100644 --- a/Modem/afsk.h +++ b/Modem/afsk.h @@ -10,9 +10,9 @@ #include -#define SAMPLERATE 9600 -#define BITRATE 1200 -#define SAMPLESPERBIT (SAMPLERATE / BITRATE) +#define SAMPLERATE 9600 // The rate at which we are sampling and synthesizing +#define BITRATE 1200 // The actual bitrate at baseband. This is the baudrate. +#define SAMPLESPERBIT (SAMPLERATE / BITRATE) // How many DAC/ADC samples constitute on bit (8). typedef struct Hdlc { @@ -99,8 +99,4 @@ void afsk_adc_isr(Afsk *af, int8_t sample); uint8_t afsk_dac_isr(Afsk *af); void afsk_init(Afsk *af, int adc_ch, int dac_ch); -//int afsk_testSetup(void); -//int afsk_testRun(void); -//int afsk_testTearDown(void); - #endif diff --git a/buildrev.h b/buildrev.h index ef3342b..df4ea1b 100644 --- a/buildrev.h +++ b/buildrev.h @@ -1,2 +1,2 @@ -#define VERS_BUILD 123 +#define VERS_BUILD 126 #define VERS_HOST "vixen"