Skip to content

Commit

Permalink
Defined Max. number of channels
Browse files Browse the repository at this point in the history
  • Loading branch information
jkerpe committed Nov 16, 2023
1 parent 354ec50 commit 3fc06ca
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 0 additions & 1 deletion lib/AppSensorFusion/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
#include <DifferentialDrive.h>
#include <Odometry.h>
#include <Util.h>
#include "SerialMuxChannels.h"

/******************************************************************************
* Compiler Switches
Expand Down
6 changes: 3 additions & 3 deletions lib/AppSensorFusion/App.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
#include <SimpleTimer.h>
#include <Arduino.h>
#include <SerialMuxProtServer.hpp>
#include "SerialMuxChannels.h"

/******************************************************************************
* Macros
Expand Down Expand Up @@ -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<MAX_CHANNELS> m_smpServer;

/**
* Send the Sensor data as a SensorData struct via SerialMuxProt.
Expand Down
3 changes: 3 additions & 0 deletions lib/AppSensorFusion/SerialMuxChannels.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*****************************************************************************/
Expand Down

0 comments on commit 3fc06ca

Please sign in to comment.