From 376b328ecb24c1cb0ec5e5618821d81e2a592b85 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Sun, 26 Jan 2020 11:31:40 +0000 Subject: [PATCH] Report unrecognised PTT and DCD types in rigctl and rigctld --- tests/rigctl.c | 6 ++++-- tests/rigctld.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/rigctl.c b/tests/rigctl.c index cce1d2a7f..f1c8e2059 100644 --- a/tests/rigctl.c +++ b/tests/rigctl.c @@ -259,7 +259,8 @@ int main(int argc, char *argv[]) } else { - ptt_type = atoi(optarg); + puts("Unrecognised PTT type, using NONE"); + ptt_type = RIG_PTT_NONE; } break; @@ -309,7 +310,8 @@ int main(int argc, char *argv[]) } else { - dcd_type = atoi(optarg); + puts("Unrecognised DCD type, using NONE"); + dcd_type = RIG_DCD_NONE; } break; diff --git a/tests/rigctld.c b/tests/rigctld.c index 911ad2300..d49dfbbf0 100644 --- a/tests/rigctld.c +++ b/tests/rigctld.c @@ -366,7 +366,8 @@ int main(int argc, char *argv[]) } else { - ptt_type = atoi(optarg); + puts("Unrecognised PTT type, using NONE"); + ptt_type = RIG_PTT_NONE; } break; @@ -416,7 +417,8 @@ int main(int argc, char *argv[]) } else { - dcd_type = atoi(optarg); + puts("Unrecognised DCD type, using NONE"); + dcd_type = RIG_DCD_NONE; } break;