DCS-Skunkworks / dcs-bios

Data export tool for DCS.
https://dcsbios.com/
GNU General Public License v3.0
282 stars 63 forks source link

[BUG] Ka-50 controls definitions `limited_rotary` make no sense #532

Closed emcek closed 7 months ago

emcek commented 8 months ago

DCS-BIOS version Git master version

DCS-BIOS Control PVI_AIRFIELDS_BTN and other PVI buttons

Describe the bug Take a look;

"PVI_AIRFIELDS_BTN": {
    "category": "PVI-800 Control Panel",
    "control_type": "selector",
    "description": "Airfields button",
    "identifier": "PVI_AIRFIELDS_BTN",
    "inputs": [ {
        "description": "switch to previous or next state",
    "interface": "fixed_step"
    }, {
        "description": "set position",
        "interface": "set_state",
        "max_value": 1
    }, {
        "argument": "TOGGLE",
        "description": "Toggle switch state",
        "interface": "action"
    } ],
    "momentary_positions": "none",
    "outputs": [ {
        "address": 6434,
        "address_mask_identifier": "Ka_50_PVI_AIRFIELDS_BTN_AM",
        "address_mask_shift_identifier": "Ka_50_PVI_AIRFIELDS_BTN",
        "description": "selector position",
        "mask": 512,
        "max_value": 1,
        "shift_by": 9,
        "suffix": "",
        "type": "integer"
    } ],
    "physical_variant": "limited_rotary"}

for me defined it as limited_rotary is kind of silly. I know this is minor issue but if we use physical_variant parameter in contro; definition push_button looks better choice like at Viper:

"ICP_BTN_1": {
    "api_variant": "momentary_last_position",
    "category": "UFC",
    "control_type": "selector",
    "description": "ICP Priority Function Button, 1(T-ILS)",
    "identifier": "ICP_BTN_1",
    "inputs":
    [
        {
            "description": "switch to previous or next state",
            "interface": "fixed_step"
        },
        {
            "description": "set position",
            "interface": "set_state",
            "max_value": 1
        },
        {
            "argument": "TOGGLE",
            "description": "Toggle switch state",
            "interface": "action"
        }
    ],
    "momentary_positions": "none",
    "outputs":
    [
        {
            "address": 17448,
            "address_mask_identifier": "F_16C_50_ICP_BTN_1_AM",
            "address_mask_shift_identifier": "F_16C_50_ICP_BTN_1",
            "description": "selector position",
            "mask": 16,
            "max_value": 1,
            "shift_by": 4,
            "suffix": "",
            "type": "integer"
        }
    ],
    "physical_variant": "push_button"
}

For me all controls for Ka-50 defined as "physical_variant": "limited_rotary" should be set as push_button or just without physical_variant entry at all.

charliefoxtwo commented 8 months ago

Honestly I'm of the mind that we should just remove physical_variant. I'm not aware of anybody using it and all it does is add complexity to the control definitions. I'd also move to remove momentary_positions under the same argument.

emcek commented 7 months ago

So, can I feel free to remove them in PR?

charliefoxtwo commented 7 months ago

Sure, feel free to submit a PR if you want. I'm happy to do it too.