mirror of
https://github.com/naruxde/revpicommander.git
synced 2025-11-08 16:43:53 +01:00
fix: Simulator always sets process image to NULL
This fixes the bug that the process image for the simulation is set to NULL, even though the "Start without changing actual process image" button is pressed. Signed-off-by: Sven Sager <akira@narux.de>
This commit is contained in:
@@ -476,7 +476,13 @@ class ConnectionManager(QtCore.QThread):
|
|||||||
self.connection_disconnected.emit()
|
self.connection_disconnected.emit()
|
||||||
|
|
||||||
def pyload_simulate(self, configrsc: str, procimg: str, clean_existing: bool):
|
def pyload_simulate(self, configrsc: str, procimg: str, clean_existing: bool):
|
||||||
"""Start the simulator for piControl on local computer."""
|
"""
|
||||||
|
Start the simulator for piControl on local computer.
|
||||||
|
|
||||||
|
:param configrsc: piCtory configuration
|
||||||
|
:param procimg: Process image, which is a 4 kByte file for simulation
|
||||||
|
:param clean_existing: Reset the file to ZERO \x00 bytes
|
||||||
|
"""
|
||||||
pi.logger.debug("ConnectionManager.start_simulate")
|
pi.logger.debug("ConnectionManager.start_simulate")
|
||||||
|
|
||||||
if not exists(procimg) or clean_existing:
|
if not exists(procimg) or clean_existing:
|
||||||
|
|||||||
@@ -316,7 +316,7 @@ class RevPiCommander(QtWidgets.QMainWindow, Ui_win_revpicommander):
|
|||||||
configrsc_file = helper.settings.value("simulator/configrsc", "", str)
|
configrsc_file = helper.settings.value("simulator/configrsc", "", str)
|
||||||
procimg_file = helper.settings.value("simulator/procimg", "", str)
|
procimg_file = helper.settings.value("simulator/procimg", "", str)
|
||||||
|
|
||||||
if helper.cm.pyload_simulate(configrsc_file, procimg_file, diag.cbx_stop_remove.isChecked()):
|
if helper.cm.pyload_simulate(configrsc_file, procimg_file, diag.clean_procimg):
|
||||||
QtWidgets.QMessageBox.information(
|
QtWidgets.QMessageBox.information(
|
||||||
self, self.tr("Simulator started..."), self.tr(
|
self, self.tr("Simulator started..."), self.tr(
|
||||||
"The simulator is running!\n\nYou can work with this simulator if your call "
|
"The simulator is running!\n\nYou can work with this simulator if your call "
|
||||||
|
|||||||
Reference in New Issue
Block a user