Stable joining with dummy commands sent on timeouts

This commit is contained in:
Logan Cusano
2024-01-19 23:57:03 -05:00
parent 4a0b1004d2
commit 4ac95f5325
9 changed files with 301 additions and 90 deletions

View File

@@ -13,8 +13,9 @@ async function boot() {
// Run the first time boot sequence
await firstTimeBoot();
}
// Initialize the socket connection with the server
return initSocketConnection();
return initSocketConnection(localNodeConfig);
}
/**
@@ -30,6 +31,7 @@ async function firstTimeBoot() {
updateId(localNodeConfig.node.id);
console.log("Updated the config with the new node ID");
// TODO - Create the config file with the ID given and replace the update above
// TODO - Check if the system is linux or windows and set the 'type' param in DAB
// TODO - Implement web server so users can update radio systems easily
// TODO - Implement logic to check if the presets are set
@@ -39,7 +41,7 @@ async function firstTimeBoot() {
// Boot the client application
boot().then((openSocket) => {
initSocketListeners(openSocket);
initSocketListeners(openSocket, localNodeConfig);
//console.log(openSocket, "Open socket");
setTimeout(() => {sendNodeUpdate(openSocket);}, 2500);
})