1
0
mirror of https://github.com/s00500/ESPUI.git synced 2024-09-16 17:31:49 +00:00

Added some debug output

This commit is contained in:
MartinMueller2003 2024-03-05 13:33:48 -05:00
parent 4944f0ff04
commit 09aede269b

15
data/js/controls.js vendored
View File

@ -225,7 +225,7 @@ function handleVisibilityChange() {
function start() { function start() {
let location = window.location.hostname; let location = window.location.hostname;
let port = window.location.port; let port = window.location.port;
// let location = "192.168.10.219"; // let location = "192.168.10.198";
// let port = ""; // let port = "";
document.addEventListener("visibilitychange", handleVisibilityChange, false); document.addEventListener("visibilitychange", handleVisibilityChange, false);
@ -655,6 +655,7 @@ function start() {
break; break;
case UI_FRAGMENT: case UI_FRAGMENT:
// console.info("Starting Fragment Processing");
let FragmentLen = data.length; let FragmentLen = data.length;
let FragementOffset = data.offset; let FragementOffset = data.offset;
let NextFragmentOffset = FragementOffset + FragmentLen; let NextFragmentOffset = FragementOffset + FragmentLen;
@ -671,6 +672,7 @@ function start() {
if (!data.hasOwnProperty('control')) if (!data.hasOwnProperty('control'))
{ {
console.error("UI_FRAGMENT:Missing control record, skipping control"); console.error("UI_FRAGMENT:Missing control record, skipping control");
// console.info("Done Fragment Processing");
break; break;
} }
let control = data.control; let control = data.control;
@ -686,7 +688,8 @@ function start() {
StartFragmentAssemblyTimer(control.id); StartFragmentAssemblyTimer(control.id);
let TotalRequest = JSON.stringify({ 'id' : control.id, 'offset' : NextFragmentOffset }); let TotalRequest = JSON.stringify({ 'id' : control.id, 'offset' : NextFragmentOffset });
websock.send("uifragmentok:" + 0 + ": " + TotalRequest + ":"); websock.send("uifragmentok:" + 0 + ": " + TotalRequest + ":");
// console.info("asked for fragment 2"); // console.info("asked for fragment " + TotalRequest);
// console.info("Done Fragment Processing");
break; break;
} }
@ -698,7 +701,8 @@ function start() {
StartFragmentAssemblyTimer(control.id); StartFragmentAssemblyTimer(control.id);
let TotalRequest = JSON.stringify({ 'id' : control.id, 'offset' : 0 }); let TotalRequest = JSON.stringify({ 'id' : control.id, 'offset' : 0 });
websock.send("uifragmentok:" + 0 + ": " + TotalRequest + ":"); websock.send("uifragmentok:" + 0 + ": " + TotalRequest + ":");
// console.info("asked for fragment 1"); // console.info("asked for fragment " + TotalRequest);
// console.info("Done Fragment Processing");
break; break;
} }
@ -709,7 +713,8 @@ function start() {
StartFragmentAssemblyTimer(control.id); StartFragmentAssemblyTimer(control.id);
let TotalRequest = JSON.stringify({ 'id' : control.id, 'offset' : controlAssemblyArray[control.id].length + controlAssemblyArray[control.id].offset }); let TotalRequest = JSON.stringify({ 'id' : control.id, 'offset' : controlAssemblyArray[control.id].length + controlAssemblyArray[control.id].offset });
websock.send("uifragmentok:" + 0 + ": " + TotalRequest + ":"); websock.send("uifragmentok:" + 0 + ": " + TotalRequest + ":");
// console.info("asked for the expected fragment"); // console.info("asked for the expected fragment: " + TotalRequest);
// console.info("Done Fragment Processing");
break; break;
} }
@ -733,7 +738,9 @@ function start() {
StartFragmentAssemblyTimer(control.id); StartFragmentAssemblyTimer(control.id);
let TotalRequest = JSON.stringify({ 'id' : control.id, 'offset' : NextFragmentOffset}); let TotalRequest = JSON.stringify({ 'id' : control.id, 'offset' : NextFragmentOffset});
websock.send("uifragmentok:" + 0 + ": " + TotalRequest + ":"); websock.send("uifragmentok:" + 0 + ": " + TotalRequest + ":");
// console.info("asked for the next fragment: " + TotalRequest);
} }
// console.info("Done Fragment Processing");
break; break;
default: default: