From 3fc06ca3a2b084dcf0c2d89e3c27069c4b98fd97 Mon Sep 17 00:00:00 2001 From: jkerpe Date: Thu, 16 Nov 2023 09:02:19 +0100 Subject: [PATCH] Defined Max. number of channels --- lib/AppSensorFusion/App.cpp | 1 - lib/AppSensorFusion/App.h | 6 +++--- lib/AppSensorFusion/SerialMuxChannels.h | 3 +++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/AppSensorFusion/App.cpp b/lib/AppSensorFusion/App.cpp index 719e1fde..441a7b3d 100644 --- a/lib/AppSensorFusion/App.cpp +++ b/lib/AppSensorFusion/App.cpp @@ -39,7 +39,6 @@ #include #include #include -#include "SerialMuxChannels.h" /****************************************************************************** * Compiler Switches diff --git a/lib/AppSensorFusion/App.h b/lib/AppSensorFusion/App.h index fa1962d2..80fde54e 100644 --- a/lib/AppSensorFusion/App.h +++ b/lib/AppSensorFusion/App.h @@ -47,6 +47,7 @@ #include #include #include +#include "SerialMuxChannels.h" /****************************************************************************** * Macros @@ -114,10 +115,9 @@ class App /** * SerialMuxProt Server Instance * - * @tparam tMaxChannels set to 10, as App does not require - * more channels for external communication. + * @tparam tMaxChannels set to MAX_CHANNELS, defined in SerialMuxChannels.h. */ - SerialMuxProtServer<10U> m_smpServer; + SerialMuxProtServer m_smpServer; /** * Send the Sensor data as a SensorData struct via SerialMuxProt. diff --git a/lib/AppSensorFusion/SerialMuxChannels.h b/lib/AppSensorFusion/SerialMuxChannels.h index fc068072..8d233491 100644 --- a/lib/AppSensorFusion/SerialMuxChannels.h +++ b/lib/AppSensorFusion/SerialMuxChannels.h @@ -49,6 +49,9 @@ /** DLC of Sensordata Channel */ #define SENSORDATA_CHANNEL_DLC (sizeof(SensorData)) +/** Maximum number of SerialMuxProt Channels. */ +#define MAX_CHANNELS (10U) + /****************************************************************************** * Types and Classes *****************************************************************************/