示例#1
0
bool
InfoBoxContentAltitudeGPS::HandleKey(const InfoBoxKeyCodes keycode)
{
  const NMEAInfo &basic = CommonInterface::Basic();

  if (!is_simulator())
    return false;
  if (!basic.gps.simulator)
    return false;

  const Angle a5 = Angle::Degrees(5);

  switch (keycode) {
  case ibkUp:
    ChangeAltitude(fixed(+100));
    return true;

  case ibkDown:
    ChangeAltitude(fixed(-100));
    return true;

  case ibkLeft:
    device_blackboard->SetTrack(
        basic.track - a5);
    return true;

  case ibkRight:
    device_blackboard->SetTrack(
        basic.track + a5);
    return true;
  }

  return false;
}
示例#2
0
void
InfoBoxContentAltitude::PnlSimulatorOnMinusBig(gcc_unused WndButton &Sender)
{
  if (!is_simulator())
    return;

  ChangeAltitude(fixed(-100));
}
示例#3
0
void
InfoBoxContentAltitude::PnlSimulatorOnPlusSmall(gcc_unused WndButton &Sender)
{
  if (!is_simulator())
    return;

  ChangeAltitude(fixed(+10));
}
示例#4
0
static void
PnlSimulatorOnMinusBig(gcc_unused WndButton &Sender)
{
  if (!is_simulator())
    return;

  ChangeAltitude(fixed(-100));
}
示例#5
0
static void
PnlSimulatorOnPlusSmall(gcc_unused WndButton &Sender)
{
  if (!is_simulator())
    return;

  ChangeAltitude(fixed(+10));
}