Skip to content

Smart parser #120

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

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ All notable changes to the `Serial Monitor` crate will be documented in this fil
* removed many `.clone()` calls to reduce CPU load
* Fixed sample rate / disconnect issue
* Releases are now linked to libssl 3.4.1 on linux (built on Ubuntu 22.04)
* Implement smarter data parser that also can read and assign multi-line data-packets
* ...

## 0.3.4

Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,14 @@ cargo wix
- [X] Automatic reconnect after device has been unplugged
- [X] Color-picker for curves
- [X] Open a CSV file and display data in plot
- [X] Smart data parser, multiline packets will be correctly assigned:

```DATA1: 0, 1, 2, 3```
```DATA2: 1, 2, 4, 9```

However, when one saves the data as a CSV, only the timestamp of the fist data-packet will be saved.
- [ ] Allow timestamp selection for CSV saving (in case of multiline data-packets)
- [ ] Allow to select (and copy) more than just the displayed raw traffic (also implement ctrl + A)
- [ ] Smarter data parser
- [ ] make serial print selectable and show corresponding datapoint in plot
- [ ] COM-Port names on Windows (display manufacturer, name, pid or vid of device?)
- [ ] current command entered is lost when navigating through the history
Expand Down
16 changes: 2 additions & 14 deletions src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,27 +43,15 @@ impl Default for Packet {
}
}

#[derive(Clone, Debug)]
#[derive(Clone, Debug, Default)]
pub struct DataContainer {
pub time: Vec<f64>,
pub time: Vec<Vec<f64>>,
pub absolute_time: Vec<f64>,
pub dataset: Vec<Vec<f32>>,
pub raw_traffic: Vec<Packet>,
pub loaded_from_file: bool,
}

impl Default for DataContainer {
fn default() -> DataContainer {
DataContainer {
time: vec![],
absolute_time: vec![],
dataset: vec![vec![]],
raw_traffic: vec![],
loaded_from_file: false,
}
}
}

#[derive(Clone, Debug, Default)]
pub struct GuiOutputDataContainer {
pub prints: Vec<String>,
Expand Down
Loading