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

Version command documentation fixes #119

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
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
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ For device specific commands, see their individual documentation pages.
###### Permissions on Linux
To ensure that the input module's port is accessible, install the `udev` rule and trigger a reload:

```
```sh
sudo cp release/50-framework-inputmodule.rules /etc/udev/rules.d/
sudo udevadm control --reload && sudo udevadm trigger
```
Expand Down Expand Up @@ -72,7 +72,7 @@ to a single device, specify the COM port.
In this example the command is targeted at `b1-display`, so it will only apply
to this module type.

```
```sh
# Example on Linux
> inputmodule-control --serial-dev /dev/ttyACM0 b1-display --pattern black

Expand All @@ -88,7 +88,7 @@ connected and then send the command.

```
> inputmodule-control b1-display --pattern black
Failed to find serial devivce. Please manually specify with --serial-dev
Failed to find serial device. Please manually specify with --serial-dev

# No failure, waits until the device is connected, sends command and exits
> inputmodule-control --wait-for-device b1-display --pattern black
Expand All @@ -105,7 +105,7 @@ Device already present. No need to wait. Not executing command.
First, put the module into bootloader mode.

This can be done either by pressing the bootsel button while plugging it in or
by using one of the following commands:
by using one of the following commands:

```sh
inputmodule-control led-matrix --bootloader
Expand Down Expand Up @@ -144,7 +144,7 @@ cargo make --cwd b1display
cargo make --cwd c1minimal
```

Generate the UF2 update file:
Generate the UF2 update file into `target/thumbv6m-none-eabi/release/`:

```sh
cargo make --cwd ledmatrix uf2
Expand All @@ -159,7 +159,7 @@ Dependencies: [Rust/rustup](https://rustup.rs/), pkg-config, libudev
Currently have to specify the build target because it's not possible to specify a per package build target.
Tracking issue: https://github.com/rust-lang/cargo/issues/9406

```
```sh
# Install cargo-make to help build it
cargo install cargo-make

Expand Down
13 changes: 8 additions & 5 deletions commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ When no parameters are given, the current value is queried and returned.
| InvertScreen | 0x15 | ` D ` | | bool | Invert scren on/off |
| SetPxCol | 0x16 | ` D ` | | 50 Bytes | Send a column of pixels |
| FlushFB | 0x17 | ` D ` | | | Flush all columns |
| Version | 0x20 | ` D ` | 3 Bytes | | Get firmware version |
| Version | 0x20 | `LDM` | 3 Bytes | | Get firmware version |

#### Pattern (0x01)

Expand Down Expand Up @@ -93,8 +93,11 @@ TODO

Response:

```
Byte 0: USB bcdDevice MSB
Byte 1: USB bcdDevice LSB
Byte 2: 1 if pre-release version, 0 otherwise
```plain
+-- Major version
| +-- Minor version
| | +-- Patch version
| | | +-- 1 if is pre-release,
| | | | 0 otherwise
MMMMMMMM mmmmPPPP 0000000p
```
2 changes: 1 addition & 1 deletion inputmodule-control/src/inputmodule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ pub fn find_serialdevs(args: &crate::ClapCli, wait_for_device: bool) -> (Vec<Str
pub fn serial_commands(args: &crate::ClapCli) {
let (serialdevs, waited): (Vec<String>, bool) = find_serialdevs(args, args.wait_for_device);
if serialdevs.is_empty() {
println!("Failed to find serial devivce. Please manually specify with --serial-dev");
println!("Failed to find serial device. Please manually specify with --serial-dev");
return;
} else if args.wait_for_device && !waited {
println!("Device already present. No need to wait. Not executing command. Sleep 1s");
Expand Down