From 57cc3d1b8bafecfc000edbd21e578dba0b801b9a Mon Sep 17 00:00:00 2001 From: Jan Janak Date: Wed, 8 Feb 2023 20:14:02 -0500 Subject: [PATCH] Fix incorrect test for the "reset DevEUI" flag Closes #123 --- src/cmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmd.c b/src/cmd.c index 805527b..6400326 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -257,8 +257,8 @@ static void facnew(atci_param_t *param) abort(ERR_FACNEW_FAILED); OK_(); -#define RESET_DEVNONCE(flags) (((flags) & (1 << 0)) == 1) -#define RESET_DEVEUI(flags) (((flags) & (1 << 1)) == 1) +#define RESET_DEVNONCE(flags) (((flags) & (1 << 0)) != 0) +#define RESET_DEVEUI(flags) (((flags) & (1 << 1)) != 0) lrw_factory_reset(RESET_DEVNONCE(flags), RESET_DEVEUI(flags)); }