Skip to content

Commit d88dc76

Browse files
JessamyTnpentrel
andauthored
DOCS-2949: Fix mismapped methods (#3651)
Co-authored-by: Naomi Pentrel <[email protected]>
1 parent 373a8da commit d88dc76

File tree

9 files changed

+183
-156
lines changed

9 files changed

+183
-156
lines changed

.github/workflows/sdk_protos_map.csv

+7-7
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,18 @@ board,GetPWM,Yes,get_pwm,PWM,pwm
3838
board,SetPWM,Yes,set_pwm,SetPWM,setPwm
3939
board,PWMFrequency,Yes,get_pwm_frequency,PWMFreq,pwmFrequency
4040
board,SetPWMFrequency,Yes,set_pwm_frequency,SetPWMFreq,setPwmFrequency
41-
board,AnalogByName,No,analog_by_name,AnalogByName,analogReaderValue
42-
## HACK: Omitting PySDK: write_analog, currently borked: https://python.viam.dev/autoapi/viam/components/board/client/index.html#viam.components.board.client.BoardClient.write_analog
43-
board,Write,Yes,,Write,writeAnalog
44-
board,GetDigitalInterruptValue,No,digital_interrupt_by_name,DigitalInterruptByName,,
41+
board,GetDigitalInterruptValue,No,value,Value,digitalInterruptValue
42+
board,ReadAnalogReader,Yes,read,Read,analogReaderValue
43+
## HACK: PySDK: write_analog currently borked; deprecated in favor of write: https://python.viam.dev/autoapi/viam/components/board/client/index.html#viam.components.board.client.BoardClient.write_analog
44+
board,WriteAnalog,Yes,write,Write,writeAnalog
4545
board,StreamTicks,No,stream_ticks,StreamTicks,streamTicks
4646
board,SetPowerMode,No,set_power_mode,SetPowerMode,setPowerMode
47-
board,GetGeometries,No,get_geometries,,
4847
## HACK: Board (python, go) provides additional helper functions, adding 5 pseudo-entries:
49-
board,Read,Yes,read,Read,
50-
board,Value,No,value,Value,digitalInterruptValue
48+
board,AnalogByName,No,analog_by_name,AnalogByName,
49+
board,DigitalInterruptByName,No,digital_interrupt_by_name,DigitalInterruptByName,,
5150
board,GPIOPinByName,No,gpio_pin_by_name,GPIOPinByName,
5251
## HACK: No proto for these (and/or inherited in Go SDK), manually mapping:
52+
board,GetGeometries,No,get_geometries,,
5353
board,Reconfigure,No,,Reconfigure,
5454
board,DoCommand,Yes,do_command,DoCommand,doCommand
5555
board,Name,No,,Name,

docs/appendix/changelog.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ The `errors_only` parameter has been removed from [`get_robot_part_logs()`](/app
9090

9191
{{% changelog date="2024-05-28" color="changed" title="Return type of analog Read" %}}
9292

93-
The board analog API [`Read()`](/appendix/apis/components/board/#read) method now returns an `AnalogValue` struct instead of a single int.
93+
The board analog API [`Read()`](/appendix/apis/components/board/#readanalogreader) method now returns an `AnalogValue` struct instead of a single int.
9494
The struct contains an int representing the value of the reading, min and max range of values, and the precision of the reading.
9595

9696
{{% /changelog %}}
@@ -144,7 +144,7 @@ detections = await detector.get_detections(cropped_frame)
144144
{{% changelog date="2024-05-08" color="removed" title="WriteAnalog from Go SDK" %}}
145145

146146
The `WriteAnalog()` method has been removed from the Go SDK.
147-
Use [`AnalogByName()`](/appendix/apis/components/board/#analogbyname) followed by [`Write()`](/appendix/apis/components/board/#write) instead.
147+
Use [`AnalogByName()`](/appendix/apis/components/board/#analogbyname) followed by [`Write()`](/appendix/apis/components/board/#writeanalog) instead.
148148

149149
{{% /changelog %}}
150150

static/include/components/apis/generated/board-table.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
| [`SetPWM`](/appendix/apis/components/board/#setpwm) | Set the pin's Pulse-width modulation (PWM) duty cycle: a float [`0.0`, `1.0`] indicating the percentage of time the digital signal output of this pin is in the high state (active, >0V) relative to the interval period of the PWM signal (interval period being the mathematical inverse of the PWM frequency). | <p class="center-text"><i class="fas fa-check" title="yes"></i></p> |
88
| [`PWMFrequency`](/appendix/apis/components/board/#pwmfrequency) | Get the PWM frequency of the GPIO pin. | <p class="center-text"><i class="fas fa-check" title="yes"></i></p> |
99
| [`SetPWMFrequency`](/appendix/apis/components/board/#setpwmfrequency) | Set the pin to the given PWM `frequency` (in Hz). When `frequency` is 0, it will use the board’s default PWM frequency. | <p class="center-text"><i class="fas fa-check" title="yes"></i></p> |
10-
| [`AnalogByName`](/appendix/apis/components/board/#analogbyname) | Get a configured `Analog` by `name`. | <p class="center-text"><i class="fas fa-times" title="no"></i></p> |
11-
| [`Write`](/appendix/apis/components/board/#write) | Write an analog value to a pin on the board. | <p class="center-text"><i class="fas fa-check" title="yes"></i></p> |
12-
| [`GetDigitalInterruptValue`](/appendix/apis/components/board/#getdigitalinterruptvalue) | Get a configured `DigitalInterrupt` by `name`. | <p class="center-text"><i class="fas fa-times" title="no"></i></p> |
10+
| [`GetDigitalInterruptValue`](/appendix/apis/components/board/#getdigitalinterruptvalue) | Get the current value of a configured digital interrupt. | <p class="center-text"><i class="fas fa-times" title="no"></i></p> |
11+
| [`ReadAnalogReader`](/appendix/apis/components/board/#readanalogreader) | Read the current integer value of the digital signal output by the ADC. | <p class="center-text"><i class="fas fa-check" title="yes"></i></p> |
12+
| [`WriteAnalog`](/appendix/apis/components/board/#writeanalog) | Write an analog value to a pin on the board. | <p class="center-text"><i class="fas fa-check" title="yes"></i></p> |
1313
| [`StreamTicks`](/appendix/apis/components/board/#streamticks) | Start a stream of `DigitalInterrupt` ticks. | <p class="center-text"><i class="fas fa-times" title="no"></i></p> |
1414
| [`SetPowerMode`](/appendix/apis/components/board/#setpowermode) | Set the board to the indicated `PowerMode`. | <p class="center-text"><i class="fas fa-times" title="no"></i></p> |
15-
| [`GetGeometries`](/appendix/apis/components/board/#getgeometries) | Get all the geometries associated with the board in its current configuration, in the frame of the board. | <p class="center-text"><i class="fas fa-times" title="no"></i></p> |
16-
| [`Read`](/appendix/apis/components/board/#read) | Read the current integer value of the digital signal output by the ADC. | <p class="center-text"><i class="fas fa-check" title="yes"></i></p> |
17-
| [`Value`](/appendix/apis/components/board/#value) | Get the current value of this interrupt. | <p class="center-text"><i class="fas fa-times" title="no"></i></p> |
15+
| [`AnalogByName`](/appendix/apis/components/board/#analogbyname) | Get a configured `Analog` by `name`. | <p class="center-text"><i class="fas fa-times" title="no"></i></p> |
16+
| [`DigitalInterruptByName`](/appendix/apis/components/board/#digitalinterruptbyname) | Get a DigitalInterrupt by `name`. | <p class="center-text"><i class="fas fa-times" title="no"></i></p> |
1817
| [`GPIOPinByName`](/appendix/apis/components/board/#gpiopinbyname) | Get a `GPIOPin` by {{< glossary_tooltip term_id="pin-number" text="pin number" >}}. | <p class="center-text"><i class="fas fa-times" title="no"></i></p> |
18+
| [`GetGeometries`](/appendix/apis/components/board/#getgeometries) | Get all the geometries associated with the board in its current configuration, in the frame of the board. | <p class="center-text"><i class="fas fa-times" title="no"></i></p> |
1919
| [`Reconfigure`](/appendix/apis/components/board/#reconfigure) | Reconfigure this resource. | <p class="center-text"><i class="fas fa-times" title="no"></i></p> |
2020
| [`DoCommand`](/appendix/apis/components/board/#docommand) | Execute model-specific commands that are not otherwise defined by the component API. | <p class="center-text"><i class="fas fa-check" title="yes"></i></p> |
2121
| [`Name`](/appendix/apis/components/board/#name) | Get the name of the digital interrupt. | <p class="center-text"><i class="fas fa-times" title="no"></i></p> |

0 commit comments

Comments
 (0)