robotpy / robotpy-websim

OBSOLETE: Experimental robot simulation html interface
6 stars 1 forks source link

Add tooltips to each device #17

Open virtuald opened 9 years ago

virtuald commented 9 years ago

pyfrc enables this functionality via sim/config.json. It's not super extensible -- so we should change the JSON so that its usable from both pyfrc and websim. Right now, all pyfrc data is read from the 'pyfrc' key -- websim should not do this, nor should it have its own key.

A sample configuration?

{ 
    "joysticks": {
            "0": {
                "show": true,
                "axes": {
                    "X": "Strafe",
                    "Y": "Back/Forth"
                },
                "buttons": {
                    "1": "Reverse Direction",
                    "2": "Can Down",
                    "3": "Can Up",
                    "6": "Can Top",
                    "7": "Can Bottom"
                }
            },
        }
       "pwm": {
            "0": "Left Front",
            "1": "Left Rear",
            "2": "Right Front",
            "3": "Right Rear"
        },
    }

I'm not convinced that it's totally a good idea to do it this way, I'm open to something more flexible.

amorygalili commented 9 years ago

done

amorygalili commented 5 years ago

Websim currently doesn't have any tooltips. Do you think the websim and pyfrc sim need to share the same config @virtuald ? Currently the config is under its own "websim" key, the naming is different (e.g. "w" is "width", "starting_x" is "startingX"), and I plan on it having plenty of physics related configuration options the pyfrc sim does not have.

virtuald commented 5 years ago

For settings that are the same, it seems that it would be nice to have them match because backwards compatibility?

amorygalili commented 5 years ago

Do you think the configuration should still be under "pyfrc" for the sake of backwards compatibility? I guess I should allow for both "pyfrc" and "websim", that seems to make sense to me.