From 35754d661d01ade60a0f27031891264d676078f8 Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Thu, 21 Mar 2024 18:26:37 -0500 Subject: [PATCH] Make MAX_NUM_NODES configurable in variant.h (#3453) Co-authored-by: Ben Meadors --- src/mesh/mesh-pb-constants.h | 4 +--- variants/portduino/variant.h | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/mesh/mesh-pb-constants.h b/src/mesh/mesh-pb-constants.h index 9e747db1d6..b8ef236c99 100644 --- a/src/mesh/mesh-pb-constants.h +++ b/src/mesh/mesh-pb-constants.h @@ -17,9 +17,7 @@ #define MAX_RX_TOPHONE 32 /// max number of nodes allowed in the mesh -#if ARCH_PORTDUINO -#define MAX_NUM_NODES settingsMap[maxnodes] -#else +#ifndef MAX_NUM_NODES #define MAX_NUM_NODES 100 #endif diff --git a/variants/portduino/variant.h b/variants/portduino/variant.h index f47b58afc2..5aad8dbfcc 100644 --- a/variants/portduino/variant.h +++ b/variants/portduino/variant.h @@ -1,3 +1,4 @@ #define HAS_SCREEN 1 #define CANNED_MESSAGE_MODULE_ENABLE 1 #define HAS_GPS 1 +#define MAX_NUM_NODES settingsMap[maxnodes]