clean up slot/device saving

This commit is contained in:
2022-12-30 14:33:17 -06:00
parent a2cd653730
commit b3ba6d2491
4 changed files with 47 additions and 22 deletions
+2 -3
View File
@@ -173,7 +173,7 @@ function initDeviceConnection(id) {
} else if (plugins[type].config.connectionType === 'UDPsocket') {
device.connection = udp.createSocket('udp4');
device.connection.bind({ port: plugins[type].defaultPort }, () => {
device.connection.bind({ port: plugins[type].config.defaultPort }, () => {
plugins[type].ready(device);
device.connection.on('message', (msg, info) => {
@@ -223,8 +223,7 @@ module.exports.deleteActive = function deleteActive() {
if (choice) {
VIEW.removeDeviceFromList(device);
delete devices[device.id];
SAVESLOTS.deleteFromSlots(device);
SAVESLOTS.saveAll();
SAVESLOTS.removeDevice(device);
SAVESLOTS.reloadActiveSlot();
}
};