Update many stuff, see toDo
Took 9 seconds
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user