Skip to content

Commit c88e536

Browse files
Adds initial support for AiM .xrk log files on all platforms
Signed-off-by: Cole Gentry <peapod2007@gmail.com>
1 parent d2d59ad commit c88e536

16 files changed

+1053
-45
lines changed

Cargo.lock

Lines changed: 282 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ tracing-subscriber = "0.3"
6969
# UUID generation for anonymous user IDs
7070
uuid = { version = "1.0", features = ["v4"] }
7171

72+
# Platform-specific: AIM XRK/DRK file parsing via native library
73+
# Only available on Windows and Linux x86_64
74+
[target.'cfg(all(any(target_os = "windows", target_os = "linux"), target_arch = "x86_64"))'.dependencies]
75+
xdrk = "1.0"
76+
7277
# Windows-specific: embed icon and manifest
7378
[target.'cfg(windows)'.build-dependencies]
7479
winresource = "0.1"
18.3 MB
Binary file not shown.
21.1 MB
Binary file not shown.
8.28 MB
Binary file not shown.
291 KB
Binary file not shown.
1.35 MB
Binary file not shown.
3.28 MB
Binary file not shown.

src/app.rs

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use std::sync::mpsc::{channel, Receiver, Sender};
1212
use std::thread;
1313

1414
use crate::analytics;
15-
use crate::parsers::{EcuMaster, EcuType, Haltech, Parseable, RomRaider, Speeduino};
15+
use crate::parsers::{Aim, EcuMaster, EcuType, Haltech, Parseable, RomRaider, Speeduino};
1616
use crate::state::{
1717
ActiveTool, CacheKey, LoadResult, LoadedFile, LoadingState, ScatterPlotConfig,
1818
ScatterPlotState, SelectedChannel, Tab, ToastType, CHART_COLORS, COLORBLIND_COLORS,
@@ -280,12 +280,7 @@ impl UltraLogApp {
280280
.map(|n| n.to_string_lossy().to_string())
281281
.unwrap_or_else(|| "Unknown".to_string());
282282

283-
LoadResult::Success(Box::new(LoadedFile {
284-
path,
285-
name,
286-
ecu_type,
287-
log,
288-
}))
283+
LoadResult::Success(Box::new(LoadedFile::new(path, name, ecu_type, log)))
289284
}
290285

291286
/// Load file using memory-mapped I/O for better performance with large files
@@ -349,6 +344,19 @@ impl UltraLogApp {
349344
));
350345
}
351346

347+
// Check for AIM XRK format - parse using xdrk library (requires file path)
348+
if Aim::detect(binary_data) {
349+
match Aim::parse_file(path) {
350+
Ok(l) => return Ok((l, EcuType::Aim)),
351+
Err(e) => {
352+
return Err(LoadResult::Error(format!(
353+
"Failed to parse AIM XRK file: {}",
354+
e
355+
)))
356+
}
357+
}
358+
}
359+
352360
// Auto-detect file format and parse
353361
if Speeduino::detect(binary_data) {
354362
// Speeduino/rusEFI MLG format detected (binary)

0 commit comments

Comments
 (0)