mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-14 08:45:36 +08:00
Ref T437, fixed missing update of "m_simTransponder" which caused SB area changes to be ignored
* also added SELCAL hints * sync m_simTransponder
This commit is contained in:
@@ -255,10 +255,12 @@ namespace BlackSimPlugin
|
|||||||
bool changed = false;
|
bool changed = false;
|
||||||
if (selcal != m_selcal)
|
if (selcal != m_selcal)
|
||||||
{
|
{
|
||||||
|
//! KB 2018-11 that would need to go to updateOwnAircraftFromSimulator if the simulator ever supports SELCAL
|
||||||
|
//! KB 2018-11 als we would need to send the value to FS9/FSX (currently we only deal with it on FS9/FSX level)
|
||||||
|
m_selcal = selcal;
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \todo KB 8/2017 set FS9 SELCAL value
|
|
||||||
return changed;
|
return changed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -204,12 +204,13 @@ namespace BlackSimPlugin
|
|||||||
this->triggerAutoTraceSendId();
|
this->triggerAutoTraceSendId();
|
||||||
CLogMessage(this).warning("Setting transponder mode failed (SB offsets)");
|
CLogMessage(this).warning("Setting transponder mode failed (SB offsets)");
|
||||||
}
|
}
|
||||||
|
changed = true;
|
||||||
}
|
}
|
||||||
else if (m_useFsuipc && m_fsuipc)
|
else if (m_useFsuipc && m_fsuipc)
|
||||||
{
|
{
|
||||||
m_fsuipc->write(newTransponder);
|
m_fsuipc->write(newTransponder);
|
||||||
|
changed = true;
|
||||||
}
|
}
|
||||||
changed = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// avoid changes of cockpit back to old values due to an outdated read back value
|
// avoid changes of cockpit back to old values due to an outdated read back value
|
||||||
@@ -224,8 +225,9 @@ namespace BlackSimPlugin
|
|||||||
if (originator == this->identifier()) { return false; }
|
if (originator == this->identifier()) { return false; }
|
||||||
if (!this->isSimulating()) { return false; }
|
if (!this->isSimulating()) { return false; }
|
||||||
|
|
||||||
//! \fixme KB 2017/8 use SELCAL
|
//! KB 2018-11 that would need to go to updateOwnAircraftFromSimulator if the simulator ever supports SELCAL
|
||||||
Q_UNUSED(selcal);
|
//! KB 2018-11 als we would need to send the value to FS9/FSX (currently we only deal with it on FS9/FSX level)
|
||||||
|
m_selcal = selcal;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -666,6 +668,11 @@ namespace BlackSimPlugin
|
|||||||
|
|
||||||
CTransponder transponder(myAircraft.getTransponder());
|
CTransponder transponder(myAircraft.getTransponder());
|
||||||
transponder.setTransponderCode(qRound(simulatorOwnAircraft.transponderCode));
|
transponder.setTransponderCode(qRound(simulatorOwnAircraft.transponderCode));
|
||||||
|
m_simTransponder = transponder;
|
||||||
|
|
||||||
|
// if the simulator ever sends SELCAL, add it here.
|
||||||
|
// m_selcal SELCAL sync.would go here
|
||||||
|
|
||||||
const bool changedXpr = (myAircraft.getTransponderCode() != transponder.getTransponderCode());
|
const bool changedXpr = (myAircraft.getTransponderCode() != transponder.getTransponderCode());
|
||||||
|
|
||||||
if (changedCom1 || changedCom2 || changedXpr)
|
if (changedCom1 || changedCom2 || changedXpr)
|
||||||
|
|||||||
Reference in New Issue
Block a user