{Companion] Unload simulator libraries after each use -- reset all statically initialized firmware variables. (#4655)
* [simulatormainwindow] Move sub-window destructors to main destructor. * [simulation] Move SimulatorInterface creation/ownership to SimulatorMainWindow. * [simulation] Add option to unload simulator libraries after each use (eg. from Companion) so as to properly reset all statically initialized firmware variables; Introduce new SimulatorLoader class.
This commit is contained in:
committed by
Bertrand Songis
parent
dc89d2d630
commit
e48b1fd07d
@@ -1837,16 +1837,6 @@ void Firmware::addOptions(Option options[])
|
||||
this->opts.push_back(opts);
|
||||
}
|
||||
|
||||
SimulatorInterface * getCurrentSimulator()
|
||||
{
|
||||
QString firmwareId = getCurrentFirmware()->getId();
|
||||
SimulatorFactory * factory = getSimulatorFactory(firmwareId);
|
||||
if (factory)
|
||||
return factory->create();
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void FlightModeData::clear(const int phase)
|
||||
{
|
||||
memset(this, 0, sizeof(FlightModeData));
|
||||
|
||||
Reference in New Issue
Block a user