Skip to content

Commit 4b0395a

Browse files
committed
Remove speed warning for special cases.
1 parent d747620 commit 4b0395a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/config.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -1277,17 +1277,17 @@ void config_init (char *fname, struct audio_s *p_audio_config,
12771277
continue;
12781278
}
12791279
if (strcasecmp(t,"AIS") == 0) {
1280-
n = 12345; // See special case later.
1280+
n = MAX_BAUD-1; // Hack - See special case later.
12811281
}
12821282
else if (strcasecmp(t,"EAS") == 0) {
1283-
n = 23456; // See special case later.
1283+
n = MAX_BAUD-2; // Hack - See special case later.
12841284
}
12851285
else {
12861286
n = atoi(t);
12871287
}
12881288
if (n >= MIN_BAUD && n <= MAX_BAUD) {
12891289
p_audio_config->achan[channel].baud = n;
1290-
if (n != 300 && n != 1200 && n != 2400 && n != 4800 && n != 9600 && n != 19200) {
1290+
if (n != 300 && n != 1200 && n != 2400 && n != 4800 && n != 9600 && n != 19200 && n != MAX_BAUD-1 && n != MAX_BAUD-2) {
12911291
text_color_set(DW_COLOR_ERROR);
12921292
dw_printf ("Line %d: Warning: Non-standard data rate of %d bits per second. Are you sure?\n", line, n);
12931293
}
@@ -1326,12 +1326,12 @@ void config_init (char *fname, struct audio_s *p_audio_config,
13261326
p_audio_config->achan[channel].mark_freq = 0;
13271327
p_audio_config->achan[channel].space_freq = 0;
13281328
}
1329-
else if (p_audio_config->achan[channel].baud == 12345) {
1329+
else if (p_audio_config->achan[channel].baud == MAX_BAUD-1) {
13301330
p_audio_config->achan[channel].modem_type = MODEM_AIS;
13311331
p_audio_config->achan[channel].mark_freq = 0;
13321332
p_audio_config->achan[channel].space_freq = 0;
13331333
}
1334-
else if (p_audio_config->achan[channel].baud == 23456) {
1334+
else if (p_audio_config->achan[channel].baud == MAX_BAUD-2) {
13351335
p_audio_config->achan[channel].modem_type = MODEM_EAS;
13361336
p_audio_config->achan[channel].baud = 521; // Actually 520.83 but we have an integer field here.
13371337
// Will make more precise in afsk demod init.

0 commit comments

Comments
 (0)