fix: digital inputs status LED

This commit is contained in:
ISA
2025-06-20 11:49:13 +02:00
parent b233694fed
commit 846abedae4
8 changed files with 14 additions and 10 deletions

View File

@@ -29,6 +29,7 @@ export const fetchDigitalInputsService = async () => {
weighting: win.win_de_weighting[i],
counterActive: !!win.win_de_counter_active[i],
eingangOffline: !!win.win_de_offline[i],
status: !!win.win_de_state[i],
}));
}
@@ -39,7 +40,7 @@ export const fetchDigitalInputsService = async () => {
throw new Error("❌ Fehler beim Laden der digitalen Eingänge (json)");
const data = await res.json();
console.log("📡 JSON-Daten geladen in service:", data);
return data.win_de_state.map((_: any, i: number) => ({
id: i + 1,
value: data.win_de_state[i],
@@ -50,6 +51,7 @@ export const fetchDigitalInputsService = async () => {
weighting: data.win_de_weighting[i],
counterActive: !!data.win_de_counter_active[i],
eingangOffline: !!data.win_de_offline[i],
status: !!data.win_de_state[i],
}));
}
@@ -60,7 +62,7 @@ export const fetchDigitalInputsService = async () => {
throw new Error("❌ Fehler beim Laden der digitalen Eingänge (json)");
const data = await res.json();
//console.log("📡 JSMOCK-Daten geladen in service:", data);
console.log("📡 JSMOCK-Daten geladen in service:", data);
return data.win_de_state.map((_: any, i: number) => ({
id: i + 1,
@@ -72,6 +74,7 @@ export const fetchDigitalInputsService = async () => {
weighting: data.win_de_weighting[i],
counterActive: !!data.win_de_counter_active[i],
eingangOffline: !!data.win_de_offline[i],
status: !!data.win_de_state[i],
}));
}