| 193 | | |
| 194 | | (See below) |
| 195 | | |
| 196 | | Then, a number of objects/methods can be used as components commands: |
| | 195 | * '''cls''' is the {{{Component}}} class to instantiate. For now, {{{Button}}}, {{{Switch}}}, {{{Analog}}} or {{{Joystick}}}; |
| | 196 | * '''configs''' (optional) contains the config(s) where this {{{Component}}} will be valid. Several configs can be given has list/tuple. By default, the {{{Component}}} will be valid in all configs; |
| | 197 | * '''command''' is a Python callable (function, method...) which can be reached from our class. You may remember that we gave the robot instance when instantiating the gamepad object; this way, we can refer to all robot methods through {{{self.robot}}}. We can directly reach {{{GaitSequencer}}} as it is a singleton; |
| | 198 | * '''key'''/'''keys''' is the input {{{Frontend}}} key to associate with the {{{Component}}}. There are 2 types of keys: ''button_'' and ''analog_''; |
| | 199 | * '''modifier''' (optional) is a key (must be a ''button_'' type) which must be pressed together with the main '''key''' to trigger the '''command'''; |
| | 200 | * '''mapper''' is a {{{Mapper}}}s, another Python callable which translates {{{RemoteControl}}} {{{Component}}} output to '''command''' input. |