feat(ocp): zechetti 1 added in
This commit is contained in:
@@ -25,6 +25,7 @@ import bookInLabel from "./routes/labeling/bookIn.js";
|
||||
import labelRatio from "./routes/labeling/getLabelRatio.js";
|
||||
import resetRatio from "./routes/labeling/resetLabelRatio.js";
|
||||
import materialTransferLot from "./routes/materials/lotTransfer.js";
|
||||
import { zechitti1Connect } from "./controller/specialProcesses/zechettis/zechetti1.js";
|
||||
|
||||
const app = new OpenAPIHono();
|
||||
|
||||
@@ -69,6 +70,7 @@ app.all("/ocp/*", (c) => {
|
||||
*/
|
||||
const dycoActive = setting.filter((n) => n.name == "dycoConnect");
|
||||
const ocpActive = setting.filter((n) => n.name === "ocpActive");
|
||||
const zechetti = setting.filter((n) => n.name == "zechetti");
|
||||
// run the printer update on restart just to keep everything good
|
||||
|
||||
// do the intnal connection to the dyco
|
||||
@@ -78,6 +80,13 @@ setTimeout(() => {
|
||||
}
|
||||
}, 3 * 1000);
|
||||
|
||||
// if zechetti plc is wanted we will connect
|
||||
setTimeout(() => {
|
||||
if (zechetti[0]?.value === "1") {
|
||||
zechitti1Connect();
|
||||
}
|
||||
}, 3 * 1000);
|
||||
|
||||
// check for printers being assigned
|
||||
setInterval(() => {
|
||||
if (ocpActive[0]?.value === "1") {
|
||||
|
||||
Reference in New Issue
Block a user