From ff01b69463931f1d744959b5e27e949c623d9d93 Mon Sep 17 00:00:00 2001 From: gabryelreyes Date: Thu, 23 Nov 2023 13:44:35 +0100 Subject: [PATCH] Updated applications to SerialMuxProt v2.1.0 --- lib/APPConvoyLeader/App.cpp | 6 ++++-- lib/APPConvoyLeader/library.json | 2 +- lib/APPRemoteControl/App.cpp | 12 ++++++++---- lib/APPRemoteControl/library.json | 2 +- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/lib/APPConvoyLeader/App.cpp b/lib/APPConvoyLeader/App.cpp index 0fc3ff42..944f219f 100644 --- a/lib/APPConvoyLeader/App.cpp +++ b/lib/APPConvoyLeader/App.cpp @@ -56,7 +56,7 @@ * Prototypes *****************************************************************************/ -static void App_motorSpeedSetpointsChannelCallback(const uint8_t* payload, const uint8_t payloadSize); +static void App_motorSpeedSetpointsChannelCallback(const uint8_t* payload, const uint8_t payloadSize, void* userData); /****************************************************************************** * Local Variables @@ -167,9 +167,11 @@ void App::reportSpeed() * * @param[in] payload Motor speed left/right * @param[in] payloadSize Size of twice motor speeds + * @param[in] userData User data */ -void App_motorSpeedSetpointsChannelCallback(const uint8_t* payload, const uint8_t payloadSize) +void App_motorSpeedSetpointsChannelCallback(const uint8_t* payload, const uint8_t payloadSize, void* userData) { + (void)userData; if ((nullptr != payload) && (SPEED_SETPOINT_CHANNEL_DLC == payloadSize)) { const SpeedData* motorSpeedData = reinterpret_cast(payload); diff --git a/lib/APPConvoyLeader/library.json b/lib/APPConvoyLeader/library.json index b64bdca8..ce3ce238 100644 --- a/lib/APPConvoyLeader/library.json +++ b/lib/APPConvoyLeader/library.json @@ -21,7 +21,7 @@ { "owner": "gabryelreyes", "name": "SerialMuxProt", - "version": "^1.0.0" + "version": "^2.0.0" } ], "frameworks": "*", diff --git a/lib/APPRemoteControl/App.cpp b/lib/APPRemoteControl/App.cpp index ae896655..9ff245f5 100644 --- a/lib/APPRemoteControl/App.cpp +++ b/lib/APPRemoteControl/App.cpp @@ -58,8 +58,8 @@ * Prototypes *****************************************************************************/ -static void App_cmdChannelCallback(const uint8_t* payload, const uint8_t payloadSize); -static void App_motorSpeedsChannelCallback(const uint8_t* payload, const uint8_t payloadSize); +static void App_cmdChannelCallback(const uint8_t* payload, const uint8_t payloadSize, void* userData); +static void App_motorSpeedsChannelCallback(const uint8_t* payload, const uint8_t payloadSize, void* userData); /****************************************************************************** * Local Variables @@ -191,9 +191,11 @@ void App::sendLineSensorsData() const * * @param[in] payload Command id * @param[in] payloadSize Size of command id + * @param[in] userData User data */ -static void App_cmdChannelCallback(const uint8_t* payload, const uint8_t payloadSize) +static void App_cmdChannelCallback(const uint8_t* payload, const uint8_t payloadSize, void* userData) { + (void)userData; if ((nullptr != payload) && (sizeof(RemoteCtrlState::CmdId) == payloadSize)) { RemoteCtrlState::CmdId cmdId = *reinterpret_cast(payload); @@ -207,9 +209,11 @@ static void App_cmdChannelCallback(const uint8_t* payload, const uint8_t payload * * @param[in] payload Motor speed left/right * @param[in] payloadSize Size of twice motor speeds + * @param[in] userData User data */ -static void App_motorSpeedsChannelCallback(const uint8_t* payload, const uint8_t payloadSize) +static void App_motorSpeedsChannelCallback(const uint8_t* payload, const uint8_t payloadSize, void* userData) { + (void)userData; if ((nullptr != payload) && (SPEED_SETPOINT_CHANNEL_DLC == payloadSize) && (true == gIsRemoteCtrlActive)) { const SpeedData* motorSpeedData = reinterpret_cast(payload); diff --git a/lib/APPRemoteControl/library.json b/lib/APPRemoteControl/library.json index 07bf8037..efcce554 100644 --- a/lib/APPRemoteControl/library.json +++ b/lib/APPRemoteControl/library.json @@ -21,7 +21,7 @@ { "owner": "gabryelreyes", "name": "SerialMuxProt", - "version": "^1.0.0" + "version": "^2.0.0" } ], "frameworks": "*",