Skip to content

Commit

Permalink
ledmatrix: Small cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Schaefer <[email protected]>
  • Loading branch information
JohnAZoidberg authored and zachfeldman committed Aug 11, 2023
1 parent 16740c4 commit 247bc18
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion inputmodule-control/src/inputmodule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ fn simple_cmd(serialdev: &str, command: Command, args: &[u8]) {
match port_result {
Ok(mut port) => simple_cmd_port(&mut port, command, args),
Err(error) => match error.kind {
serialport::ErrorKind::Io(std::io::ErrorKind::PermissionDenied) => panic!("Permission denied, couldn't access input module port. Ensure that udev rule is installed or the port the module is on is otherwise accessible."),
serialport::ErrorKind::Io(std::io::ErrorKind::PermissionDenied) => panic!("Permission denied, couldn't access inputmodule serialport. Ensure that you have permission, for example using a udev rule or sudo."),
other_error => panic!("Couldn't open port: {:?}", other_error)
}
};
Expand Down
3 changes: 2 additions & 1 deletion ledmatrix/50-framework.rules
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
SUBSYSTEMS=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0020", MODE:="0666"
# Framework Laptop 16 - LED Matrix Inputmodule
SUBSYSTEMS=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0020", MODE:="0666"
6 changes: 3 additions & 3 deletions ledmatrix/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ Connection to the host system is via USB 2.0 and currently there is a USB Serial

To ensure that the input module's port is accessible, install the `udev` rule for it located in the `50-framework.rules` file.

1. Copy it to your udev rules directory. On Ubuntu, this is located at `/etc/udev/rules.d/`
2. Reload the rules with `sudo udevadm control --reload`
1. Copy it to your udev rules directory, which is usually at: `/etc/udev/rules.d/`
2. Reload and apply the rules with `sudo udevadm control --reload && sudo udevadm trigger`

You can debug issues using the `udevadm monitor --environment` command. Ensure that the device's `idVendor` and `idProduct` match when you plug in the device.
You can debug issues using the `udevadm monitor --environment` command.

## Controlling

Expand Down

0 comments on commit 247bc18

Please sign in to comment.