Skip to content

Commit

Permalink
Add 100 baud AFSK default tones.
Browse files Browse the repository at this point in the history
  • Loading branch information
wb2osz committed Jul 2, 2018
1 parent 182713f commit 22f6457
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
8 changes: 7 additions & 1 deletion atest.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,13 @@ int main (int argc, char *argv[])
/* We have similar logic in direwolf.c, config.c, gen_packets.c, and atest.c, */
/* that need to be kept in sync. Maybe it could be a common function someday. */

if (my_audio_config.achan[0].baud < 600) {
if (my_audio_config.achan[0].baud == 100) {
my_audio_config.achan[0].modem_type = MODEM_AFSK;
my_audio_config.achan[0].mark_freq = 1615;
my_audio_config.achan[0].space_freq = 1785;
strlcpy (my_audio_config.achan[0].profiles, "D", sizeof(my_audio_config.achan[0].profiles));
}
else if (my_audio_config.achan[0].baud < 600) {
my_audio_config.achan[0].modem_type = MODEM_AFSK;
my_audio_config.achan[0].mark_freq = 1600;
my_audio_config.achan[0].space_freq = 1800;
Expand Down
9 changes: 7 additions & 2 deletions gen_packets.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ int main(int argc, char **argv)
modem.achan[0].baud = atoi(optarg);
text_color_set(DW_COLOR_INFO);
dw_printf ("Data rate set to %d bits / second.\n", modem.achan[0].baud);
if (modem.achan[0].baud < MIN_BAUD || modem.achan[0].baud > MAX_BAUD) {
if (modem.achan[0].baud != 100 && (modem.achan[0].baud < MIN_BAUD || modem.achan[0].baud > MAX_BAUD)) {
text_color_set(DW_COLOR_ERROR);
dw_printf ("Use a more reasonable bit rate in range of %d - %d.\n", MIN_BAUD, MAX_BAUD);
exit (EXIT_FAILURE);
Expand All @@ -264,7 +264,12 @@ int main(int argc, char **argv)
/* We have similar logic in direwolf.c, config.c, gen_packets.c, and atest.c, */
/* that need to be kept in sync. Maybe it could be a common function someday. */

if (modem.achan[0].baud < 600) {
if (modem.achan[0].baud == 100) {
modem.achan[0].modem_type = MODEM_AFSK;
modem.achan[0].mark_freq = 1615;
modem.achan[0].space_freq = 1785;
}
else if (modem.achan[0].baud < 600) {
modem.achan[0].modem_type = MODEM_AFSK;
modem.achan[0].mark_freq = 1600; // Typical for HF SSB
modem.achan[0].space_freq = 1800;
Expand Down

0 comments on commit 22f6457

Please sign in to comment.