Skip to content

Commit

Permalink
201 can errors cli viewer (#316)
Browse files Browse the repository at this point in the history
* Moved files to new branch

* error description added with temp description

* Fixed bug with bits

* minor error with submenu when opening description

* new description features added

* finished: ~10. Make cursor move to the ignored menu when the ignored menu is opened.~
~11. Make border purple for the description.~
~12. Move the help menu to the top.~
~13. Make all the displays the same size.~

* refactored some of the code to reduce redundancies, added comments to make code more legible.

* small fix to description box showing the main table description when the error table is opened, and added a testing script

* added structs to store data and changed functionality to implement, moved box/table under components, removed demos.

* Removed last instance of findRowString and added cli flag for canInterface

* Key behavior attached to keymap

* Updated the README.md

* fixed findError when done after sort

* Refactored code. Added metatable, modified table.go to keep track of error imdex, more readme information, no more searching with string, no more "reading from the table (?), and other cleanup.

* remove redundant function

* Small fix in readme and further implemented isolated logic

* other small fixes

* Removed redundant comments, changed some field/function names to be more descriptive, updated README

* remove submodule

* Undo submodule change

* Program now exits gracefully when an error occurs, setup_vcan now requires an can_port to work

* remove submodule

---------

Co-authored-by: BlakeFreer <[email protected]>
  • Loading branch information
sokosam and BlakeFreer authored Nov 20, 2024
1 parent cd9780a commit e7bb323
Show file tree
Hide file tree
Showing 10 changed files with 1,332 additions and 0 deletions.
55 changes: 55 additions & 0 deletions scripts/can_errgo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# CAN Error TUI

This is a Tangible User Interface program designed to track CAN Errors including their count, recency, description, and name.

Users can:

- Acknowledge the error (Hide and resets the error until it is sent again)
- Ignore the error (Hides, resets, and stops reading all future occurrences of the error)
- View ignored errors and choose to unignore those errors

## Setup

Install required dependencies:

```bash
sudo apt-get update
sudo apt-get upgrade
sudo apt install net-tools iproute2 can-utils linux-modules-extra-$(uname -r)
```

Kill all existing instances of ip-links:

```bash
ip link show
sudo ip link delete <ip-link>
```

Setup the can network:

```bash
./setup_vcan.sh <CAN_PORT>
```

## Usage

Start the CLI viewer for single use:

```bash
go run error_tui.go -i <CAN_PORT> -w <WARN_TIMER>
```

OR

Build the go file:

```bash
go build -o <BUILD_NAME>
./<BUILD_NAME> -i <CAN_PORT> -w <WARN_TIMER>
```

You can now run:

```bash
cansend <CAN_PORT> <MSG>
```
Loading

0 comments on commit e7bb323

Please sign in to comment.