Skip to content

Commit

Permalink
doc: version command cleanup (#119)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Schaefer <[email protected]>
  • Loading branch information
JonasWanke and JohnAZoidberg authored Nov 17, 2024
1 parent d0e23a0 commit 262edff
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
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
11 changes: 9 additions & 2 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,15 @@ TODO

Response:

```
```plain
Byte 0: USB bcdDevice MSB
Byte 1: USB bcdDevice LSB
Byte 2: 1 if pre-release version, 0 otherwise
+-- 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

0 comments on commit 262edff

Please sign in to comment.