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

from Soti.Connect.SemanticEngine.Conversions import Converter

print("Loading BixolonXMRSpeed Converter")

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


plugin = BixolonXMRSpeed("BixolonXMRSpeed")

store.AddConverter(plugin)