import clr
clr.AddReference('Soti.Connect.SemanticEngine.Conversions')

from Soti.Connect.SemanticEngine.Conversions import Converter

print("Loading BixolonXDRSpeed Converter")

class BixolonXDRSpeed(Converter):
    def Execute(self, args):
        if args == None or args[0] == None:
            return
        hi = 178
        lo = 25.4
        print(args[0])
        return max(min(float(args[0]), hi), lo)


plugin = BixolonXDRSpeed("BixolonXDRSpeed")

store.AddConverter(plugin)