Update many stuff, see toDo

Took 9 seconds
This commit is contained in:
2023-01-11 18:34:17 +01:00
parent 05fa75f63c
commit cb72920611
16 changed files with 2540 additions and 2103 deletions

View File

@ -157,6 +157,37 @@ router.ws('/', async (ws, req, next) => {
WebSocketHandler.answerRequest(msg.data["type"] as RequestType, "ok");
break;
}
case RequestType.CHECK: {
await iTender.clearAllRawMeasurements();
let content : {error: boolean, msg: string} = {
error: false,
msg: ""
};
// Check config
/// Check Proxy
if( Settings.get("arduino_proxy_enabled") == true )
{
}
// Check measurements
await iTender.measureAllRaw();
for( let c of await Container.find() )
{
if( c.sensorType != SensorType.NONE && c.rawData == -1 )
{
content.error = true;
content.msg = "Container " + (c.slot+1) + " weist Fehler im Sensor auf.<br>Überprüfe die Einstellungen der Sensoren-Pins.";
return WebSocketHandler.answerRequest(msg.data["type"] as RequestType, content);
}
}
break;
}
case RequestType.TARE: {
let type = msg.data["type"];
// Start TARE