Skip to content

Commit

Permalink
Add default selection when using auto detect
Browse files Browse the repository at this point in the history
  • Loading branch information
haslinghuis committed Nov 17, 2024
1 parent eaff493 commit 0f044eb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/js/tabs/firmware_flasher.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,13 @@ firmware_flasher.initialize = function (callback) {
{ name: 'FrSky', value: 'USE_FRSKYOSD' },
];

// 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);
});
}

// remove osdProtocols from generalOptions
data.generalOptions = data.generalOptions.filter(option => option.value !== 'USE_FRSKYOSD' && option.value !== 'USE_OSD_SD' && option.value !== 'USE_OSD_HD');

Expand Down

0 comments on commit 0f044eb

Please sign in to comment.