If task type is changed from 'interrupt' to 'cyclic' init interval with T#20ms.
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Wed, 27 Jun 2018 10:58:45 +0300
changeset 2232 3220dd020675
parent 2231 7d87a0f98345
child 2233 32445e3c9cfc
If task type is changed from 'interrupt' to 'cyclic' init interval with T#20ms.
editors/ResourceEditor.py
--- a/editors/ResourceEditor.py	Tue Jun 26 18:02:51 2018 +0300
+++ b/editors/ResourceEditor.py	Wed Jun 27 10:58:45 2018 +0300
@@ -500,6 +500,8 @@
                     name = self.InstancesTable.GetValueByName(i, "Task").upper()
                     if old_name == name:
                         self.InstancesTable.SetValueByName(i, "Task", new_name)
+        if self.TasksTable.GetColLabelValue(col, False) == "Triggering":
+            self.TasksTable.SetValueByName(row, "Interval", "T#20ms")
         self.RefreshModel()
         colname = self.TasksTable.GetColLabelValue(col, False)
         if colname in ["Triggering", "Name", "Single", "Interval"]: