mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-13 15:45:42 +08:00
Fine tuning of Ident . Xpdr Ident is send for some seconds, then resets to its original value.
However, an intended changed during this time was ignored. Fixed this issue.
This commit is contained in:
@@ -130,6 +130,7 @@ private:
|
|||||||
QPixmap m_resPixmapVoiceMuted;
|
QPixmap m_resPixmapVoiceMuted;
|
||||||
QPoint m_dragPosition; /*!< position, if moving is handled with frameless window */
|
QPoint m_dragPosition; /*!< position, if moving is handled with frameless window */
|
||||||
QMenu *m_contextMenuAudio; /*! Audio context menu */
|
QMenu *m_contextMenuAudio; /*! Audio context menu */
|
||||||
|
QString m_transponderResetValue; /*! Temp. storage of XPdr mode to reset, req. until timer allows singleShoot with Lambdas */
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief GUI status update
|
* \brief GUI status update
|
||||||
@@ -421,14 +422,9 @@ private slots:
|
|||||||
void audioDeviceSelected(int index);
|
void audioDeviceSelected(int index);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Reset transponder to standby
|
* \brief Reset transponder to Standby / Charly
|
||||||
*/
|
*/
|
||||||
void resetTransponderModerToStandby();
|
void resetTransponderMode();
|
||||||
|
|
||||||
/*!
|
|
||||||
* \brief Reset transponder to Charly
|
|
||||||
*/
|
|
||||||
void resetTransponderModerToCharly();
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Override voice room (allows to set an arbitrary voice room for testing purposes)
|
* \brief Override voice room (allows to set an arbitrary voice room for testing purposes)
|
||||||
|
|||||||
@@ -40,7 +40,16 @@ void MainWindow::cockpitValuesChanged()
|
|||||||
else if (sender == this->ui->pb_CockpitIdent)
|
else if (sender == this->ui->pb_CockpitIdent)
|
||||||
{
|
{
|
||||||
// trigger the real button
|
// trigger the real button
|
||||||
this->ui->cb_CockpitTransponderMode->setCurrentText("I");
|
if (this->ui->cb_CockpitTransponderMode->currentText() == "I")
|
||||||
|
{
|
||||||
|
this->ui->pb_CockpitIdent->setStyleSheet("");
|
||||||
|
this->resetTransponderMode();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this->ui->pb_CockpitIdent->setStyleSheet("background: red");
|
||||||
|
this->ui->cb_CockpitTransponderMode->setCurrentText("I"); // trigger real button and whole process
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -138,19 +147,16 @@ void MainWindow::updateCockpitFromContext()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Reset transponder mode to Standby
|
* Reset transponder mode to Standby / Charly
|
||||||
*/
|
*/
|
||||||
void MainWindow::resetTransponderModerToStandby()
|
void MainWindow::resetTransponderMode()
|
||||||
{
|
{
|
||||||
this->ui->cb_CockpitTransponderMode->setCurrentText("S");
|
this->ui->pb_CockpitIdent->setStyleSheet("");
|
||||||
}
|
if (this->ui->cb_CockpitTransponderMode->currentText() == "I")
|
||||||
|
{
|
||||||
/*
|
// only reset if still "I"
|
||||||
* Reset transponder mode to Standby
|
this->ui->cb_CockpitTransponderMode->setCurrentText(this->m_transponderResetValue);
|
||||||
*/
|
}
|
||||||
void MainWindow::resetTransponderModerToCharly()
|
|
||||||
{
|
|
||||||
this->ui->cb_CockpitTransponderMode->setCurrentText("C");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -185,10 +191,16 @@ void MainWindow::sendCockpitUpdates()
|
|||||||
{
|
{
|
||||||
// ident shall be sent for some time, then reset
|
// ident shall be sent for some time, then reset
|
||||||
transponder.setTransponderMode(CTransponder::StateIdent);
|
transponder.setTransponderMode(CTransponder::StateIdent);
|
||||||
|
this->ui->pb_CockpitIdent->setStyleSheet("background: red");
|
||||||
if (this->m_ownAircraft.getTransponderMode() == CTransponder::ModeS)
|
if (this->m_ownAircraft.getTransponderMode() == CTransponder::ModeS)
|
||||||
QTimer::singleShot(5000, this, SLOT(resetTransponderModerToStandby()));
|
{
|
||||||
|
this->m_transponderResetValue = "S";
|
||||||
|
}
|
||||||
else
|
else
|
||||||
QTimer::singleShot(5000, this, SLOT(resetTransponderModerToCharly()));
|
{
|
||||||
|
this->m_transponderResetValue = "C";
|
||||||
|
}
|
||||||
|
QTimer::singleShot(5000, this, SLOT(resetTransponderMode()));
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -199,7 +211,6 @@ void MainWindow::sendCockpitUpdates()
|
|||||||
com2.setFrequencyActiveMHz(this->ui->ds_CockpitCom2Active->value());
|
com2.setFrequencyActiveMHz(this->ui->ds_CockpitCom2Active->value());
|
||||||
com2.setFrequencyStandbyMHz(this->ui->ds_CockpitCom2Standby->value());
|
com2.setFrequencyStandbyMHz(this->ui->ds_CockpitCom2Standby->value());
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Send to context
|
// Send to context
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user