Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Namespace drone does no longer exist, use namespace udral instead. #146

Merged
merged 1 commit into from
Jun 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions examples/OpenCyphal-BMS-Subscribe/OpenCyphal-BMS-Subscribe.ino
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
* NAMESPACE
**************************************************************************************/

using namespace reg::drone::service::battery;
using namespace reg::drone::physics::electricity;
using namespace reg::udral::service::battery;
using namespace reg::udral::physics::electricity;

/**************************************************************************************
* CONSTANTS
Expand All @@ -50,7 +50,7 @@ void onExternalEvent ();
void onReceiveBufferFull (CanardFrame const &);
void onSourceTs_0_1_Received(CanardTransfer const &, Node &);
void onStatus_0_2_Received(CanardTransfer const &, Node &);
void onParameters_0_2_Received(CanardTransfer const &, Node & );
void onParameters_0_3_Received(CanardTransfer const &, Node & );

/**************************************************************************************
* GLOBAL VARIABLES
Expand Down Expand Up @@ -91,7 +91,7 @@ void setup()
/* Subscribe to the reception of BMS message types. */
uc.subscribe<SourceTs_0_1<SOURCETS_PORT_ID>>(onSourceTs_0_1_Received);
uc.subscribe<Status_0_2<STATUS_PORT_ID>>(onStatus_0_2_Received);
uc.subscribe<Parameters_0_2<PARAMETERS_PORT_ID>>(onParameters_0_2_Received);
uc.subscribe<Parameters_0_3<PARAMETERS_PORT_ID>>(onParameters_0_3_Received);
}

void loop()
Expand Down Expand Up @@ -164,8 +164,8 @@ void onStatus_0_2_Received(CanardTransfer const & transfer, Node & /* uavcan */)
}


void onParameters_0_2_Received(CanardTransfer const & transfer, Node & /* uavcan */){
Parameters_0_2<PARAMETERS_PORT_ID> const params = Parameters_0_2<PARAMETERS_PORT_ID>::deserialize(transfer);
void onParameters_0_3_Received(CanardTransfer const & transfer, Node & /* uavcan */){
Parameters_0_3<PARAMETERS_PORT_ID> const params = Parameters_0_3<PARAMETERS_PORT_ID>::deserialize(transfer);

Serial.print("Parameters->\tUnique ID: ");
Serial.print(params.data.unique_id);
Expand Down