Fixed Decimal conversion
# The tester module.
import time
+import decimal
try:
from collections import UserDict
@@ -213,7 +214,7 @@ class Message(UserDict, object):
maximum = 0 if not signal.maximum else signal.maximum
if signal.initial:
# use initial signal value (if set)
- initial_sig_values[signal.name] = (signal.initial * signal.scale) + signal.offset
+ initial_sig_values[signal.name] = (signal.initial * decimal.Decimal(signal.scale)) + decimal.Decimal(signal.offset)
elif minimum <= 0 <= maximum:
# use 0 if in allowed range
initial_sig_values[signal.name] = 0
