Skip to content

Commit

Permalink
adds back sampling speed warning and add log on sampling speed
Browse files Browse the repository at this point in the history
  • Loading branch information
MAKOMO committed Nov 29, 2022
1 parent 429c47b commit d676276
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/artisanlib/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11719,7 +11719,7 @@ def OnMonitor(self):
aw.eventactionx(self.extrabuttonactions[0],self.extrabuttonactionstrings[0])
except Exception as e: # pylint: disable=broad-except
_log.exception(e)
_log.info('ON MONITOR')
_log.info('ON MONITOR (sampling @%ss)', aw.float2float(self.delay/1000))
except Exception as ex: # pylint: disable=broad-except
_log.exception(ex)
_, _, exc_tb = sys.exc_info()
Expand Down
8 changes: 4 additions & 4 deletions src/artisanlib/sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
try:
#ylint: disable = E, W, R, C
from PyQt6.QtCore import Qt, pyqtSlot, QSettings # @UnusedImport @Reimport @UnresolvedImport
from PyQt6.QtWidgets import (QApplication, QHBoxLayout, QVBoxLayout, QCheckBox, QGridLayout, # @UnusedImport @Reimport @UnresolvedImport
from PyQt6.QtWidgets import (QMessageBox, QApplication, QHBoxLayout, QVBoxLayout, QCheckBox, QGridLayout, # @UnusedImport @Reimport @UnresolvedImport
QDialogButtonBox, QLayout) # @UnusedImport @Reimport @UnresolvedImport
except Exception: # pylint: disable=broad-except
#ylint: disable = E, W, R, C
from PyQt5.QtCore import Qt, pyqtSlot, QSettings # @UnusedImport @Reimport @UnresolvedImport
from PyQt5.QtWidgets import (QApplication, QHBoxLayout, QVBoxLayout, QCheckBox, QGridLayout, # @UnusedImport @Reimport @UnresolvedImport
from PyQt5.QtWidgets import (QMessageBox, QApplication, QHBoxLayout, QVBoxLayout, QCheckBox, QGridLayout, # @UnusedImport @Reimport @UnresolvedImport
QDialogButtonBox, QLayout) # @UnusedImport @Reimport @UnresolvedImport

class SamplingDlg(ArtisanDialog):
Expand Down Expand Up @@ -115,8 +115,8 @@ def ok(self):
self.aw.qmc.flagKeepON = bool(self.keepOnFlag.isChecked())
self.aw.qmc.flagOpenCompleted = bool(self.openCompletedFlag.isChecked())
self.aw.qmc.delay = int(self.interval.value()*1000.)
# if self.aw.qmc.delay < self.aw.qmc.default_delay:
# QMessageBox.warning(self.aw,QApplication.translate("Message", "Warning",None),QApplication.translate("Message", "A tight sampling interval might lead to instability on some machines. We suggest a minimum of 3s."))
if self.aw.qmc.delay < self.aw.qmc.default_delay:
QMessageBox.warning(self.aw,QApplication.translate('Message', 'Warning',None),QApplication.translate('Message', 'A tight sampling interval might lead to instability on some machines. We suggest a minimum of 1s.'))
self.storeSettings()
# self.aw.closeEventSettings()
self.accept()

0 comments on commit d676276

Please sign in to comment.