diff --git a/CLAUDE.md b/CLAUDE.md index e2612c9..50e9595 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -504,6 +504,33 @@ because it also leads with a `Time` column, and only matches a first column of e by name (lowercased) in `find_gps_channels` (`src/ui/widgets/track_map.rs`); renaming or suffixing them silently disables the Track Map for MSL logs. +**Emerald parser load-bearing behaviors** (`src/parsers/emerald.rs`): + +- **Channel IDs come from EM Soft's variable list, and most are unconfirmed** - the `[chanN]` + value in the `.lg2` is an ID into EM Soft's logger variable list, which Emerald does not + document. Only IDs 1, 15, 20, 24, 26, 31, 32 and 41 are confirmed (issue #93, reporter's EM + Soft labels). The rest are original guesses. ID 1 is the K6 lambda input in mV (not TPS), + 41 is TPS, 31 is the 0-15 load site (not injector duty). Confirm an ID against an EM Soft + screenshot before renaming it. A rename must also go into the `source_names` of + `adapters/emerald/emerald-lg.adapter.yaml` in the ClassicMiniDIY/OECUASpecs repo (fetched + by `build.rs` into the gitignored `spec/OECUASpecs/`); spec normalization matches on those + names. Its `internal_id` field documents the IDs but UltraLog does not read it. +- **MAP scaling depends on `[ValU]`** - the second `[ValU]` value is the logger's pressure unit: + `1` stores MAP in whole kPa, `2` in mbar. Hardcoding either one makes the other log read 10x + wrong. Unknown codes keep the mbar scaling. +- **ID 1 is named "Lambda Sensor Voltage" on purpose** - it is a 0-1 V narrowband input where + a higher reading is richer. The `"volt"` veto on `ChannelRole::Lambda` in + `channel_map.rs` depends on that word, so the table generators never map it as lambda. +- **Repeated names get the channel ID appended** - IDs 21/24 and 45/46 share a name, and name + lookups return the first match. `disambiguate_names` keeps the plain name on a + `CONFIRMED_IDS` entry (else the first by slot) and appends ` (ID n)` to the others, so a + formula bound to `Ignition Advance` does not change meaning with slot order. +- **The value column is the slot number, not the list position** - `[chanN]` reads bytes + `8 + (N-1)*2` of the record. `parse_lg2` drops slots outside 1-8 and repeated slots, so an + unreadable or missing `[chanN]` cannot shift later channels onto the wrong data. +- **Ign Adv (ID 24) offset is inferred** - `raw * 0.1 - 50` gives 5.5° at idle and 14-17° at + 230 kPa boost. It is not from Emerald documentation. + **Haltech parser load-bearing behaviors** (`src/parsers/haltech.rs`, added for wall-clock-timestamped exports): - **Last-known-value substitution** - Unparseable/blank fields are filled with the last successfully parsed value for that column (`0.0` before the first valid sample), matching the approach used in `parsers/ecumaster.rs`. This preserves column alignment instead of shifting subsequent columns when a field fails to parse. @@ -646,7 +673,7 @@ Example log files are in `exampleLogs/` organized by ECU type: - `exampleLogs/aim/` - AiM XRK/DRK files - `exampleLogs/link/` - Link ECU LLG files - `exampleLogs/woolich/` - Woolich Racing Tuned CSV exports -- `exampleLogs/emerald/` - Emerald K6/M3D `.lg1`/`.lg2` files +- `exampleLogs/emerald/` - Emerald K6/M3D `.lg1`/`.lg2` files (`EM Log MG ZS Turbo boost run` is the issue #93 log, `[ValU]` pressure unit kPa; the others use mbar) - `exampleLogs/megasquirt/` - MegaSquirt TunerStudio CSV exports, plus a `_gps.mlg` fixture with synthetic GPS channels (generated by `examples/inject_fake_gps_mlg.rs`; the coordinates are a fake closed loop, not a real location) - `exampleLogs/mhd/` - MHD Tuning CSV exports (VIN redacted) - `exampleLogs/msl/` - TunerStudio MSL excerpt from issue #86 (RealDash logging a Speeduino; trimmed to 2000 data rows, keeping the leading no-GPS-fix rows where `GPS Date`/`GPS Time` are blank) diff --git a/Cargo.lock b/Cargo.lock index 8138730..d0a71a6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4578,7 +4578,7 @@ checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" [[package]] name = "ultralog" -version = "2.15.0" +version = "2.15.1" dependencies = [ "anyhow", "arboard", diff --git a/Cargo.toml b/Cargo.toml index a221b77..25433ea 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ultralog" -version = "2.15.0" +version = "2.15.1" edition = "2024" # egui/eframe 0.36 is the binding constraint on the minimum supported Rust # version; edition 2024 itself only needs 1.85. diff --git a/README.md b/README.md index 7c98168..ac70730 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ A high-performance, cross-platform ECU log viewer written in Rust.   - + --- @@ -139,7 +139,8 @@ Configurable units for 8 measurement categories: - **File type:** Binary format (`.lg1` data + `.lg2` channel definitions) - **Features:** Native binary format parser for Emerald K6/M3D ECUs - **Supported devices:** Emerald K6, M3D, and compatible ECU models -- **Supported data:** TPS, Air Temp, MAP, Lambda, Oil/Fuel Pressure, Oil/Fuel Temp, Exhaust Temp, Boost Target/Duty, RPM, Coolant Temp, Battery Voltage, Ignition Advance, Injector Pulse Width, and more +- **Supported data:** RPM, TPS, MAP, lambda sensor, ignition advance, injector duration, boost PWM, load site, air and coolant temperature, and more +- **Units:** MAP is shown in kPa. The EM Soft logger pressure setting must be kPa or bar; other settings are not yet supported - **Note:** Both `.lg1` (data) and `.lg2` (channel definitions) files must be in the same directory ### MegaSquirt / Honda Tuning Studio - Full Support diff --git a/docs/index.html b/docs/index.html index 2ec9e0a..955749f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -112,8 +112,8 @@ "applicationCategory": "UtilitiesApplication", "applicationSubCategory": "Automotive Software", "operatingSystem": ["Windows 10", "Windows 11", "macOS", "Linux"], - "softwareVersion": "2.15.0", - "releaseNotes": "https://github.com/ClassicMiniDIY/UltraLog/releases/tag/v2.15.0", + "softwareVersion": "2.15.1", + "releaseNotes": "https://github.com/ClassicMiniDIY/UltraLog/releases/tag/v2.15.1", "downloadUrl": "https://github.com/ClassicMiniDIY/UltraLog/releases/latest", "installUrl": "https://github.com/ClassicMiniDIY/UltraLog/releases/latest", "screenshot": [ @@ -1429,7 +1429,7 @@