Skip to content

Commit

Permalink
Update autogenerated content (#3654)
Browse files Browse the repository at this point in the history
  • Loading branch information
npentrel authored Nov 5, 2024
1 parent abaef4c commit defbbe3
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 66 deletions.
4 changes: 2 additions & 2 deletions static/include/app/apis/generated/data.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Obtain unified tabular data and metadata, queried with SQL.

**Returns:**

- (List[Dict[[str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str), viam.utils.ValueTypes]]): An array of data objects.
- (List[Dict[[str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str), viam.utils.ValueTypes | [datetime.datetime](https://docs.python.org/3/library/datetime.html)]]): An array of data objects.

**Example:**

Expand Down Expand Up @@ -86,7 +86,7 @@ Obtain unified tabular data and metadata, queried with MQL.

**Returns:**

- (List[Dict[[str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str), viam.utils.ValueTypes]]): An array of data objects.
- (List[Dict[[str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str), viam.utils.ValueTypes | [datetime.datetime](https://docs.python.org/3/library/datetime.html)]]): An array of data objects.

**Example:**

Expand Down
34 changes: 17 additions & 17 deletions static/include/components/apis/generated/board.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ Supported by `viam-micro-server`.
**Example:**

```python {class="line-numbers linkable-line-numbers"}
my_board = Board.from_robot(robot=robot, name="my_board")
my_board = Board.from_robot(robot=machine, name="my_board")

# Get the GPIOPin with pin number 15.
pin = await my_board.gpio_pin_by_name(name="15")

# Set the pin to high.
await pin.set(high="true")
await pin.set(high=True)
```

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/components/board/client/index.html#viam.components.board.client.GPIOPinClient.set).
Expand Down Expand Up @@ -102,7 +102,7 @@ Supported by `viam-micro-server`.
**Example:**

```python {class="line-numbers linkable-line-numbers"}
my_board = Board.from_robot(robot=robot, name="my_board")
my_board = Board.from_robot(robot=machine, name="my_board")

# Get the GPIOPin with pin number 15.
pin = await my_board.gpio_pin_by_name(name="15")
Expand Down Expand Up @@ -192,7 +192,7 @@ Supported by `viam-micro-server`.
**Example:**

```python {class="line-numbers linkable-line-numbers"}
my_board = Board.from_robot(robot=robot, name="my_board")
my_board = Board.from_robot(robot=machine, name="my_board")

# Get the GPIOPin with pin number 15.
pin = await my_board.gpio_pin_by_name(name="15")
Expand Down Expand Up @@ -275,14 +275,14 @@ Supported by `viam-micro-server`.
**Example:**

```python {class="line-numbers linkable-line-numbers"}
my_board = Board.from_robot(robot=robot, name="my_board")
my_board = Board.from_robot(robot=machine, name="my_board")

# Get the GPIOPin with pin number 15.
pin = await my_board.gpio_pin_by_name(name="15")

# Set the duty cycle to .6, meaning that this pin will be in the high state for
# 60% of the duration of the PWM interval period.
await pin.set_pwm(cycle=.6)
await pin.set_pwm(duty_cycle=.6)
```

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/components/board/client/index.html#viam.components.board.client.GPIOPinClient.set_pwm).
Expand Down Expand Up @@ -359,7 +359,7 @@ Supported by `viam-micro-server`.
**Example:**

```python {class="line-numbers linkable-line-numbers"}
my_board = Board.from_robot(robot=robot, name="my_board")
my_board = Board.from_robot(robot=machine, name="my_board")

# Get the GPIOPin with pin number 15.
pin = await my_board.gpio_pin_by_name(name="15")
Expand Down Expand Up @@ -447,7 +447,7 @@ Supported by `viam-micro-server`.
**Example:**

```python {class="line-numbers linkable-line-numbers"}
my_board = Board.from_robot(robot=robot, name="my_board")
my_board = Board.from_robot(robot=machine, name="my_board")

# Get the GPIOPin with pin number 15.
pin = await my_board.gpio_pin_by_name(name="15")
Expand Down Expand Up @@ -528,7 +528,7 @@ Get a configured `Analog` by `name`.
**Example:**

```python {class="line-numbers linkable-line-numbers"}
my_board = Board.from_robot(robot=robot, name="my_board")
my_board = Board.from_robot(robot=machine, name="my_board")

# Get the Analog "my_example_analog_reader".
reader = await my_board.analog_by_name(name="my_example_analog_reader")
Expand Down Expand Up @@ -658,7 +658,7 @@ Get a configured `DigitalInterrupt` by `name`.
**Example:**

```python {class="line-numbers linkable-line-numbers"}
my_board = Board.from_robot(robot=robot, name="my_board")
my_board = Board.from_robot(robot=machine, name="my_board")

# Get the DigitalInterrupt "my_example_digital_interrupt".
interrupt = await my_board.digital_interrupt_by_name(
Expand Down Expand Up @@ -712,9 +712,9 @@ Start a stream of `DigitalInterrupt` ticks.
**Example:**

```python {class="line-numbers linkable-line-numbers"}
my_board = Board.from_robot(robot=robot, name="my_board")
di8 = await my_board.digital_interrupt_by_name(name="8"))
di11 = await my_board.digital_interrupt_by_name(name="11"))
my_board = Board.from_robot(robot=machine, name="my_board")
di8 = await my_board.digital_interrupt_by_name(name="8")
di11 = await my_board.digital_interrupt_by_name(name="11")

# Iterate over stream of ticks from pins 8 and 11.
async for tick in await my_board.stream_ticks([di8, di11]):
Expand Down Expand Up @@ -814,7 +814,7 @@ This is expected: the board has been successfully powered down and can no longer
**Example:**

```python {class="line-numbers linkable-line-numbers"}
my_board = Board.from_robot(robot=robot, name="my_board")
my_board = Board.from_robot(robot=machine, name="my_board")

# Set the power mode of the board to OFFLINE_DEEP.
status = await my_board.set_power_mode(mode=PowerMode.POWER_MODE_OFFLINE_DEEP)
Expand Down Expand Up @@ -926,7 +926,7 @@ Supported by `viam-micro-server`.
**Example:**

```python {class="line-numbers linkable-line-numbers"}
my_board = Board.from_robot(robot=robot, name="my_board")
my_board = Board.from_robot(robot=machine, name="my_board")

# Get the Analog "my_example_analog_reader".
reader = await my_board.analog_reader_by_name(
Expand Down Expand Up @@ -990,7 +990,7 @@ Get the current value of this interrupt.
**Example:**

```python {class="line-numbers linkable-line-numbers"}
my_board = Board.from_robot(robot=robot, name="my_board")
my_board = Board.from_robot(robot=machine, name="my_board")

# Get the DigitalInterrupt "my_example_digital_interrupt".
interrupt = await my_board.digital_interrupt_by_name(
Expand Down Expand Up @@ -1072,7 +1072,7 @@ Get a `GPIOPin` by {{< glossary_tooltip term_id="pin-number" text="pin number" >
**Example:**

```python {class="line-numbers linkable-line-numbers"}
my_board = Board.from_robot(robot=robot, name="my_board")
my_board = Board.from_robot(robot=machine, name="my_board")

# Get the GPIOPin with pin number 15.
pin = await my_board.gpio_pin_by_name(name="15")
Expand Down
6 changes: 3 additions & 3 deletions static/include/components/apis/generated/encoder.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Supported by `viam-micro-server`.
**Example:**

```python {class="line-numbers linkable-line-numbers"}
my_encoder = Encoder.from_robot(robot=robot, name='my_encoder')
my_encoder = Encoder.from_robot(robot=machine, name='my_encoder')

# Get the position of the encoder in ticks
position = await my_encoder.get_position(PositionType.POSITION_TYPE_TICKS_COUNT)
Expand Down Expand Up @@ -82,7 +82,7 @@ Supported by `viam-micro-server`.
**Example:**

```python {class="line-numbers linkable-line-numbers"}
my_encoder = Encoder.from_robot(robot=robot, name='my_encoder')
my_encoder = Encoder.from_robot(robot=machine, name='my_encoder')

# Reset the zero position of the encoder.
await my_encoder.reset_position()
Expand Down Expand Up @@ -138,7 +138,7 @@ Supported by `viam-micro-server`.
**Example:**

```python {class="line-numbers linkable-line-numbers"}
my_encoder = Encoder.from_robot(robot=robot, name='my_encoder')
my_encoder = Encoder.from_robot(robot=machine, name='my_encoder')

# Get whether the encoder returns position in ticks or degrees.
properties = await my_encoder.get_properties()
Expand Down
6 changes: 5 additions & 1 deletion static/include/components/apis/generated/input_controller.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/
**Example:**

```go {class="line-numbers linkable-line-numbers"}
myController, err := input.FromRobot(machine, "my_input_controller")

// Get the list of Controls provided by the controller.
controls, err := myController.Controls(context.Background(), nil)
```
Expand Down Expand Up @@ -76,7 +78,7 @@ This method returns the current state of the controller as a map of [Event Objec
```python {class="line-numbers linkable-line-numbers"}
# Get the controller from the machine.
my_controller = Controller.from_robot(
robot=myRobotWithController, name="my_controller")
myRobotWithController, "my_controller")

# Get the most recent Event for each Control.
recent_events = await my_controller.get_events()
Expand All @@ -103,6 +105,8 @@ For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/
**Example:**

```go {class="line-numbers linkable-line-numbers"}
myController, err := input.FromRobot(machine, "my_input_controller")

// Get the most recent Event for each Control.
recent_events, err := myController.Events(context.Background(), nil)
```
Expand Down
1 change: 0 additions & 1 deletion static/include/components/apis/generated/servo.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/c
**Example:**

```dart {class="line-numbers linkable-line-numbers"}
// Move the servo from its origin to the desired angle of 30 degrees.
await myServo.move(30);
```

Expand Down
14 changes: 7 additions & 7 deletions static/include/robot/apis/generated/robot.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,14 @@ For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/

### DiscoverComponents

Get a list of discovered potential component configurations. Only implemented for webcam cameras in builtin components. Returns module names for modules.
Get a list of discovered component configurations.

{{< tabs >}}
{{% tab name="Python" %}}

**Parameters:**

- `queries` ([List[viam.proto.robot.DiscoveryQuery]](https://python.viam.dev/autoapi/viam/proto/robot/index.html#viam.proto.robot.DiscoveryQuery)) (required): The list of component models to lookup potential component configurations for.
- `queries` ([List[viam.proto.robot.DiscoveryQuery]](https://python.viam.dev/autoapi/viam/proto/robot/index.html#viam.proto.robot.DiscoveryQuery)) (required): The list of component models to lookup potential configurations for.

**Returns:**

Expand Down Expand Up @@ -248,7 +248,7 @@ For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/

**Returns:**

- [(\*framesystem.Config)](https://pkg.go.dev/go.viam.com/rdk/robot/framesystem#Config): The configuration of the given machine’s frame system.
- [(*framesystem.Config)](https://pkg.go.dev/go.viam.com/rdk/robot/framesystem#Config): The configuration of the given machine’s frame system.
- [(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.

**Example:**
Expand Down Expand Up @@ -309,9 +309,9 @@ pose = Pose(
y=2.0, # Y coordinate in mm
z=3.0, # Z coordinate in mm
o_x=0.0, # X component of orientation vector
o_y=1.0, # Y component of orientation vector
o_y=0.0, # Y component of orientation vector
o_z=0.0, # Z component of orientation vector
theta=25.0 # Orientation angle in degrees
theta=0.0 # Orientation angle in degrees
)

pose_in_frame = PoseInFrame(
Expand Down Expand Up @@ -347,8 +347,8 @@ import (
"go.viam.com/rdk/spatialmath"
)

baseOrigin := referenceframe.NewPoseInFrame("base-1", spatialmath.NewZeroPose())
cameraToBase, err := machine.TransformPose(context.Background(), baseOrigin, "camera-1", nil)
baseOrigin := referenceframe.NewPoseInFrame("test-base", spatialmath.NewZeroPose())
movementSensorToBase, err := machine.TransformPose(context.Background(), baseOrigin, "my-movement-sensor", nil)
```

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/robot#Robot).
Expand Down
2 changes: 2 additions & 0 deletions static/include/services/apis/generated/motion.md
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,8 @@ Stop a [base](/components/base/) component being moved by an in progress [`MoveO
**Example:**

```python {class="line-numbers linkable-line-numbers"}
motion = MotionClient.from_robot(robot=machine, name="builtin")

# Assuming a `move_on_globe()` started the execution
# Stop the base component which was instructed to move by `move_on_globe()`
# or `move_on_map()`
Expand Down
Loading

0 comments on commit defbbe3

Please sign in to comment.