Skip to content

Commit

Permalink
remove Rotary_Speed Global variable
Browse files Browse the repository at this point in the history
replaced by `DerivedDrawInfo.AverageGS`
  • Loading branch information
brunotl committed Sep 17, 2024
1 parent 1eab652 commit e15f80a
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 8 deletions.
1 change: 0 additions & 1 deletion Common/Header/Globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,6 @@ GEXTERN bool Flags_DrawXC;
GEXTERN unsigned int Trip_Moving_Time;
GEXTERN unsigned int Trip_Steady_Time;

GEXTERN double Rotary_Speed;
GEXTERN double Rotary_Distance;

GEXTERN unsigned short Multimap1;
Expand Down
5 changes: 0 additions & 5 deletions Common/Source/Calc/LDRotaryBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ bool InitLDRotary(ldrotary_s *buf) {

Log("InitLdRotary size=%d\r\n", buf->size);

Rotary_Speed=0;
Rotary_Distance=0;

return false;
Expand Down Expand Up @@ -244,10 +243,6 @@ double CalculateLDRotary(ldrotary_s *buf, NMEA_INFO *Basic, DERIVED_INFO *Calcul
averias = bc.totalias/bc.size;
averias/=100;

if (ISCAR) {
Rotary_Speed=averias;
}

// We use GPS altitude to be sure that the tas is correct, we dont know in fact
// if qnh is correct, while gps is generally accurate for the purpose.
avertas = TrueAirSpeed(averias, QNHAltitudeToQNEAltitude(Basic->Altitude));
Expand Down
2 changes: 1 addition & 1 deletion Common/Source/Draw/LKProcess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3368,7 +3368,7 @@ bool MapWindow::LKFormatValue(const short lkindex, const bool lktitle,
break;

case LK_SPEED_AVG:
_stprintf(BufferValue, _T("%.1f"), Units::ToHorizontalSpeed(Rotary_Speed));
_stprintf(BufferValue, _T("%.1f"), Units::ToHorizontalSpeed(DerivedDrawInfo.AverageGS));
_stprintf(BufferTitle, _T("AvgSpd"));
_stprintf(BufferUnit, TEXT("%s"), (Units::GetHorizontalSpeedName()));
valid = true;
Expand Down
1 change: 0 additions & 1 deletion Common/Source/Globals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,6 @@ void Globals_Init(void) {
Trip_Moving_Time=0;
Trip_Steady_Time=0;

Rotary_Speed=0;
Rotary_Distance=0;

Flags_DrawTask=true;
Expand Down

0 comments on commit e15f80a

Please sign in to comment.