Skip to content

Commit

Permalink
Merge pull request #46 from BlueAndi/feature/update_SMP_v2
Browse files Browse the repository at this point in the history
Updated applications to SerialMuxProt v2.1.0
  • Loading branch information
gabryelreyes authored Nov 23, 2023
2 parents 802a4b2 + ff01b69 commit 847d3b9
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
6 changes: 4 additions & 2 deletions lib/APPConvoyLeader/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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<const SpeedData*>(payload);
Expand Down
2 changes: 1 addition & 1 deletion lib/APPConvoyLeader/library.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
{
"owner": "gabryelreyes",
"name": "SerialMuxProt",
"version": "^1.0.0"
"version": "^2.0.0"
}
],
"frameworks": "*",
Expand Down
12 changes: 8 additions & 4 deletions lib/APPRemoteControl/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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<const RemoteCtrlState::CmdId*>(payload);
Expand All @@ -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<const SpeedData*>(payload);
Expand Down
2 changes: 1 addition & 1 deletion lib/APPRemoteControl/library.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
{
"owner": "gabryelreyes",
"name": "SerialMuxProt",
"version": "^1.0.0"
"version": "^2.0.0"
}
],
"frameworks": "*",
Expand Down

0 comments on commit 847d3b9

Please sign in to comment.