controls/DebugVariablePanel/DebugVariableItem.py
changeset 3886 2adfa4c60bff
parent 3885 22a009561502
equal deleted inserted replaced
3885:22a009561502 3886:2adfa4c60bff
   253                 # Translate forced flag to float for storing in Data table
   253                 # Translate forced flag to float for storing in Data table
   254                 forced_value = float(forced)
   254                 forced_value = float(forced)
   255 
   255 
   256                 if self.VariableType in ["STRING", "WSTRING"]:
   256                 if self.VariableType in ["STRING", "WSTRING"]:
   257                     # String data value is CRC
   257                     # String data value is CRC
   258                     num_value = (binascii.crc32(value) & STRING_CRC_MASK)
   258                     num_value = (binascii.crc32(value.encode()) & STRING_CRC_MASK)
   259                 elif self.VariableType in ["TIME", "TOD", "DT", "DATE"]:
   259                 elif self.VariableType in ["TIME", "TOD", "DT", "DATE"]:
   260                     # Numeric value of time type variables
   260                     # Numeric value of time type variables
   261                     # is represented in seconds
   261                     # is represented in seconds
   262                     num_value = float(value.total_seconds())
   262                     num_value = float(value.total_seconds())
   263                 else:
   263                 else: