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

201 can errors cli viewer #316

Merged
merged 22 commits into from
Nov 20, 2024
Merged

201 can errors cli viewer #316

merged 22 commits into from
Nov 20, 2024

Conversation

sokosam
Copy link
Contributor

@sokosam sokosam commented Nov 12, 2024

No description provided.

This was linked to issues Nov 12, 2024
scripts/can_errgo/Demos/listenerDemo.go Outdated Show resolved Hide resolved
scripts/can_errgo/components/table/table.go Outdated Show resolved Hide resolved
scripts/can_errgo/components/table/table.go Outdated Show resolved Hide resolved
scripts/can_errgo/README.md Show resolved Hide resolved
scripts/can_errgo/components/box/text-box.go Outdated Show resolved Hide resolved
scripts/can_errgo/error_tui.go Outdated Show resolved Hide resolved
scripts/can_errgo/error_tui.go Show resolved Hide resolved
scripts/can_errgo/error_tui.go Show resolved Hide resolved
scripts/can_errgo/error_tui.go Outdated Show resolved Hide resolved
scripts/can_errgo/error_tui.go Outdated Show resolved Hide resolved
@BlakeFreer
Copy link
Contributor

The table rendering and program loop code looks good. There's a few Demo files that shouldn't be included in the merge. Use git rm to delete them.

I noticed that information about the error messages (like freshness) is stored in the table itself. This isn't the best design. The table should only be used as an output to represent the internal state of the system. You should have an array / list or similar holding a struct for each message type that includes all relevant fields, then sort that array by freshness and display those structs in the table rows. This will remove functions like re_fresh, SortByColumn, and FindRowString which operate on the table data. After this fix is made, you should (almost) never need to call string.Atoi on any table values - this data should be stored as an integer somewhere else.

@sokosam sokosam requested a review from BlakeFreer November 18, 2024 00:01
firmware/projects/FrontController/vehicle_control_system Outdated Show resolved Hide resolved
scripts/can_errgo/README.md Outdated Show resolved Hide resolved
scripts/can_errgo/README.md Outdated Show resolved Hide resolved
scripts/can_errgo/utilityFiles/test_cli.sh Outdated Show resolved Hide resolved
scripts/can_errgo/setup.txt Outdated Show resolved Hide resolved
scripts/can_errgo/error_tui.go Outdated Show resolved Hide resolved
scripts/can_errgo/error_tui.go Outdated Show resolved Hide resolved
scripts/can_errgo/error_tui.go Outdated Show resolved Hide resolved
scripts/can_errgo/error_tui.go Outdated Show resolved Hide resolved
scripts/can_errgo/error_tui.go Outdated Show resolved Hide resolved
Copy link
Contributor

@BlakeFreer BlakeFreer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good improvements. Few things to improve but overall looks good

scripts/can_errgo/README.md Show resolved Hide resolved
scripts/can_errgo/components/table.go Outdated Show resolved Hide resolved
scripts/can_errgo/error_tui.go Show resolved Hide resolved
scripts/can_errgo/error_tui.go Show resolved Hide resolved
scripts/can_errgo/error_tui.go Show resolved Hide resolved
Copy link
Contributor

@BlakeFreer BlakeFreer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some comments should be removed since they don't add any information which isn't already clear from the function title. I marked some examples of good comments and ones which can be removed

scripts/can_errgo/error_tui.go Outdated Show resolved Hide resolved
scripts/can_errgo/error_tui.go Outdated Show resolved Hide resolved
scripts/can_errgo/error_tui.go Outdated Show resolved Hide resolved
scripts/can_errgo/error_tui.go Outdated Show resolved Hide resolved
scripts/can_errgo/error_tui.go Show resolved Hide resolved
scripts/can_errgo/error_tui.go Outdated Show resolved Hide resolved
scripts/can_errgo/error_tui.go Show resolved Hide resolved
scripts/can_errgo/error_tui.go Outdated Show resolved Hide resolved
scripts/can_errgo/error_tui.go Show resolved Hide resolved
scripts/can_errgo/error_tui.go Outdated Show resolved Hide resolved
@BlakeFreer BlakeFreer merged commit e7bb323 into main Nov 20, 2024
1 check passed
@BlakeFreer BlakeFreer deleted the 201-can-errors-cli-viewer branch November 20, 2024 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CANError go cli CAN Errors
2 participants