Skip to content
Merged
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
6 changes: 4 additions & 2 deletions .claude/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
"Bash(cargo check:*)",
"Bash(while read line)",
"Bash(do echo \"=== $line ===\")",
"Bash(done)"
"Bash(done)",
"Bash(awk:*)",
"Bash(cargo add:*)"
]
}
}
}
103 changes: 102 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ultralog"
version = "2.1.4"
version = "2.1.5"
edition = "2021"
description = "A high-performance ECU log viewer written in Rust"
authors = ["Cole Gentry"]
Expand Down Expand Up @@ -78,6 +78,7 @@ tracing-subscriber = "0.3"

# UUID generation for anonymous user IDs
uuid = { version = "1.0", features = ["v4"] }
chrono = { version = "0.4.43", features = ["serde"] }

# Windows-specific: embed icon and manifest
[target.'cfg(windows)'.build-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ A high-performance, cross-platform ECU log viewer written in Rust.

![CI](https://github.com/SomethingNew71/UltraLog/actions/workflows/ci.yml/badge.svg)
![License](https://img.shields.io/badge/license-AGPL--3.0-blue.svg)
![Version](https://img.shields.io/badge/version-2.1.4-green.svg)
![Version](https://img.shields.io/badge/version-2.1.5-green.svg)

---

Expand Down
1,973 changes: 1,973 additions & 0 deletions exampleLogs/locomotive/115292475.csv

Large diffs are not rendered by default.

12 changes: 11 additions & 1 deletion src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use crate::analytics;
use crate::computed::{ComputedChannel, ComputedChannelLibrary, FormulaEditorState};
use crate::i18n::Language;
use crate::parsers::{
Aim, EcuMaster, EcuType, Emerald, Haltech, Link, Parseable, RomRaider, Speeduino,
Aim, EcuMaster, EcuType, Emerald, Haltech, Link, Locomotive, Parseable, RomRaider, Speeduino,
};
use crate::settings::UserSettings;
use crate::state::{
Expand Down Expand Up @@ -480,6 +480,16 @@ impl UltraLogApp {
e
))),
}
} else if Locomotive::detect(contents) {
// Locomotive format detected
let parser = Locomotive;
match parser.parse(contents) {
Ok(l) => Ok((l, EcuType::Locomotive)),
Err(e) => Err(LoadResult::Error(format!(
"Failed to parse Locomotive file: {}",
e
))),
}
} else {
// Default to Haltech format
let parser = Haltech;
Expand Down
15 changes: 14 additions & 1 deletion src/bin/test_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ use std::fs;
use std::path::Path;

// Import from the library
use ultralog::parsers::{EcuMaster, EcuType, Emerald, Haltech, Link, Parseable, Speeduino};
use ultralog::parsers::{
EcuMaster, EcuType, Emerald, Haltech, Link, Locomotive, Parseable, Speeduino,
};

fn main() {
// Get file path from command line or use default
Expand Down Expand Up @@ -67,6 +69,17 @@ fn main() {
std::process::exit(1);
}
}
} else if Locomotive::detect(&contents) {
println!("\nDetected: Locomotive format");
println!("Parsing Locomotive log...");
let parser = Locomotive;
match parser.parse(&contents) {
Ok(log) => (EcuType::Locomotive, log),
Err(e) => {
eprintln!("Parse error: {}", e);
std::process::exit(1);
}
}
} else {
println!("\nDetected: Haltech format");
println!("Parsing Haltech log...");
Expand Down
Loading
Loading