1
0
Fork 0
mirror of https://github.com/EdgeTX/edgetx.git synced 2025-07-23 16:25:12 +03:00

Standalone simulator startup options (#4164)

* [simulator] Save and restore Simulator window sizes and positions (based on current radio profile).

* [simulator] Set startup throttle stick lock in standalone sim based on default mode in current Companion radio profile;
  Add new flag indicating standalone simulator;
  Unique titles for simulator console windows.

* [simulator] New/updated Simulator startup options:
  Radio profile used for standalone Simulator can now be separate from Companion;
  Allow selecting a radio profile and EEPROM image file (in addition to radio type) at startup via GUI and CLI;
  All startup settings are saved between uses.
This commit is contained in:
Max Paperno 2016-12-27 16:04:24 -05:00 committed by Bertrand Songis
parent fd01376f1e
commit e204031ef6
8 changed files with 406 additions and 183 deletions

View file

@ -814,6 +814,7 @@ void startSimulation(QWidget * parent, RadioData & radioData, int modelIdx)
if (simulator) {
#if defined(WIN32) && defined(WIN_USE_CONSOLE_STDIO)
AllocConsole();
SetConsoleTitle("Companion Console");
freopen("conin$", "r", stdin);
freopen("conout$", "w", stdout);
freopen("conout$", "w", stderr);
@ -863,11 +864,11 @@ void startSimulation(QWidget * parent, RadioData & radioData, int modelIdx)
}
dialog->exec();
delete dialog;
delete simuData;
#if defined(WIN32) && defined(WIN_USE_CONSOLE_STDIO)
FreeConsole();
#endif
delete dialog;
delete simuData;
}
else {
QMessageBox::warning(NULL,