Fixed in DebugDataConsumer value translation inhibit support
authorLaurent Bessard
Wed, 05 Jun 2013 00:19:11 +0200
changeset 1220 16c283246241
parent 1219 f5da9702685a
child 1221 d18ccec78117
Fixed in DebugDataConsumer value translation inhibit support
controls/DebugVariablePanel/DebugVariableItem.py
graphics/DebugDataConsumer.py
--- a/controls/DebugVariablePanel/DebugVariableItem.py	Tue Jun 04 17:29:31 2013 +0200
+++ b/controls/DebugVariablePanel/DebugVariableItem.py	Wed Jun 05 00:19:11 2013 +0200
@@ -230,7 +230,7 @@
         @param value: Value captured
         @param forced: Forced flag, True if value is forced (default: False)
         """
-        DebugDataConsumer.NewValue(self, tick, value, forced, raw_bool=False)
+        DebugDataConsumer.NewValue(self, tick, value, forced, raw=None)
         
         if self.Data is not None:
             # String data value is CRC
--- a/graphics/DebugDataConsumer.py	Tue Jun 04 17:29:31 2013 +0200
+++ b/graphics/DebugDataConsumer.py	Wed Jun 05 00:19:11 2013 +0200
@@ -197,16 +197,16 @@
         """
         self.DataType = data_type
     
-    def NewValue(self, tick, value, forced=False, raw_bool=True):
+    def NewValue(self, tick, value, forced=False, raw="BOOL"):
         """
         Function called by debug thread when a new debug value is available
         @param tick: PLC tick when value was captured
         @param value: Value captured
         @param forced: Forced flag, True if value is forced (default: False)
-        @param raw_bool: Bool values must be treated rawly (default: True)
+        @param raw: Data type of values not translated (default: 'BOOL')
         """
         # Translate value to IEC literal
-        if self.DataType != "BOOL" or not raw_bool:
+        if self.DataType != raw:
             value = TYPE_TRANSLATOR.get(self.DataType, str)(value)
         
         # Store value and forced flag when value update is inhibited