Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce OSD option #4251

Merged
merged 6 commits into from
Nov 18, 2024
Merged

Conversation

haslinghuis
Copy link
Member

@haslinghuis haslinghuis commented Nov 17, 2024

Lots of issues reported with users not reading release notes so decided to enforce OSD option.

image

@haslinghuis haslinghuis added this to the 11.0 milestone Nov 17, 2024
@haslinghuis haslinghuis self-assigned this Nov 17, 2024
Copy link

netlify bot commented Nov 17, 2024

Deploy Preview for origin-betaflight-app ready!

Name Link
🔨 Latest commit 0f54217
🔍 Latest deploy log https://app.netlify.com/sites/origin-betaflight-app/deploys/673b49f0a6dbc90008ff9e26
😎 Deploy Preview https://deploy-preview-4251.dev.app.betaflight.com
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@VitroidFPV
Copy link
Member

For the wording: as this is meant to be a beginner-accessible feature (most people have no clue what a "MAX7456" is), maybe just Digital and Analog? Other than that, looks great

@haslinghuis haslinghuis force-pushed the osd-build-choice branch 2 times, most recently from b17b4ad to eaff493 Compare November 17, 2024 20:55
@VitroidFPV
Copy link
Member

SonarCloud is annoying, but most likely fine

}

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added "Group" and "GroupedName" to the results. This will simplify the code here.

}

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
data.generalOptions = data.generalOptions.filter(option => option.value !== 'USE_FRSKYOSD' && option.value !== 'USE_OSD_SD' && option.value !== 'USE_OSD_HD');
data.generalOptions = data.generalOptions.filter(option => !option.group);

@@ -220,8 +220,26 @@ firmware_flasher.initialize = function (callback) {
return;
}

data.osdProtocols = [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
data.osdProtocols = [
data.osdProtocols = data.generalOptions.filter(option => option.group === 'OSD');

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can map to a new item, using the groupedName if you want to change the name to a different name.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you will also need to cater for the "none" option... so maybe a helper function to add this, and map. note the none option should have an empty value.

@nerdCopter

This comment was marked as outdated.

@haslinghuis
Copy link
Member Author

haslinghuis commented Nov 18, 2024

@nerdCopter do you have more info on what kind of build? Works with cloud build target

Edit please check again perhaps ckoudBuildOptions was null

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
9.1% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@nerdCopter
Copy link
Member

0f54217e works
image

word Analogue is incorrect, should be Analog

opinion: I feel that Analog or Digital should be default, not None.

@haslinghuis
Copy link
Member Author

@nerdCopter

word Analogue is incorrect, should be Analog

That is how it is named in cloud build API.

opinion: I feel that Analog or Digital should be default, not None.

None is only selected if analog, digital, frsky is not present.

@nerdCopter
Copy link
Member

nerdCopter commented Nov 18, 2024

That is how it is named in cloud build API.

https://www.merriam-webster.com/dictionary/analogue versus https://www.merriam-webster.com/dictionary/analog. i think it is British English vs American English issue.

None is only selected if analog, digital, frsky is not present.

fair, i only saw loading screen , no FC.

@blckmn
Copy link
Member

blckmn commented Nov 18, 2024

That is how it is named in cloud build API.

https://www.merriam-webster.com/dictionary/analogue versus https://www.merriam-webster.com/dictionary/analog. i think it is British English vs American English issue.

None is only selected if analog, digital, frsky is not present.

fair, i only saw loading screen , no FC.

I have updated this to be "american". It will flow through in an hour or so.

I does however raise a good point. We should localise these display values. We can do so by adding the american version into the messages.json as a key, and then adding the localisation after request to API. This would allow for crowdin to do the work. However we could also consider adding the localisation to the API based on the language setting provided in the header.

@haslinghuis haslinghuis merged commit 7100f9a into betaflight:master Nov 18, 2024
7 of 8 checks passed
@haslinghuis haslinghuis deleted the osd-build-choice branch November 18, 2024 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

4 participants