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
def test_value_getter(self): sig = CANSignal('Signal', 0, 8) sig.factor = 2.5 sig.offset = 1.25 sig.raw_value = 2 assert sig.value == sig.raw_value * 2.5 + 1.25