Small bugfix

This commit is contained in:
2025-10-24 16:21:04 +02:00
parent 02391f813b
commit 7ce9003621
21 changed files with 601 additions and 10 deletions

9
dist/Main.js vendored
View File

@@ -44,11 +44,13 @@ var ConfigurationManager_1 = require("./Configuration/ConfigurationManager");
var CameraRunner_1 = require("./CameraRunner");
var UnityRunner_1 = require("./Unity/UnityRunner");
var UnityWebSocket_1 = require("./Unity/UnityWebSocket");
var Twilio_1 = require("./Twilio");
var Main = /** @class */ (function () {
function Main() {
this.dataPath = (0, path_1.join)((0, os_1.homedir)(), 'MorphixProductions', 'NTSHControl');
this.ConfigurationManager = new ConfigurationManager_1.ConfigurationManager(this);
this.WebServer = new WebServer_1.WebServer(this);
this.Twilio = new Twilio_1.TwilioHandler(this);
this.CameraRunner = new CameraRunner_1.CameraRunner(this);
this.UnityRunner = new UnityRunner_1.UnityRunner(this);
this.UnityWebSocket = new UnityWebSocket_1.UnityWebSocket(this);
@@ -65,8 +67,11 @@ var Main = /** @class */ (function () {
return [4 /*yield*/, this.WebServer.listen()];
case 2:
_b.sent();
return [4 /*yield*/, this.CameraRunner.connect()];
return [4 /*yield*/, this.Twilio.load()];
case 3:
_b.sent();
return [4 /*yield*/, this.CameraRunner.connect()];
case 4:
_b.sent();
setTimeout(function () {
_this.UnityRunner.start();
@@ -93,10 +98,12 @@ var Main = /** @class */ (function () {
_this.CameraRunner.sendCommand(doReboot ? 'reboot' : 'restart', function (response) {
if (!response.succeed) {
console.error('Failed to reboot CameraRunner:', response.message);
_this.Twilio.sendError('CameraRunner', "Failed to reboot CameraRunner: ".concat(response.message));
resolve(false);
}
else {
console.log('CameraRunner rebooted successfully.');
_this.Twilio.sendError('CameraRunner', null);
resolve(true);
}
});