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

BCP command 'settings' is undocumented #1850

Open
arthurkehrwald opened this issue Oct 29, 2024 · 1 comment
Open

BCP command 'settings' is undocumented #1850

arthurkehrwald opened this issue Oct 29, 2024 · 1 comment

Comments

@arthurkehrwald
Copy link

arthurkehrwald commented Oct 29, 2024

I would like to be able to parse and write documentation for the settings BCP command., but I don't fully understand the structure of the settings parameter.
Here is an example:

{
    "settings": [
        [
            "brightness",
            "Brightness",
            100,
            "brightness",
            1.0,
            {
                "0.25": "25%",
                "0.5": "50%",
                "0.75": "75%",
                "1.0": "100% (default)"
            },
            "standard"
        ],
        [
            "flipper_power",
            "Flipper power",
            1000,
            "flipper_power",
            1.0,
            {
                "0.8": "Weak",
                "1.0": "Normal (default)",
                "1.2": "Strong"
            },
            "standard"
        ]
    ]
}

It's an array of arrays, with each sub-array representing an option in the settings. In the example above, there are two options: "brightness" and "flipper_power". Each of these options has seven elements, but I don't know their purpose. Here are my guesses, based on the documentation for the setttings config key.

Index Purpose Type
1 Internal name string
2 Display name string
3 Sorting priority int
4 Name of associated machine variable string
5 Value Varies
6 Associate individual values with descriptive texts to enable the MC to provide sensible values to choose from in the service menu string to string dictionary
7 Category string

Is this correct?

@avanwinkle
Copy link
Collaborator

I've just merged some fixes into the dev branch (and release 0.57.4.dev1) that improve the BCP communications, back ported from the work on the Godot BCP client in MPF 0.80.

Settings are now sent in batches based on setting type, and yes your documentation outline above looks correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants