Skip to content

Commit

Permalink
Correct spelling/formatting within docs (#699)
Browse files Browse the repository at this point in the history
  • Loading branch information
onebytegone authored Jul 15, 2024
1 parent 552975d commit 45713d8
Show file tree
Hide file tree
Showing 30 changed files with 62 additions and 63 deletions.
2 changes: 1 addition & 1 deletion website/docs/api/cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ devs init --force

### --no-install

Do not run `npm` or `yarn ` install after dropping the files.
Do not run `npm` or `yarn` install after dropping the files.

### --board board-id

Expand Down
2 changes: 1 addition & 1 deletion website/docs/api/clients-custom/gamepad-registers.mdp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### axes {#ro:axes}

An array representing the controls with axes present on the device (e.g. analog thumb sticks),
as `[x, y]`. Each entry in the array is a floating point value in the range ` -1.0 – 1.0``, representing the axis position from the lowest value ( `-1.0`) to the highest value (`1.0`).
as `[x, y]`. Each entry in the array is a floating point value in the range `-1.0 – 1.0`, representing the axis position from the lowest value (`-1.0`) to the highest value (`1.0`).

- type: `ClientRegister<{ x: number; y: number }>` (packing format `i1.15 i1.15`)

Expand Down
2 changes: 1 addition & 1 deletion website/docs/api/clients-custom/index.mdp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
In DeviceScript, hardware peripherals (and generally anything outside the VM) are modelled
as [Jacdac services](https://microsoft.github.io/jacdac-docs/services/).

The peripherals are **servers** and the your client application creates **clients** to interact with them.
The peripherals are **servers** and your client application creates **clients** to interact with them.

## Declaring roles

Expand Down
2 changes: 1 addition & 1 deletion website/docs/api/core/registers.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The register client classe (`Register<T>`) allow to read, write and track change
Aside from the data type, there are 3 different type of access control on registers:

- `read only`: the value can be read, but not written.
- `read write`: the value can be read and writen.
- `read write`: the value can be read and written.
- `const`: the value of the register is constant. It may change on the next reset but this is not a common scenario.

## read
Expand Down
2 changes: 1 addition & 1 deletion website/docs/api/drivers/accelerometer.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Accelerometer

# Accelerometer

The `startAccelerometer` function starts a [accelerometer](https://microsoft.github.io/jacdac-docs/services/accelerometer) server on the device and returns a [client](/api/clients/accelerometer).
The `startAccelerometer` function starts an [accelerometer](https://microsoft.github.io/jacdac-docs/services/accelerometer) server on the device and returns a [client](/api/clients/accelerometer).

The accelerometer IMU chip will be auto-detected if it is supported.

Expand Down
2 changes: 1 addition & 1 deletion website/docs/api/drivers/aht20.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ const { temperature, humidity } = await startAHT20()

## Configuration

- Configure I2C throught the [board configuration](/developer/board-configuration)
- Configure I2C through the [board configuration](/developer/board-configuration)
2 changes: 1 addition & 1 deletion website/docs/api/drivers/bme680.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ const { temperature, humidity, pressure, airQualityIndex } = await startBME680()

## Configuration

- Configure I2C throught the [board configuration](/developer/board-configuration)
- Configure I2C through the [board configuration](/developer/board-configuration)
- Check that you are using the correct I2C address
46 changes: 23 additions & 23 deletions website/docs/api/drivers/imu.mdx
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
---
title: IMU
description: Reading from the IMU
---

## Usage

Here we use the IMU to read the orientation of the device, DA213B for example.

```ts
import {
startIMU,
startAccelerometer,
DA213BDriver,
} from "@devicescript/drivers"

const driver = new DA213BDriver()
const acc = await startAccelerometer(driver, {})

acc.reading.subscribe(reading => {
console.log(`x: ${reading[0]}, y: ${reading[0]}, z: ${reading[0]}`)
})
```
---
title: IMU
description: Reading from the IMU
---

## Usage

Here we use the IMU to read the orientation of the device, DA213B for example.

```ts
import {
startIMU,
startAccelerometer,
DA213BDriver,
} from "@devicescript/drivers"

const driver = new DA213BDriver()
const acc = await startAccelerometer(driver, {})

acc.reading.subscribe(reading => {
console.log(`x: ${reading[0]}, y: ${reading[0]}, z: ${reading[0]}`)
})
```
2 changes: 1 addition & 1 deletion website/docs/api/drivers/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Drivers

Starting driver provide a programming abstraction for hardware periphericals.
Starting driver provide a programming abstraction for hardware peripherals.
Some driver implementations are builtin (written C),
while others can be contributed as DeviceScript packages.

Expand Down
2 changes: 1 addition & 1 deletion website/docs/api/drivers/st7789.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { ILI9341Driver } from "@devicescript/drivers"

:::caution I8080 not supported

The drivers use the SPI interface. The parralel interface (I8080) is not supported at the moment.
The drivers use the SPI interface. The parallel interface (I8080) is not supported at the moment.

:::

Expand Down
2 changes: 1 addition & 1 deletion website/docs/api/observables/dsp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ thermometer.reading

## fir

A general purpose Finite Response Filter filter. Coefficients are typically computed in a seperate process.
A general purpose Finite Response Filter filter. Coefficients are typically computed in a separate process.

```ts
import { Temperature } from "@devicescript/core"
Expand Down
2 changes: 1 addition & 1 deletion website/docs/api/observables/filter.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ thermometer.reading
Returns a result Observable that emits all values pushed by the source observable
if they are distinct in comparison to the last value the result observable emitted.

This function can be used to create user-friendly transformer. For example, thershold is as follows:
This function can be used to create user-friendly transformer. For example, threshold is as follows:

```ts skip
export function threshold<T = number>(
Expand Down
2 changes: 1 addition & 1 deletion website/docs/api/runtime/palette.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ palette.setAt(2, 0x00_00_ff)

## `interpolateColor`

Interpolates a `[0, 1]` value into a color of the palette, regarless of the palette size.
Interpolates a `[0, 1]` value into a color of the palette, regardless of the palette size.

```ts
import { Palette } from "@devicescript/graphics"
Expand Down
6 changes: 3 additions & 3 deletions website/docs/api/runtime/pixelbuffer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ pixels.rotate(-1)

## Helpers

Here are a few helpers built for `PixelBuffer`, but many other could be added!
Here are a few helpers built for `PixelBuffer`, but many others could be added!

### `fillSolid`

This helper function asigns the given color to the entire range.
This helper function assigns the given color to the entire range.

```ts
import { Led } from "@devicescript/core"
Expand Down Expand Up @@ -110,7 +110,7 @@ but this can be changed with optional parameters.

### `fillGradient`

Fills with a linear interpolation of two colors accross the RGB space.
Fills with a linear interpolation of two colors across the RGB space.

```ts
import { Led } from "@devicescript/core"
Expand Down
4 changes: 2 additions & 2 deletions website/docs/api/vm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ const running = vm.devsIsRunning()
## devsInit

This method allocates data structures necessary for running the virtual machine.
It is automatically called by other metods.
It is automatically called by other methods.

```js
vm.devsInit()
```

## devsVerify

Verifies that a buffer of bytecode is well formed. Returns non-zero error codes when failing.
Verifies that a buffer of bytecode is well-formed. Returns non-zero error codes when failing.

```js
const res = vm.devsVerify()
Expand Down
4 changes: 2 additions & 2 deletions website/docs/developer/board-configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_position: 2.9

# Board Configuration

**To target a specific hardware board or peripherical,
**To target a specific hardware board or peripheral,
you need to configure the pins, I2C, SPI, etc...** This is done by loading the
board configuration package for your specific hardware.

Expand All @@ -20,7 +20,7 @@ import { pins } from "@dsboard/adafruit_qt_py_c3"
:::tip

In Visual Studio Code, on the file menu, click on the **wand** icon and select the board configuration.
If your board is already connectd, DeviceScript will automatically detect it and
If your board is already connected, DeviceScript will automatically detect it and
load the correct board configuration.

:::
Expand Down
2 changes: 1 addition & 1 deletion website/docs/developer/development-gateway/environment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ keywords:
---
# Environment

An configuration object pushed from the cloud as an observable. The environment can be configured
A configuration object pushed from the cloud as an observable. The environment can be configured
through the gateway OpenAPI or the Visual Studio Code extension.

The environment is cached locally in the settings to handle offline scenarios.
Expand Down
6 changes: 3 additions & 3 deletions website/docs/developer/development-gateway/gateway.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ keywords:
DeviceScript defines a cloud layer
to abstract the communication between the device and a cloud provider.

In order to facilite rapid prototyping,
In order to facilitate rapid prototyping,
it is possible to run a Development Gateway **locally**
or deploy it to Azure on top of Azure services.

- Full sources at https://github.com/microsoft/devicescript-gateway

## Features

- Local or Azure deployement
- Local or Azure deployment
- Device provisioning, management: register, unregister, list, ...
- Script management: create, update (versioned)
- Script deployment: assign a script to a device and the gateway will deploy it
Expand Down Expand Up @@ -209,7 +209,7 @@ npm run provision
```

After the script is done executing,
it will take a couple minutes for the Github Actions to build the site and start it.
it will take a couple of minutes for the Github Actions to build the site and start it.

- open the swagger page, `https://WEBAPPNAME.azurewebsites.net/swagger/` and make sure it loads

Expand Down
2 changes: 1 addition & 1 deletion website/docs/developer/development-gateway/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ This package relies on a prototype Development Gateway that needs to be deployed

## View in Visual Studio Code

The view is hidden by default and needs to be show once. Click on **View**, **Open View...** and selet
The view is hidden by default and needs to be show once. Click on **View**, **Open View...** and select
**Development Gateway** under **DeviceScript**.
2 changes: 1 addition & 1 deletion website/docs/developer/development-gateway/telemetry.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ await trackEvent("started")

### Metrics

The metric aggregates a numberical value and upload the aggregate when requested.
The metric aggregates a numerical value and upload the aggregate when requested.

```ts
import { Temperature } from "@devicescript/core"
Expand Down
2 changes: 1 addition & 1 deletion website/docs/developer/drivers/analog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sidebar_position: 10

# Analog

There is a number of functions that start a simple analog sensor server.
There are a number of functions that start a simple analog sensor server.
We'll use `startPotentiometer()` as an example, but you can use any of the following,
as they all use the same configuration.

Expand Down
4 changes: 2 additions & 2 deletions website/docs/developer/drivers/digital-io/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ sidebar_position: 49
DeviceScript provides access to digital GPIO (General Purpose Input/Output) operations
on pins that do **not** require precise real time timings.

It is recommend to encapsulate the GPIO access into server implementation as they are rather low level.
It is recommended to encapsulate the GPIO access into server implementation as they are rather low level.

:::caution

Expand All @@ -21,7 +21,7 @@ natively in C using interrupts, or better yet offload it to an [external Jacdac

## Pin mappings

While you can use hardware GPIO numbers with the `ds.gpio()` function,
While you can use hardware GPIO numbers with the `ds.gpio()` function,
it is highly recommended that you instead import a board definition file an use pin names
matching silk on the hardware.

Expand Down
1 change: 0 additions & 1 deletion website/docs/developer/drivers/i2c.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,3 @@ class AHT20Driver extends I2CSensorDriver<{
```

You can find implementation examples at https://github.com/microsoft/devicescript/tree/main/packages/drivers/src.

4 changes: 2 additions & 2 deletions website/docs/developer/drivers/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ sidebar_position: 2.5
# Drivers

In DeviceScript, any hardware component is accessed through a service **client**.
A **driver** implement one or more service **servers** for a given hardware peripherical.
A **driver** implement one or more service **servers** for a given hardware peripheral.

The [drivers builtin package](/developer/packages) exposes drivers for a number of periphericals.
The [drivers builtin package](/developer/packages) exposes drivers for a number of peripherals.

## [Analog](/developer/drivers/analog) (builtin)

Expand Down
4 changes: 2 additions & 2 deletions website/docs/developer/errors.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,6 @@ or the tool will give up.

## error can't alloc pcb {#error-cant-alloc-pcb}

TLS is not yet supported on RP2040.
See [implementation status](https://microsoft.github.io/devicescript/devices#implementation-status)
TLS is not yet supported on RP2040.
See [implementation status](https://microsoft.github.io/devicescript/devices#implementation-status)
and [issue 664](https://github.com/microsoft/devicescript/issues/664).
4 changes: 2 additions & 2 deletions website/docs/developer/graphics/display.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ title: Display

The [Display](https://github.com/microsoft/devicescript/blob/main/packages/graphics/src/display.ts)
interface provides an abstraction over a small screen. The `Display` interface is implemented
for various hardware peripherical and can be used with various services.
for various hardware peripherals and can be used with various services.

- [SSD1306](/api/drivers/ssd1306) or [SH110X](/api/drivers/sh110x), OLED monochrome, I2C
- [ST7789, ST7735, ILI9163, ILI9341](/api/drivers/st7789), LCD color, SPI
- [UC8151](/api/drivers/uc8151), eInk monochrome, SPI

:::caution I8080 not supported

The drivers use SPI or I2C. The parralel interface (I8080) is not supported at the moment.
The drivers use SPI or I2C. The parallel interface (I8080) is not supported at the moment.

:::

Expand Down
2 changes: 1 addition & 1 deletion website/docs/developer/leds/display.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ display.image.print(`Hello world!`, 3, 10)
await display.show()
```

The palette is automatically infered from the `waveLength` register; otherwise you can provide one.
The palette is automatically inferred from the `waveLength` register; otherwise you can provide one.

```ts skip
const display = await startLedDisplay(led, palette)
Expand Down
2 changes: 1 addition & 1 deletion website/docs/developer/mcu-temperature.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ setInterval(async () => {
}, 1000)
```

The simulator temperature is alwasy 21 degrees Celsius.
The simulator temperature is always 21 degrees Celsius.
4 changes: 2 additions & 2 deletions website/docs/developer/net/encrypted-fetch.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ The JSON object is converted to a buffer and
encrypted using AES-256-CCM and an 8-byte authentication tag is appended.
The initialization vector (IV) is all-zero.

This is send to the server, which decrypts the request accordingly.
This is sent to the server, which decrypts the request accordingly.

:::warning

Expand All @@ -206,7 +206,7 @@ Otherwise, someone can replay a client request.

:::

If the server responds with with `2xx` code, the response is assumed to be
If the server responds with `2xx` code, the response is assumed to be
a JSON object encrypted using a key derived using HKDF from the password,
the previously generated salt, and `info` parameter set to the value
of `x-devs-enc-fetch-info` in the response.
Expand Down
2 changes: 1 addition & 1 deletion website/docs/developer/net/mqtt.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ await mqtt.publish(`devs/log/${id}`, "hello")
## subscribe

The `subscribe` function creates a subscription for a topic route.
The function takes a an optional handler an returns an [observable](/developer/observables).
The function takes an optional handler and returns an [observable](/developer/observables).

```ts
import { startMQTTClient } from "@devicescript/net"
Expand Down

0 comments on commit 45713d8

Please sign in to comment.