From 8234510277de7437973971e2997b43a1fe64f614 Mon Sep 17 00:00:00 2001 From: k3ng Date: Fri, 28 Jan 2022 19:38:29 -0500 Subject: [PATCH] 2022.01.28.01 Added compiler macro to error out if paddle_left or paddle_right is defined as 0 (disabled) --- k3ng_keyer/k3ng_keyer.ino | 4 ++++ k3ng_keyer/keyer_dependencies.h | 1 + 2 files changed, 5 insertions(+) diff --git a/k3ng_keyer/k3ng_keyer.ino b/k3ng_keyer/k3ng_keyer.ino index 802b241..7bcc31a 100644 --- a/k3ng_keyer/k3ng_keyer.ino +++ b/k3ng_keyer/k3ng_keyer.ino @@ -1532,6 +1532,10 @@ If you offer a hardware kit using this software, show your appreciation by sendi #include "keyer_settings.h" #endif +#if (paddle_left == 0) || (paddle_right == 0) + #error "You cannot define paddle_left or paddle_right as 0 to disable" +#endif + #if defined(FEATURE_BUTTONS) #include "src/buttonarray/buttonarray.h" #endif diff --git a/k3ng_keyer/keyer_dependencies.h b/k3ng_keyer/keyer_dependencies.h index 2dbb5b3..1a35226 100644 --- a/k3ng_keyer/keyer_dependencies.h +++ b/k3ng_keyer/keyer_dependencies.h @@ -48,3 +48,4 @@ #if defined(FEATURE_COMMAND_MODE) && !defined(FEATURE_BUTTONS) #error "FEATURE_COMMAND_MODE requires FEATURE_BUTTONS" #endif +