Skip to content

Commit fa49b6a

Browse files
committed
Starting to look like a real project.
1 parent 07209b5 commit fa49b6a

File tree

9 files changed

+258
-678
lines changed

9 files changed

+258
-678
lines changed

Diff for: src/atest.c

+9
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,9 @@ int main (int argc, char *argv[])
280280
else if (strcasecmp(optarg, "EAS") == 0) {
281281
B_opt = 23456; // See special case below.
282282
}
283+
else if (strcasecmp(optarg, "EOTD") == 0) {
284+
B_opt = 34567;
285+
}
283286
else {
284287
B_opt = atoi(optarg);
285288
}
@@ -475,6 +478,12 @@ int main (int argc, char *argv[])
475478
my_audio_config.achan[0].space_freq = 1563; // Actually 1562.5 - logic 0.
476479
strlcpy (my_audio_config.achan[0].profiles, "D", sizeof(my_audio_config.achan[0].profiles));
477480
}
481+
else if (my_audio_config.achan[0].baud == 34567) {
482+
my_audio_config.achan[0].modem_type = MODEM_EOTD;
483+
my_audio_config.achan[0].baud = 1200;
484+
my_audio_config.achan[0].mark_freq = 1200;
485+
my_audio_config.achan[0].space_freq = 1800;
486+
}
478487
else {
479488
my_audio_config.achan[0].modem_type = MODEM_SCRAMBLE;
480489
my_audio_config.achan[0].mark_freq = 0;

Diff for: src/bch.c

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/* BCH processing, library-style. Copyright (2022) David E. Tiller, K4DET
2+
This file was adapted from a program written by Robert Morelos-Zaragoza
3+
(robert@spectra.eng.hawaii.edu) whose original Copyright appears below.
4+
*/
15
/*
26
* File: bch3.c
37
* Title: Encoder/decoder for binary BCH codes in C (Version 3.1)
@@ -147,7 +151,7 @@ int init_bch(bch_t *bch, int m, int length, int t) {
147151
*
148152
* alpha=2 is the primitive element of GF(2**m)
149153
*/
150-
register int i, mask;
154+
register int mask;
151155

152156
bch->alpha_to = malloc(n * sizeof(int));
153157
bch->index_of = malloc(n * sizeof(int));
@@ -339,7 +343,7 @@ int apply_bch(const bch_t *bch, int *recd)
339343
{
340344
register int i, j, u, q, t2, count = 0, syn_error = 0;
341345
int elp[1026][1024], d[1026], l[1026], u_lu[1026], s[1025];
342-
int root[200], loc[200], err[1024], reg[201];
346+
int root[200], loc[200], reg[201];
343347

344348
t2 = 2 * bch->t;
345349

0 commit comments

Comments
 (0)