Skip to content

Commit 8f9bff0

Browse files
committed
Fixed a wrong heading display for EuroScope Beta users.
1 parent a340c5c commit 8f9bff0

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -200,3 +200,4 @@ FakesAssemblies/
200200
/ModeS/version.txt
201201
/ModeS/SectorFileProviderDescriptor.txt
202202
/ModeS/euroscope_sector_providers.txt
203+
/ModeS/ipaddr.txt

ModeS/ModeS2.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void CModeS::OnGetTagItem(CFlightPlan FlightPlan, CRadarTarget RadarTarget, int
4444
return;
4545

4646
if (msc.isAcModeS(FlightPlan))
47-
snprintf(sItemString, 16, "%03i", RadarTarget.GetPosition().GetReportedHeading());
47+
snprintf(sItemString, 16, "%03i", RadarTarget.GetPosition().GetReportedHeading() % 360);
4848
}
4949

5050
else if (ItemCode == ItemCodes::TAG_ITEM_MODESROLLAGL) {
@@ -62,7 +62,7 @@ void CModeS::OnGetTagItem(CFlightPlan FlightPlan, CRadarTarget RadarTarget, int
6262
return;
6363

6464
if (msc.isAcModeS(FlightPlan) && FlightPlan.GetCorrelatedRadarTarget().IsValid())
65-
strcpy_s(sItemString, 16, to_string(RadarTarget.GetPosition().GetReportedGS()).c_str());
65+
snprintf(sItemString, 16, "%03i", RadarTarget.GetPosition().GetReportedGS());
6666
}
6767
}
6868

0 commit comments

Comments
 (0)