Changes between Version 93 and Version 94 of UserGuideGit


Ignore:
Timestamp:
Nov 23, 2017, 3:31:41 PM (8 years ago)
Author:
fma
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UserGuideGit

    v93 v94  
    175175[[Image(design_remote-control.png, 300px)]]
    176176
    177 As you can see on the UML diagram, a {{{RemoteControl}}} object uses {{{Components}}}; a {{{Component}}} can be a {{{Button}}}, a {{{Switch}}} an {{{Analog}}}, or a {{{Joystick}}}.
     177As you can see on the UML diagram, a {{{RemoteControl}}} object uses {{{Components}}}; a {{{Component}}} can be a {{{Button}}}, a {{{Switch}}} an {{{Axis}}}, or a {{{Joystick}}}.
    178178
    179179{{{RemoteControl}}} has the following virtual methods which must be override in a custom remote control class:
     
    193193
    194194 * {{{_addComponent(self, cls, **kwargs)}}}
    195   * '''cls''' is the {{{Component}}} class to instantiate. For now, {{{Button}}}, {{{Switch}}}, {{{Analog}}} or {{{Joystick}}};
     195  * '''cls''' is the {{{Component}}} class to instantiate. For now, {{{Button}}}, {{{Switch}}}, {{{Axis}}} or {{{Joystick}}};
    196196  * '''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;
    197197  * '''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;
    198198  * '''key'''/'''keys'''  is the input {{{Frontend}}} key to associate with the {{{Component}}}. There are 2 types of keys: ''button_'' and ''analog_'';
    199199  * '''modifier''' (optional) is a key (must be a ''button_'' type) which must be pressed together with the main '''key''' to trigger the '''command''';
    200   * '''curve''' response {{{Curve}}} of the input - for {{{Analog}}}/{{{Joystick}}} only;
     200  * '''threshold''' is the value {{{Axis}}}/{{{Joystick}}} have to change to trigger;
     201  * '''curve''' response {{{Curve}}} of the input - for {{{Axis}}}/{{{Joystick}}} only;
    201202  * '''mapper''' is a {{{Mapper}}}s, another Python callable which translates {{{RemoteControl}}} {{{Component}}} output to '''command''' input.
    202203
     
    230231{{{Switch}}} is a button toggling between 2 states when you press it.
    231232
    232 ==== Analog ====
    233 
    234 {{{Analog}}} handles a single analog axis.
     233==== Axis ====
     234
     235{{{Axis}}} handles a single analog axis.
    235236
    236237==== Joystick ====
    237238
    238 {{{Joystick}}} combines several {{{Analog}}} axes.
     239{{{Joystick}}} combines several analog axes.
    239240
    240241=== Configurations and modifiers ===