diff --git a/Participant.cpp b/Participant.cpp index c3cf0ad..b8e0d16 100644 --- a/Participant.cpp +++ b/Participant.cpp @@ -70,7 +70,7 @@ bool Participant::Send(IMessage* msg) { return thisWindows->Send(remoteParticipant, bufferSize); #elif defined(__unix__) || defined(__APPLE__) Posix::ParticipantUDP* thisPosix = static_cast(this); - return thisPosix->Send(remoteParticipant, bufferSize); + return thisPosix->Send(this, bufferSize); #elif defined(ARDUINO) Arduino::ParticipantUDP* thisArduino = static_cast(this); diff --git a/examples/BB2B.cpp b/examples/BB2B.cpp index 8a51d01..05d80f4 100644 --- a/examples/BB2B.cpp +++ b/examples/BB2B.cpp @@ -27,10 +27,10 @@ int main() { while (true) { // The left wheel turns forward when nothing is touched on the right side // and turn backward when the roboid hits something on the right - float leftWheelSpeed = (touchRight.internalTouch) ? -600.0f : 600.0f; + float leftWheelSpeed = (touchRight.IsTouching()) ? -600.0f : 600.0f; // The right wheel does the same, but instead is controlled by // touches on the left side - float rightWheelSpeed = (touchLeft.internalTouch) ? -600.0f : 600.0f; + float rightWheelSpeed = (touchLeft.IsTouching()) ? -600.0f : 600.0f; // When both sides are touching something, both wheels will turn backward // and the roboid will move backwards bb2b.SetWheelVelocity(leftWheelSpeed, rightWheelSpeed); diff --git a/test/thing_test.cc b/test/thing_test.cc index ff651c3..9414754 100644 --- a/test/thing_test.cc +++ b/test/thing_test.cc @@ -15,7 +15,7 @@ TEST(RoboidControlSuite, HiddenParticipant) { unsigned long milliseconds = Thing::GetTimeMs(); unsigned long startTime = milliseconds; while (milliseconds < startTime + 1000) { - Thing::UpdateThings(); + thing->Update(); milliseconds = Thing::GetTimeMs(); } @@ -23,7 +23,7 @@ TEST(RoboidControlSuite, HiddenParticipant) { } TEST(RoboidControlSuite, IsolatedParticipant) { - ParticipantUDP* participant = ParticipantUDP::Isolated(); + ParticipantUDP* participant = new ParticipantUDP(0); Thing* thing = new Thing(); unsigned long milliseconds = Thing::GetTimeMs();