Changes between Version 10 and Version 11 of Tutorial5AdvancedRemoteControlUsage


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

--

Legend:

Unmodified
Added
Removed
Modified
  • Tutorial5AdvancedRemoteControlUsage

    v10 v11  
    5656}}}
    5757
    58 Interesting things take place in {{{_buildComponents()}}}: this is where {{{Component}}}s ({{{Button}}}, {{{Analog}}}...) of our remote control are created.
     58Interesting things take place in {{{_buildComponents()}}}: this is where {{{Component}}}s ({{{Button}}}, {{{Axis}}}...) of our remote control are created.
    5959
    6060We first define 2 remote control configs, '''walk''' and '''body''', as we don't have enough buttons to do all we want. In the first config, '''walk''', we define some components to make the robot walk, but also to change the body position (by increments). In the second config, '''body''', we define additional components to control the body. If no '''config''' is specified in the {{{Component}}} definition, it means it is available in all configs.
     
    6868For {{{Button}}}, triggering depends on the optional '''trigger''' param. For {{{Switch}}}, triggering occurs when the state toggles. For {{{Analog}}}, triggering occurs when the value changes. For {{{Joystick}}}, triggering occurs when any value changes. If a '''modifier''' is specified, it must be pressed for the triggering to occur. It acts as a keyboard shift or control key. This way, the main key can be used in different {{{Component}}}s.
    6969
     70For {{{Axis}}} and {{{Joystick}}}, a '''threshold''' param can avoid false changes: the value will only be triggered if it changed at least by the '''threshold''' value from the last reading (not implemented yet).
     71
     72For {{{Axis}}} and {{{Joystick}}}, a {{{Curve}}} can be used to change the response; a linear curve is used as default.
     73
    7074Ok, now let's dig a little bit into the {{{Mapper}}}s.
    7175