Skip to content

Commit bb77839

Browse files
Update gamepad configuration instructions to current platform flow (#4830)
1 parent 8e71946 commit bb77839

1 file changed

Lines changed: 14 additions & 15 deletions

File tree

docs/tutorials/control/gamepad.md

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,11 @@ Go to your rover's **CONFIGURE** tab.
9090

9191
Configure a [gamepad](/operate/reference/components/input-controller/gamepad/):
9292

93-
Click the **+** icon next to your machine part in the left-hand menu and select **Component or service**.
94-
Select the `input_controller` type, then select the `gamepad` model.
95-
Enter a name or use the suggested name for your input controller and click **Create**.
93+
Click the **+** icon next to your machine part in the left-hand menu and select **Configuration block**.
94+
Search for `gamepad`, then select the official `input_controller/gamepad` block from `viam-server`.
95+
Click **Add component**, enter a name (or use the suggested name) for your input controller, then click **Add component** to confirm.
9696

97-
![An example configuration for a linux-based gamepad input controller component](/components/input-controller/gamepad-input-controller-ui-config.png)
98-
99-
You can set the `auto_reconnect` attribute to `true`.
97+
Once added, you can set the `auto_reconnect` attribute to `true`. You'll find it by clicking `Show 2 optional` in the Attributes section. Don't forget to Save!
10098

10199
{{% /tab %}}
102100
{{% tab name="JSON" %}}
@@ -106,11 +104,12 @@ Inside the `components` array of your config, add the following configuration fo
106104

107105
```json {class="line-numbers linkable-line-numbers"}
108106
{
109-
"name": "my-gamepad",
110-
"model": "gamepad",
107+
"name": "input_controller-1",
111108
"api": "rdk:component:input_controller",
112-
"attributes": { "auto_reconnect": true },
113-
"depends_on": []
109+
"model": "rdk:builtin:gamepad",
110+
"attributes": {
111+
"auto_reconnect": true
112+
}
114113
}
115114
```
116115

@@ -129,16 +128,16 @@ To link the controller's input to the base functionality, you need to configure
129128
{{< tabs >}}
130129
{{% tab name="Config Builder" %}}
131130

132-
Click the **+** icon next to your machine part in the left-hand menu and select **Component or service**.
133-
Select the `base remote control` type.
134-
Enter a name or use the suggested name for your service and click **Create**.
131+
Click the **+** icon next to your machine part in the left-hand menu and select **Configuration block**.
132+
Search for 'base_remote_control' and select the official `base_remote_control/builtin` block from `viam-server`.
133+
Click **Add component**, enter a name (or use the suggested name) for your service, then click **Add component** to confirm.
135134

136135
In your base remote control service's configuration panel, copy and paste the following JSON object into the attributes field:
137136

138137
```json {class="line-numbers linkable-line-numbers"}
139138
{
140139
"base": "<your-base-name>",
141-
"input_controller": "my-gamepad"
140+
"input_controller": "input_controller-1"
142141
}
143142
```
144143

@@ -160,7 +159,7 @@ Add the following configuration for your base remote control service, replacing
160159
"api": "rdk:service:base_remote_control",
161160
"model": "rdk:builtin:builtin",
162161
"attributes": {
163-
"input_controller": "my-gamepad",
162+
"input_controller": "input_controller-1",
164163
"base": "<your-base-name>"
165164
}
166165
}

0 commit comments

Comments
 (0)