dever 4 years ago
parent
commit
b46e4a1463
1 changed files with 1 additions and 4 deletions
  1. 1 4
      service/modbus/handle.py

+ 1 - 4
service/modbus/handle.py

@@ -118,11 +118,10 @@ class Handle(object):
 			config['method'] = hardware['key']
 			config['child'] = info['hardware_id']
 			code = self.getCode(i, code)
-
+			code['exp'] = exp[j]
 			if write_value:
 				value = self.getSourceValue(code, info, write_value)
 			else:
-				code['exp'] = exp[j]
 				'''
 				if write_address:
 					write = write_address[j]
@@ -167,14 +166,12 @@ class Handle(object):
 		return self.exp(code, info, value)
 
 	def exp(self, code, info, value):
-		print(value)
 		if value and value != '0':
 			if 'exp' in code and code['exp']:
 				value = Demeter.exp(code['exp'], value)
 			if 'exp' in info and info['exp'] and info['exp'] != '-1':
 				value = Demeter.exp(info['exp'], value)
 			value = str(round(float(value), 2))
-		print(value)
 		return value
 
 	def hex2dec(self, string_num):