[Simulator] Further improvements (reload radio, momentary switches, etc.) (#4303)

* [Simulator] Add ability to reload all radio data w/out exiting simulator (will also adjust UI for any hardware changes); Refactor how keymap help text is generated.

* [Simulator] Only update channel/logical switch/GVar output displays if the corresponding tab is actually visible (further CPU usage reductions).

* [Simulator] Implement momentary toggle switches with "latch" function.

* [Simulator] Mouse wheel event over multi-position knobs now properly rotates them to detent positions.

* [Simulator] Fix mouse wheel event propagation after multi-position knob rotation; Cosmetics.

* [Simulator] Internals: Greatly improve object cleanup on exit; Refactor SimulatedUIWidget timer event triggering.

* [Simulator] Fix throttle stick position/lock not being set properly upon repeated launches from Companion.

* [Simulator] Fix build w/out SDL. KnobWidget cleanup.

* [Companion] Do NOT delete SimulatorInterface on simulator dialog exit (fix possible crash on dialog close).

* [Simulator] Ensure joystick is NULL at start.

* [Simulator] Fix/improve color blending on 4-bit screens with different BG colors; Cosmetics.

* [Simulator] Fix LCD screenshot folder path; Fix timer slot for Qt backwards compatibility.

* [TravisCI] Set Qt version to 5.3 to match release build servers.

* Fixed segfault when saving setup with no models defined [Horus]

* Fixed radio data import [Horus] (broken in 0f90ff0b65)

* [Simulator] Always keep toggle switch active while held with mouse button.
This commit is contained in:
Max Paperno
2017-01-28 13:43:56 +01:00
committed by Bertrand Songis
parent f40e64c2aa
commit de68db0905
16 changed files with 539 additions and 298 deletions
+7 -1
View File
@@ -261,6 +261,11 @@ int main(int argc, char *argv[])
showMessage(QObject::tr("ERROR: Simulator %1 not found").arg(simOptions.firmwareId), QMessageBox::Critical);
return finish(2);
}
SimulatorInterface * simulator = factory->create();
if (!simulator) {
showMessage(QObject::tr("ERROR: Failed to create simulator interface, possibly missing or bad library."), QMessageBox::Critical);
return finish(2);
}
current_firmware_variant = getFirmware(simOptions.firmwareId);
@@ -268,7 +273,7 @@ int main(int argc, char *argv[])
g.id(profileId);
g.simuLastProfId(profileId);
SimulatorDialog * dialog = new SimulatorDialog(NULL, factory->create(), SIMULATOR_FLAGS_STANDALONE);
SimulatorDialog * dialog = new SimulatorDialog(NULL, simulator, SIMULATOR_FLAGS_STANDALONE);
dialog->setRadioProfileId(profileId);
dialog->setOptions(simOptions, true);
dialog->start();
@@ -277,6 +282,7 @@ int main(int argc, char *argv[])
g.id(oldProfId);
dialog->deleteLater();
delete simulator;
return finish(result);
}