Fix unit tests

This commit is contained in:
Pascal Serrarens 2024-09-25 11:39:39 +02:00
parent b662348236
commit 1079a725d9
2 changed files with 2 additions and 4 deletions

View File

@ -1,6 +1,6 @@
#include "NetworkSync.h" #include "NetworkSync.h"
#define RC_DEBUG 1 // #define RC_DEBUG 1
#ifdef RC_DEBUG #ifdef RC_DEBUG
#include <Arduino.h> #include <Arduino.h>
@ -33,8 +33,6 @@ void NetworkSync::ReceiveMessage(Roboid* roboid, unsigned char bytecount) {
} }
} }
#include <Arduino.h>
// Actually, this is a kind of investigate... // Actually, this is a kind of investigate...
void NetworkSync::ReceiveNetworkId() { void NetworkSync::ReceiveNetworkId() {
this->networkId = buffer[1]; this->networkId = buffer[1];

View File

@ -411,7 +411,7 @@ TEST(BB2B, ObstacleBoth) {
// Roboid velocity // Roboid velocity
Polar velocity = diffDrive->GetVelocity(); Polar velocity = diffDrive->GetVelocity();
EXPECT_FLOAT_EQ(velocity.distance, 1.0F); EXPECT_FLOAT_EQ(velocity.distance, 1.0F);
EXPECT_FLOAT_EQ(velocity.angle.InDegrees(), 180.0F); EXPECT_FLOAT_EQ(velocity.angle.InDegrees(), -180.0F);
float angularVelocity = diffDrive->GetAngularVelocity(); float angularVelocity = diffDrive->GetAngularVelocity();
EXPECT_FLOAT_EQ(angularVelocity, 0.0F); EXPECT_FLOAT_EQ(angularVelocity, 0.0F);