Skip to content
Snippets Groups Projects
Commit f5a947ee authored by jkerdreu's avatar jkerdreu
Browse files

Fix None value receiced.


git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/trunk@2197 b32b6428-25c9-4566-ad07-03861ab6144f
parent 29240a00
Branches
No related tags found
No related merge requests found
......@@ -21,11 +21,13 @@ def on_off(attribute,dpt,data):
def round_(attribute,dpt,data):
val = dpts.decode[dpt](data)
attribute.value = round(val)
if val!=None:
attribute.value = round(val)
def set_(attribute,dpt,data):
val = dpts.decode[dpt](data)
attribute.value = val
if val!=None:
attribute.value = val
funct = {
"bool" : bool_,
......@@ -33,4 +35,4 @@ funct = {
"round" : round_,
"set" : set_,
"on_off" : on_off,
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment