equal
deleted
inserted
replaced
23 # along with this program; if not, write to the Free Software |
23 # along with this program; if not, write to the Free Software |
24 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
24 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
25 |
25 |
26 |
26 |
27 from __future__ import absolute_import |
27 from __future__ import absolute_import |
|
28 from __future__ import division |
28 from types import * |
29 from types import * |
29 import re |
30 import re |
30 from collections import OrderedDict |
31 from collections import OrderedDict |
31 |
32 |
32 from six.moves import xrange |
33 from six.moves import xrange |
260 text += "%dm" % time_values[1] |
261 text += "%dm" % time_values[1] |
261 if time_values[2] != 0: |
262 if time_values[2] != 0: |
262 text += "%ds" % time_values[2] |
263 text += "%ds" % time_values[2] |
263 if time_values[3] != 0: |
264 if time_values[3] != 0: |
264 if time_values[3] % 1000 != 0: |
265 if time_values[3] % 1000 != 0: |
265 text += "%.3fms" % (float(time_values[3]) / 1000) |
266 text += "%.3fms" % (time_values[3] / 1000) |
266 else: |
267 else: |
267 text += "%dms" % (time_values[3] / 1000) |
268 text += "%dms" % (time_values[3] // 1000) |
268 task.set("interval", text) |
269 task.set("interval", text) |
269 |
270 |
270 # Update resources pou instance attributes |
271 # Update resources pou instance attributes |
271 for pouInstance in ResourceInstancesXpath(resource): |
272 for pouInstance in ResourceInstancesXpath(resource): |
272 type_name = pouInstance.attrib.pop("type") |
273 type_name = pouInstance.attrib.pop("type") |