Skip to content

Commit

Permalink
Merge branch 'mjcarroll/green_build' of github.com:ignitionrobotics/i…
Browse files Browse the repository at this point in the history
…gn-gazebo into mjcarroll/green_build
  • Loading branch information
Nate Koenig committed Oct 31, 2022
2 parents f0865c0 + a2cefba commit 2904fc4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/Conversions_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1032,9 +1032,10 @@ TEST(Conversions, ParticleEmitter)
EXPECT_NEAR(0.2, emitterMsg.max_velocity().data(), 1e-3);
EXPECT_EQ(math::Vector3d(1, 2, 3), msgs::Convert(emitterMsg.size()));
EXPECT_EQ(math::Vector3d(4, 5, 6), msgs::Convert(emitterMsg.particle_size()));
EXPECT_EQ(math::Color(0.1, 0.2, 0.3),
EXPECT_EQ(math::Color(0.1f, 0.2f, 0.3f),
msgs::Convert(emitterMsg.color_start()));
EXPECT_EQ(math::Color(0.4, 0.5, 0.6), msgs::Convert(emitterMsg.color_end()));
EXPECT_EQ(math::Color(0.4f, 0.5f, 0.6f),
msgs::Convert(emitterMsg.color_end()));
EXPECT_EQ("range_image", emitterMsg.color_range_image().data());

auto header = emitterMsg.header().data(0);
Expand Down
3 changes: 2 additions & 1 deletion src/systems/rf_comms/RFComms.cc
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,8 @@ std::tuple<bool, double> RFComms::Implementation::AttemptSend(

// Compute prospective accumulated bits along with time window
// (including this packet).
double bitsReceived = (_rxState.bytesReceivedThisEpoch + _numBytes) * 8;
auto bitsReceived =
static_cast<double>((_rxState.bytesReceivedThisEpoch + _numBytes) * 8);

// Check current epoch bitrate vs capacity and fail to send accordingly.
if (bitsReceived > this->radioConfig.capacity * this->epochDuration)
Expand Down
6 changes: 4 additions & 2 deletions test/integration/scene_broadcaster_system.cc
Original file line number Diff line number Diff line change
Expand Up @@ -960,10 +960,12 @@ TEST_P(SceneBroadcasterTest,
EXPECT_TRUE(result);

ASSERT_TRUE(res.has_ambient());
EXPECT_EQ(math::Color(1.0, 1.0, 1.0, 1.0), msgs::Convert(res.ambient()));
EXPECT_EQ(math::Color(1.0f, 1.0f, 1.0f, 1.0f),
msgs::Convert(res.ambient()));

ASSERT_TRUE(res.has_background());
EXPECT_EQ(math::Color(0.8, 0.8, 0.8, 1.0), msgs::Convert(res.background()));
EXPECT_EQ(math::Color(0.8f, 0.8f, 0.8f, 1.0f),
msgs::Convert(res.background()));

EXPECT_TRUE(res.shadows());
EXPECT_FALSE(res.grid());
Expand Down

0 comments on commit 2904fc4

Please sign in to comment.