Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation versioning #27

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 27 additions & 17 deletions docs/development/documentation-versioning.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,48 +9,58 @@ description: "How to version documents for a new release"

# Versioning

Versioning is used so that the documentation for features currently in development can be updated without affecting user documentation, which should remain fairly static and only updated with a new release version. There should only ever be **one** versioned copy of the documentation that matches to latest release version number of firmware.
Versioning is used so that the documentation for features currently in development can be updated without affecting user documentation for the current released version, which should remain fairly static and generally only updated with a new release version.

The result is a default versions copy for the latest release that is served to the user when visiting https://gp2040-ce.info and another "Next" version that reflects unfinished documentation for the next release.
The result is a default version copy for the current release that is served to the user when visiting https://gp2040-ce.info and another "Next" version that reflects unfinished documentation for the next release.

## On New Release

When a new release is ready, first delete the prior version. Then tag a new version with a name that matches the release number (i.e. X.X.X). Once that has been completed, commit the changes and make a pull request to update the site documentation.

### Delete Prior Version

At the root of the GP2040-CE folder, run the following command to delete the versioned folders and files entirely as they will be recreated in when a new version is tagged.

```shell
rm -rf docs/versioned_docs
rm -rf docs/versioned_sidebars
rm -rf docs/versions.json
```
When a new release is ready, tag the document version with a name that matches the release number (i.e. #.#.#). Once that has been completed, commit the changes and make a pull request to update the site documentation.

### Tag New Version

```shell
cd docs/
npm run docusaurus docs:version X.X.X
npm run docusaurus docs:version #.#.#
```

When tagging a new version, the document versioning mechanism will:

- Copy the full docs/ folder contents into a new versioned_docs/version-\{versionName\}/ folder.
- Create a versioned sidebars file based from your current sidebar configuration (if it exists) - saved as versioned_sidebars/version-\{versionName\}-sidebars.json.
- Append the new version number to versions.json.
- Append the new version to versions.json.

### Delete Prior Version

At the root of the GP2040-CE folder, run the following command to delete the version

```shell
rm -rf versioned_docs/version-#.#.#
rm -rf versioned_sidebars/version-#.#.#-sidebars.json
```

Then remove the version from versions.json.

Example:

```diff
[
"0.7.7",
- "0.7.6"
]
```

## Updating Documentation

### Update Future Release Documentation

Updates can be made directly in the `docs/docs/` folder or `sidebars.js` as these changes are not reflected in the default versioned documents users will see on the site. Any changes to the `docs/docs/` folder or `sidebars.js` are made to the `Next` version.
Updates can be made directly in the `docs/` folder or `sidebars.js` as these changes are not reflected in the default versioned documents users will see on the site. Any changes to the `docs/` folder or `sidebars.js` are made to the `Next` version.

![GP2040-CE | Next Version](../assets/images/gpc-documentation-next-version.png)

### Update Current Release Documentation

This process is different from updating documentation for future releases as changes need to be made with the versioned documents. Changes to the current release version of documentation will need to be made to the files in `docs/versioned_docs/version-X.X.X` and `docs/versioned_sidebars/version-X.X.X-sidebars.json`.
This process is different from updating documentation for future releases as changes need to be made with the versioned documents. Changes to the current release version of documentation will need to be made to the files in `/versioned_docs/version-X.X.X` and `/versioned_sidebars/version-X.X.X-sidebars.json`.

These changes will be reflected in the default user facing documentation that appears when users go to https://gp2040-ce.info and do not specifically select the `Next` version of documentation.

Expand Down
11 changes: 5 additions & 6 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,11 @@ const config = {
docId: "downloads/download-page",
label: "Downloads",
},
// VersionDropdown - To Be Reconsidered
// {
// type: 'docsVersionDropdown',
// position: 'right',
// dropdownActiveClassDisabled: true,
// },
{
type: "docsVersionDropdown",
position: "right",
dropdownActiveClassDisabled: true,
},
{
href: "https://discord.gg/k2pxhke7q8",
label: "Discord",
Expand Down
1 change: 1 addition & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ const sidebars = {
label: "Documentation",
collapsed: false,
items: [
"development/documentation-versioning",
"development/documentation-preview",
"development/documentation-update-downloads",
],
Expand Down
67 changes: 67 additions & 0 deletions versioned_docs/version-0.7.7/add-ons/analog.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
title: Analog
# tags:
# -
pagination_next: null
pagination_prev: null
description: "Add-on to use hardware analog joysticks with GP2040-CE"
---

# Analog

Purpose: This add-on is intended for the use of an hardware analog joystick with GP2040-CE for the left and right analog sticks of the gamepad.

![GP2040-CE Configurator - Add-Ons Analog](../assets/images/gpc-add-ons-analog.png)

## Web Configurator Options

- `Analog Stick 1 X Pin` - The GPIO pin used for the Analog joystick 1 X value. Only ADC pins 26, 27, 28 and 29 are allowed here.
- `Analog Stick 1 Y Pin` - The GPIO pin used for the Analog joystick 1 Y value. Only ADC pins 26, 27, 28 and 29 are allowed here.
- `Analog Stick 1 Mode` - Choose if Analog joystick 1 is to be used for Left Analog or Right Analog.
- `Analog joystick 1 Invert` - Choose if you would like to flip the X or Y axis Analog Stick 1 inputs (or both).
- `Analog joystick 2 X Pin` - The GPIO pin used for the Analog Stick 2 X value. Only ADC pins 26, 27, 28 and 29 are allowed here.
- `Analog joystick 2 Y Pin` - The GPIO pin used for the Analog Stick 2 Y value. Only ADC pins 26, 27, 28 and 29 are allowed here.
- `Analog joystick 2 Mode` - Choose if Analog Stick 2 is to be used for Left Analog or Right Analog (must be different than Analog Stick 1).
- `Analog joystick 2 Invert` - Choose if you would like to flip the X or Y axis Analog joystick 2 inputs (or both).
- `Deadzone Size (%)` - Enter the % value of dead zone you would like on the analog joysticks.
- `Forced Circularity` - Force the analog joysticks to be bound within a perfect circle. This can be beneficial for certain games. However, be aware that this may negatively impact some games which account for sticks moving outside of a circle.
- `Auto Calibration` - Automatically centers the analog joysticks. This works by reading in the offset from center during boot and then accounts for that until the next power cycle. This can be helpful for analog joysticks experiencing drift.

## Hardware

### Requirements

A minimum of one hardware analog joystick is required for the use of this add-on. Each joystick will have at least 4 pins, one for each of the following.

- Reference Voltage (ADC_VREF/3.3V)
- X-Axis Input Voltage (Vx)
- Y-Axis Input Voltage (Vy)
- Ground (GND)

Each axis input voltage pin requires an Analog to Digital Converter (ADC) pin to operate. As such, some boards may have a limit on the maximum number of possible joysticks that can be used (e.g. the Raspberry Pi Pico only has 3 ADC pins available so only 1 joystick can be used).

:::note Joystick Buttons

The analog joystick may have an additional pin for the joystick button. This can be connected to any GPIO pin and used as a regular button.

:::

### Installation

Connect the pins of the analog joystick to the board as follows and then set the GPIO pin values in `Web Configurator > Configurations > Add-Ons > Analog`.

- Reference Voltage (ADC_VREF/3.3V) -> ADC_VREF/3.3V Pin
- X-Axis Input Voltage (Vx) -> Any ADC GPIO Pin
- Y-Axis Input Voltage (Vy) -> Any ADC GPIO Pin
- Ground (GND) -> Any GND Pin

The specific location of the ADC pins on your board will vary depending on the design and manufacturer, but they will always be one of the following GPIO pins on the RP2040

- GPIO 26
- GPIO 27
- GPIO 28
- GPIO 29

## Miscellaneous Notes

Both potentiometer and Hall Effect based joysticks are supported, provided that they use a 3.0-3.3V reference voltage and output voltages in the range of 0-3.3V as an input for the RP2040. This is because the GPIO pins for the RP2040 utilize 3.3V logic and are not 5V-safe.
32 changes: 32 additions & 0 deletions versioned_docs/version-0.7.7/add-ons/bootsel-button.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
title: BOOTSEL Button Configuration
# tags:
# -
pagination_next: null
pagination_prev: null
description: "Add-on to use the BOOTSEL button as an additional button input"
---

# BOOTSEL Button Configuration

Purpose: This add-on is mean to allow for the use of a BOOTSEL button to be used as an additional button input.

![GP2040-CE Configurator - Add-Ons BOOTSEL Button Configuration](../assets/images/gpc-add-ons-bootsel-button.png)

## Web Configurator Options

- `BOOTSEL Button` - Choose an input to be mapped to the BOOTSEL button.

## Hardware

### Requirements

This add-on can only be used on devices that have a BOOTSEL button.

### Installation

There are no installation instructions for this add-on.

## Miscellaneous Notes

The OLED might become unresponsive if this button is set. You can unset it to restore OLED functionality.
37 changes: 37 additions & 0 deletions versioned_docs/version-0.7.7/add-ons/buzzer-speaker.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
title: Buzzer Speaker
# tags:
# -
pagination_next: null
pagination_prev: null
description: "Add-on to add a buzzer to your controller"
---

# Buzzer Speaker

Purpose: This add-on is intended to allow you to add a buzzer to your GP2040-CE device and play sounds.

![GP2040-CE Configurator - Add-Ons Buzzer](../assets/images/gpc-add-ons-buzzer.png)

## Web Configurator Options

- `Use buzzer` - Turns on/off the buzzer module.
- `Buzzer Pin` - The GPIO pin used for the buzzer.
- `Buzzer Volume` - Audio volume of buzzer. Ranges from 0-100.

## Hardware

### Requirements

- 3-3.3V Piezo speaker

The speaker only needs to have pins for power (VCC) and ground (GND). If there is an I/O pin on speaker, you can jump the pins and use only the VCC connected to RP2040 GPIO pin.

### Installation

- Plug into GPIO pin on board to VCC on speaker
- Enter GPIO pin into web config

## Miscellaneous Notes

None
58 changes: 58 additions & 0 deletions versioned_docs/version-0.7.7/add-ons/dual-direction-input.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
title: Dual Directional Input
# tags:
# -
pagination_next: null
pagination_prev: null
description: "Add-on to add more digital DPad, left analog stick, and right analog stick directional inputs to your controller"
---

# Dual Directional Input

Purpose: This add-on is intended to allow additional digital buttons to be used for directional inputs with either the D-Pad, or the cardinal directions of the Left and Right analog joystick at maximum magnitude.

![GP2040-CE Configuration - Add-Ons Dual Directional Input](../assets/images/gpc-add-ons-dual-directional.png)

## Web Configurator Options

:::info GPIO Pin Mapping Moved

The pin(s) are now configured on the [Pin Mapping page](../web-configurator/menu-pages/02-pin-mapping.mdx) by choosing the correct option for the selected pin.

- DDI Up
- DDI Down
- DDI Left
- DDI Right

:::

- `Dual D-Pad Mode` - Choose if this should act as an additional instance of a D-Pad, Left analog joystick, or Right analog joystick.
- `Combination Mode` - Choose how these direction inputs should be combined with gamepad directions.
- `Dual Directional 4-Way Joystick Mode` - Enables 4-Way Joystick mode on the DDI Joystick, which will prevent non-cardinal directions from registering. When a second cardinal direction input is received, the gamepad direction will change to the newest cardinal direction, similar to [SOCD Last Win](../hotkeys.mdx#socd-last-win).

### Dual D-Pad Mode Values

- `D-PAD` for D-Pad mode.
- `Left Analog` for Left analog joystick mode.
- `Right Analog` for Right analog joystick mode.

### Combination Mode

- `Mixed` - Combines both the Gamepad directions and Dual Direction Input directions and allows for all 3 SOCD modes.
- `Gamepad` - Gamepad always takes over when pressed, otherwise Gamepad and Dual act independently.
- `Dual Directional` - Dual always takes over when pressed, otherwise Gamepad and Dual act independently.
- `None` - Gamepad input and dual directional act independently of each other.

## Hardware

### Requirements

Additional buttons are required for each of the additional directions desired.

### Installation

For each button, connect one side of the button to their respective GPIO pin as assigned in the Web Configurator. Connect the other side of the buttons to GND.

## Miscellaneous Notes

"Gamepad direction" refers to the core directions ("Up"), whereas "Dual Direction Input directions" refers to the directions used by this add-on ("DDI Up").
34 changes: 34 additions & 0 deletions versioned_docs/version-0.7.7/add-ons/focus-mode.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: Focus Mode Configuration
# tags:
# -
pagination_next: null
pagination_prev: null
description: "Add-on to disable functions and inputs while Focus Mode is enabled"
---

# Focus Mode Configuration

Purpose: This add-on is intended to allow you to disable a number of functions or inputs while Focus Mode is enabled, but otherwise still retain access to them.

![GP2040-CE Configurator - Focus Mode](../assets/images/gpc-add-ons-focus-mode.png)

## Web Configurator Options

- `Focus Mode Pin` - The GPIO pin used to enable Focus Mode
- `Lock Macro` - When enabled, macro triggers will not activate macro sequences during Focus Mode
- `Lock Buttons` - When enabled, listed inputs will not be sent during Focus Mode. As inputs are added, new dropdowns will appear for additional inputs.

## Hardware

### Requirements

The GPIO pin set in `Focus Mode Pin` needs to be brought and kept low to remain active. A toggle switch, slide toggle, or latching switch is necessary for proper use of this add-on.

### Installation

Installation will depend on whether a toggle switch, slide toggle, or latching switch is used. In general, on one side of the switch, connect the pin to the GPIO pin set in `Focus Mode Pin`. On the other side of the switch or the center if there are 3 contacts, connect it to any GND pin.

## Miscellaneous Notes

None.
Loading
Loading