Changes between Version 10 and Version 11 of Tutorial5AdvancedRemoteControlUsage
- Timestamp:
- Nov 23, 2017, 3:38:21 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Tutorial5AdvancedRemoteControlUsage
v10 v11 56 56 }}} 57 57 58 Interesting things take place in {{{_buildComponents()}}}: this is where {{{Component}}}s ({{{Button}}}, {{{A nalog}}}...) of our remote control are created.58 Interesting things take place in {{{_buildComponents()}}}: this is where {{{Component}}}s ({{{Button}}}, {{{Axis}}}...) of our remote control are created. 59 59 60 60 We 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. … … 68 68 For {{{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. 69 69 70 For {{{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 72 For {{{Axis}}} and {{{Joystick}}}, a {{{Curve}}} can be used to change the response; a linear curve is used as default. 73 70 74 Ok, now let's dig a little bit into the {{{Mapper}}}s. 71 75
