Skip to content

Commit

Permalink
Closes YAP Server-Client Dependency #9
Browse files Browse the repository at this point in the history
MAX_CHANNELS defined in SerialMuxChannels.h
  • Loading branch information
gabryelreyes committed Nov 5, 2023
1 parent f313f9d commit aaabb27
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 9 deletions.
1 change: 0 additions & 1 deletion lib/APPConvoyLeader/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/APPConvoyLeader/App.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#include <StateMachine.h>
#include <SimpleTimer.h>
#include <SerialMuxProtServer.hpp>
#include "SerialMuxChannels.h"
#include <Arduino.h>

/******************************************************************************
Expand Down Expand Up @@ -118,10 +119,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;

/**
* Report the current position and heading of the robot using the Odometry data.
Expand Down
3 changes: 3 additions & 0 deletions lib/APPConvoyLeader/SerialMuxChannels.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
* Macros
*****************************************************************************/

/** Maximum number of SerialMuxProt Channels. */
#define MAX_CHANNELS (10U)

/** Name of Channel to send Odometry Data to. */
#define ODOMETRY_CHANNEL_NAME "ODOMETRY"

Expand Down
1 change: 0 additions & 1 deletion lib/APPRemoteControl/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include <Odometry.h>
#include <Board.h>
#include <Util.h>
#include "SerialMuxChannels.h"

/******************************************************************************
* Compiler Switches
Expand Down
7 changes: 3 additions & 4 deletions lib/APPRemoteControl/App.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
#include <StateMachine.h>
#include <SimpleTimer.h>
#include <SerialMuxProtServer.hpp>

#include "SerialMuxChannels.h"
#include "RemoteCtrlState.h"

/******************************************************************************
Expand Down Expand Up @@ -111,10 +111,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;

/** Channel id sending remote control command responses. */
uint8_t m_smpChannelIdRemoteCtrlRsp;
Expand Down
3 changes: 3 additions & 0 deletions lib/APPRemoteControl/SerialMuxChannels.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
* Macros
*****************************************************************************/

/** Maximum number of SerialMuxProt Channels. */
#define MAX_CHANNELS (10U)

/** Name of Channel to send Commands to. */
#define COMMAND_CHANNEL_NAME "CMD"

Expand Down

0 comments on commit aaabb27

Please sign in to comment.