diff --git a/src/js/tabs/firmware_flasher.js b/src/js/tabs/firmware_flasher.js index 3c01f8b9f3a..2e8e68fd3c3 100644 --- a/src/js/tabs/firmware_flasher.js +++ b/src/js/tabs/firmware_flasher.js @@ -221,15 +221,17 @@ firmware_flasher.initialize = function (callback) { } // extract osd protocols from general options and add to osdProtocols - data.osdProtocols = data.generalOptions.filter(option => option.group === 'OSD'); + data.osdProtocols = data.generalOptions + .filter(option => option.group === 'OSD') + .map(option => { + option.name = option.groupedName; + option.default = self.cloudBuildOptions.includes(option.value); + return option; + }); + // add None option to osdProtocols as first option data.osdProtocols.unshift({name: 'None', value: ''}); - // pre select osd option when found in general options after auto detect - if (self.cloudBuildOptions) { - data.osdProtocols.forEach((option) => { - option.default = self.cloudBuildOptions.includes(option.value); - }); - } + console.log(data.osdProtocols); // remove osdProtocols from generalOptions data.generalOptions = data.generalOptions.filter(option => !option.group);