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

+ 3 - 1
service/modbus/handle.py

@@ -154,6 +154,7 @@ class Handle(object):
 		print(value)
 
 		value = self.hex2dec(value)
+		print(value)
 		return self.exp(code, info, value)
 
 	def getValue(self, code, master, info):
@@ -172,10 +173,11 @@ class Handle(object):
 			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): 
-		start = string_num[0:1]
+		#start = string_num[0:1]
 		#大于8为负数 后续处理吧
 
 		return str(int(string_num.upper(), 16))