G92 > send-to-ESP

This commit is contained in:
ChK
2026-04-06 05:24:41 +02:00
parent 3e874e70c9
commit 3d33ecd747
12 changed files with 3337 additions and 20 deletions

View File

@@ -187,6 +187,15 @@ const infoServer = https.createServer(httpsOptions, (req, res) => {
res.writeHead(200, {'Content-Type': 'text/css'});
res.end(data);
}
}); } else if (req.url === '/allApps.css') {
fs.readFile('./public/allApps.css', (err, data) => {
if (err) {
res.writeHead(404);
res.end('Not found');
} else {
res.writeHead(200, {'Content-Type': 'text/css'});
res.end(data);
}
});
} else if (req.url === '/api/status') {
const status = {
@@ -196,8 +205,8 @@ const infoServer = https.createServer(httpsOptions, (req, res) => {
{name: 'Elbow', status: telnetSender2?.tSocket ? 'connected' : 'disconnected'},
{name: 'Hand', status: telnetSender3?.tSocket ? 'connected' : 'disconnected'}
],
lastCommands: getLastLines('./logs/gcode_commands.log', 10),
lastPings: getLastLines('./logs/pings.log', 10)
lastCommands: getLastLines('./logs/gcode_commands.log', 15),
lastPings: getLastLines('./logs/pings.log', 15)
};
res.writeHead(200, {'Content-Type': 'application/json'});
res.end(JSON.stringify(status));