Commit 68a62db2 authored by Lucas Drezet's avatar Lucas Drezet
Browse files

fix short view

parent 124b33b8
......@@ -82,14 +82,16 @@ function pressedButtonOnFloor(floor){
data = recreateData(floor);
lastDataInput[floor][5] = 0;
transferData(data,true);
addTable(data);
addFullTable(data);
addShortTable(data);
interpretData(data);
setTimeout(() => {
lastDataInput[floor][5] = 0;
data = recreateData(floor);
lastDataInput[floor][5] = 1;
transferData(data);
addTable(data);
addFullTable(data);
addShortTable(data);
interpretData(data);
},200)
}
......@@ -102,7 +104,8 @@ function pressedButtonCabin(nbFloorPressed){
if(nbFloorPressed==4)lastDataInput[3][6] = 0;
else lastDataInput[3][8+nbFloorPressed] = 0;
transferData(data,true);
addTable(data);
addFullTable(data);
addShortTable(data);
interpretData(data);
setTimeout(() => {
if(nbFloorPressed==4)lastDataInput[3][6] = 0;
......@@ -111,7 +114,8 @@ function pressedButtonCabin(nbFloorPressed){
if(nbFloorPressed==4)lastDataInput[3][6] = 1;
else lastDataInput[3][8+nbFloorPressed] = 1;
transferData(data);
addTable(data);
addShortTable(data);
addFullTable(data);
interpretData(data);
},200)
}
......@@ -136,7 +140,7 @@ function recreateData(floor){
}
data[4] = [byte1,byte2];
arrayData[arrayCounter] = data;
arrayDataFull[arrayCounter] = data;
arrayCounter++;
document.getElementById("counterShow").innerText =
"Number of data pack received : " + arrayCounter;
......@@ -323,5 +327,5 @@ function transferData(data) {
xml += "<B2>" + data[4][1] + "</B2>\n";
xml += "</data>";
socket.send(xml);
socket.send(xml);
}
......@@ -116,7 +116,7 @@ function addShortTable(data) {
arrayDataShort[floorID][1] = data[3];
arrayDataShort[floorID][2] = data[4];
reloadShortTable();
} else if ((floor = getFloor[data[2] - defaultCANId["output"]]) != undefined) {
} else if ((floorID = getFloorID[data[2] - defaultCANId["output"]]) != undefined) {
arrayDataShort[floorID][0] = data[2];
arrayDataShort[floorID][1] = data[3];
arrayDataShort[floorID][2] = data[4];
......
Supports Markdown
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