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

Remove canvas configuration in cli #13595

Merged
merged 2 commits into from May 10, 2024

Conversation

haslinghuis
Copy link
Member

@haslinghuis haslinghuis commented Apr 27, 2024

Maybe a dumb idea - but this will be set in other ways - either include OSD_SD for analog or OSD_HD for digital FPV. Some digital FPV firmware will update canvas settings. But we can see this in the status command.

This PR removes the configuration for canvas - so diff backup from users won't override the setting reducing support issues.

@haslinghuis haslinghuis self-assigned this Apr 27, 2024
Copy link

Do you want to test this code? You can flash it directly from Betaflight Configurator:

  • Simply put #13595 (this pull request number) in the Select commit field of the Configurator firmware flasher tab (you need to Enable expert mode, Show release candidates and Development).

WARNING: It may be unstable. Use only for testing!

@haslinghuis haslinghuis added this to the 4.5 milestone Apr 27, 2024
@haslinghuis haslinghuis requested a review from a team April 27, 2024 22:28
@SteveCEvans
Copy link
Member

I see the logic in this. Can’t think of a use case that would fail.

@haslinghuis
Copy link
Member Author

@SteveCEvans the issue was with a diff imported by user.

Is there any need to change this settings in CLI as firmware would set them in the correct way.

@SteveCEvans
Copy link
Member

This should be set by the OSD driver (PAL, NTSC or default HD) or set by the VTX using https://betaflight.com/docs/development/api/displayport#msp_set_osd_canvas

@haslinghuis haslinghuis modified the milestones: 4.5, 4.6 Apr 28, 2024
@ledvinap
Copy link
Contributor

i need some time for review

@ledvinap
Copy link
Contributor

Are there other settings that are saved, but not expected to be configured by user? Maybe we want 'value that is in diff, but not restored automatically'

I can't think think about anything that is both simple and clean (not hack).

@SteveCEvans
Copy link
Member

The canvas size was exposed to support development and flexibility, but now that we have the build config better sorted, and all HD systems bar WTFOS (which properly handles changing it) use 52x20, I think we can hide this from view.

@@ -1522,8 +1522,6 @@ const clivalue_t valueTable[] = {
{ "osd_aux_channel", VAR_UINT8 | MASTER_VALUE, .config.minmaxUnsigned = { 1, MAX_SUPPORTED_RC_CHANNEL_COUNT }, PG_OSD_CONFIG, offsetof(osdConfig_t, aux_channel) },
{ "osd_aux_scale", VAR_UINT16 | MASTER_VALUE, .config.minmaxUnsigned = { 1, 1000 }, PG_OSD_CONFIG, offsetof(osdConfig_t, aux_scale) },
{ "osd_aux_symbol", VAR_UINT8 | MASTER_VALUE, .config.minmaxUnsigned = { 0, 255 }, PG_OSD_CONFIG, offsetof(osdConfig_t, aux_symbol) },
{ "osd_canvas_width", VAR_UINT8 | MASTER_VALUE, .config.minmaxUnsigned = { 0, 63 }, PG_OSD_CONFIG, offsetof(osdConfig_t, canvas_cols) },
{ "osd_canvas_height", VAR_UINT8 | MASTER_VALUE, .config.minmaxUnsigned = { 0, 31 }, PG_OSD_CONFIG, offsetof(osdConfig_t, canvas_rows) },
Copy link
Member

Choose a reason for hiding this comment

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

I suggest wrapping in #ifdef OSD_CANVAS_SIZE_DEBUG.

Copy link
Member Author

Choose a reason for hiding this comment

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

@SteveCEvans
Updated with your suggestion.

@haslinghuis haslinghuis dismissed SteveCEvans’s stale review May 10, 2024 00:04

request review after suggested change

@haslinghuis haslinghuis requested a review from ledvinap May 10, 2024 00:37
@haslinghuis haslinghuis merged commit 764d82d into betaflight:master May 10, 2024
23 checks passed
@haslinghuis haslinghuis deleted the remove-cli-canvas-setting branch May 10, 2024 12:16
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.

None yet

6 participants