Commit 30876794 authored by liyuanhong's avatar liyuanhong

修复M500故障码最多只能发送9的的问题

parent bfb189d3
......@@ -362,7 +362,7 @@ class DataUpstreamTransport_msg(MessageBase):
# troubleCode = troubleCode + self.int2hexStringByBytes(i,4)
tbc0 = systemId
tbc1 = self.int2hexStringByBytes(0)
tbc2 = self.int2hexStringByBytes(i)
tbc2 = self.int2hexStringByBytes(i + 1)
tbc3 = self.int2hexStringByBytes(0)
troubleCode = troubleCode + tbc0 + tbc1 + tbc2 + tbc3
data = infoTime + latitude + longitude + troubleCodeNumsHex + troubleCode
......
......@@ -1265,11 +1265,17 @@ function sendTroubleCode(){
var systemId = $("#systemId").val()
var status = $("#status").val()
var troubleCode = []
var conTemp = ""
for(var i = 0;i < troubleCodeNum;i++){
var temp = {}
temp["systemId"] = systemId
temp["content1"] = "00"
temp["content2"] = "0" + (i + 1)
conTemp = (i + 1).toString(16);
if(conTemp.length == 1){
temp["content2"] = "0" + conTemp
}else{
temp["content2"] = conTemp
}
temp["status"] = status
troubleCode.push(temp)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment