Lots of changes

-    Feedback van dataSensor array
-    dataSliders min/max and unit
-    Camera before Unity
-    Restart knop buiten service mode
-    Operator phonenumber button
-    Gracefull shutdown
-    Out of service control
This commit is contained in:
2025-10-23 17:45:35 +02:00
parent f07ba57168
commit cd33670361
36 changed files with 1444 additions and 277 deletions

39
dist/Main.js vendored
View File

@@ -76,6 +76,45 @@ var Main = /** @class */ (function () {
});
});
};
Main.prototype.restart = function () {
return __awaiter(this, void 0, void 0, function () {
var doReboot, succeed;
var _this = this;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
console.log('Stopping UnityRunner...');
return [4 /*yield*/, this.UnityRunner.stop()];
case 1:
_a.sent();
doReboot = !process.argv.includes('--no-reboot');
console.log("".concat(doReboot ? 'Rebooting' : 'Restarting', " CameraRunner..."));
return [4 /*yield*/, new Promise(function (resolve) {
_this.CameraRunner.sendCommand(doReboot ? 'reboot' : 'restart', function (response) {
if (!response.succeed) {
console.error('Failed to reboot CameraRunner:', response.message);
resolve(false);
}
else {
console.log('CameraRunner rebooted successfully.');
resolve(true);
}
});
})];
case 2:
succeed = _a.sent();
if (!succeed)
return [2 /*return*/];
console.log('Starting UnityRunner...');
return [4 /*yield*/, this.UnityRunner.start()];
case 3:
_a.sent();
console.log('Restart complete.');
return [2 /*return*/];
}
});
});
};
return Main;
}());
exports.Main = Main;