Skip to content

Commit

Permalink
fix: change colour for strong deviation
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyTWF committed Dec 28, 2023
1 parent 4323b23 commit c41e96a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/plugin/approach/GlideslopeDeviationTagItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ namespace UKControllerPlugin::Approach {
if (std::abs(deviation.deviation) < 300) {
tagData.SetTagColour(RGB(2, 48, 32));
} else {
tagData.SetTagColour(RGB(255, 0, 0));
tagData.SetTagColour(RGB(255, 87, 51));
}

// If we're massively out, abbreviate the string
Expand Down
8 changes: 4 additions & 4 deletions test/plugin/approach/GlideslopeDeviationTagItemTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ namespace UKControllerPluginTest::Approach {
glideslopeDeviationTagItem.SetTagItemData(tagData);

EXPECT_EQ("+448", tagData.GetItemString());
EXPECT_EQ(RGB(255, 0, 0), tagData.GetTagColour());
EXPECT_EQ(RGB(255, 87, 51), tagData.GetTagColour());
}

TEST_F(GlideslopeDeviationTagItemTest, ItSetsTagItemDataSlightlyAbove)
Expand All @@ -91,7 +91,7 @@ namespace UKControllerPluginTest::Approach {
glideslopeDeviationTagItem.SetTagItemData(tagData);

EXPECT_EQ("-448", tagData.GetItemString());
EXPECT_EQ(RGB(255, 0, 0), tagData.GetTagColour());
EXPECT_EQ(RGB(255, 87, 51), tagData.GetTagColour());
}

TEST_F(GlideslopeDeviationTagItemTest, ItSetsTagItemDataSlightlyBelow)
Expand All @@ -111,7 +111,7 @@ namespace UKControllerPluginTest::Approach {
glideslopeDeviationTagItem.SetTagItemData(tagData);

EXPECT_EQ(">1k", tagData.GetItemString());
EXPECT_EQ(RGB(255, 0, 0), tagData.GetTagColour());
EXPECT_EQ(RGB(255, 87, 51), tagData.GetTagColour());
}

TEST_F(GlideslopeDeviationTagItemTest, ItSetsTagItemDataOver1000FeetBelowGlideslope)
Expand All @@ -121,7 +121,7 @@ namespace UKControllerPluginTest::Approach {
glideslopeDeviationTagItem.SetTagItemData(tagData);

EXPECT_EQ("<1k", tagData.GetItemString());
EXPECT_EQ(RGB(255, 0, 0), tagData.GetTagColour());
EXPECT_EQ(RGB(255, 87, 51), tagData.GetTagColour());
}

TEST_F(GlideslopeDeviationTagItemTest, ItDoesntSetTagItemDataIfRunwayNotFound)
Expand Down

0 comments on commit c41e96a

Please sign in to comment.