some fixes
This commit is contained in:
parent
61de3f3a5b
commit
c1bf7fd13a
@ -8,7 +8,9 @@ import RegisterDatapoint
|
||||
import logging
|
||||
import Converters
|
||||
|
||||
class CmdInterpreterException(ValueError): pass
|
||||
class CmdInterpreterException(ValueError):
|
||||
pass
|
||||
|
||||
|
||||
def parseIntArbitraryBase(s):
|
||||
i = 0
|
||||
@ -20,6 +22,7 @@ def parseIntArbitraryBase(s):
|
||||
i = int(s, 10)
|
||||
return i
|
||||
|
||||
|
||||
class CmdInterpreter(cmd.Cmd):
|
||||
def __init__(self, infile, outfile, config, notifier, registers):
|
||||
super().__init__(stdin=infile, stdout=outfile)
|
||||
@ -50,11 +53,12 @@ class CmdInterpreter(cmd.Cmd):
|
||||
|
||||
|
||||
def __listConverterNames(self):
|
||||
return [ name for name in Converters.Converters ]
|
||||
return [name for name in Converters.Converters]
|
||||
|
||||
def do_add_hr(self, arg):
|
||||
try:
|
||||
(label, unit, address, count, scanrate, readTopic, writeTopic, feedbackTopic, converter) = self.splitterRe.split(arg)
|
||||
(label, unit, address, count, scanrate, readTopic, writeTopic, feedbackTopic, converter) =
|
||||
self.splitterRe.split(arg)
|
||||
self.__println("Label: {0}".format(label))
|
||||
self.__println("Unit: {0}".format(unit))
|
||||
self.__println("Address: {0}".format(address))
|
||||
|
Loading…
x
Reference in New Issue
Block a user