Skip to content

Commit

Permalink
fix(server) better log for autoreboot displays
Browse files Browse the repository at this point in the history
  • Loading branch information
smarthomeagentur committed Oct 30, 2023
1 parent 793f79f commit e400111
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,19 @@ async function init() {
control.init();
let displayCount = (await control.getDisplayCount()).data;
if (displayCount < 1) {
console.log("[MAIN] INIT - no display found");
if (AUTOREBOOT) {
console.log("[MAIN] Start projectors and reboot.");
console.log("[MAIN] no display found - Start projectors and reboot.");
await control.setBalenaWake();
} else {
console.log("[MAIN] INIT - no display found");
}
} else {
console.log("[MAIN] INIT - display Count: " + displayCount);
if (AUTOREBOOT) {
console.log("[MAIN] INIT - display Count: " + displayCount + " autoreboot enabled");
} else {
console.log("[MAIN] INIT - display Count: " + displayCount + " autoreboot disabled");
}

//todo: anyway turn on displays here and setup xserver again
}
}
Expand Down

0 comments on commit e400111

Please sign in to comment.