Example #1
0
 def test_value_setter_min_max(self):
     sig = CANSignal('Signal', 0, 8)
     sig.value_min = 4
     sig.value_max = 8
     sig.value = 3.9
     assert sig.value == 4
     sig.value = 8.1
     assert sig.value == 8
Example #2
0
 def test_value_setter_raw_value_conversion(self):
     sig = CANSignal('Signal', 0, 8)
     sig.factor = 2.5
     sig.offset = 1.25
     sig.value = 11.25
     assert sig.raw_value == 4
Example #3
0
 def test_value_setter_raw_value(self):
     sig = CANSignal('Signal', 0, 8)
     sig.value = 10
     assert sig.raw_value == 10