This commit is contained in:
Mark Qvist 2018-04-17 10:50:53 +02:00
parent 22a2b2ea6f
commit cd10d36c16
3 changed files with 5 additions and 14 deletions

1
.gitignore vendored
View file

@ -12,3 +12,4 @@ images/*.map
images/*.elf
images/*.sym
images/*.hex
flashdefault

View file

@ -3,7 +3,7 @@
// Choose whether to use KISS or direct
// framing for serial data
//#define SERIAL_FRAMING SERIAL_FRAMING_KISS
#define SERIAL_FRAMING SERIAL_FRAMING_DIRECT
#define SERIAL_FRAMING SERIAL_FRAMING_KISS
//#define SERIAL_FRAMING SERIAL_FRAMING_DIRECT
#endif

View file

@ -52,16 +52,11 @@ 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