-
-
Notifications
You must be signed in to change notification settings - Fork 9
feat(gps): add track map, lap detection, and map tiles #83
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
Merged
SomethingNew71
merged 1 commit into
ClassicMiniDIY:release/2.13.0
from
irudoy:feat/gps-track-map
Aug 18, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| //! Diagnostic: parse an MLG file and replicate `detect_gps_channels` end-to-end. | ||
|
|
||
| use std::env; | ||
| use std::fs; | ||
|
|
||
| use ultralog::adapters::registry; | ||
| use ultralog::parsers::Speeduino; | ||
|
|
||
| fn main() { | ||
| let path = env::args() | ||
| .nth(1) | ||
| .unwrap_or_else(|| "exampleLogs/rusefi/Log1_gps.mlg".to_string()); | ||
| let data = fs::read(&path).expect("read file"); | ||
| let log = Speeduino::parse_binary(&data).expect("parse"); | ||
| println!("path: {}", path); | ||
| println!("channels: {}", log.channels.len()); | ||
|
|
||
| let mut lat_idx: Option<usize> = None; | ||
| let mut lon_idx: Option<usize> = None; | ||
| let mut gps_hits = Vec::new(); | ||
| for (i, ch) in log.channels.iter().enumerate() { | ||
| let name = ch.name(); | ||
| if name.to_lowercase().contains("gps") | ||
| || name.to_lowercase().contains("lat") | ||
| || name.to_lowercase().contains("lon") | ||
| { | ||
| let canon = registry::get_channel_metadata(&name) | ||
| .map(|m| m.canonical_id) | ||
| .unwrap_or_else(|| "<no metadata>".to_string()); | ||
| gps_hits.push((i, name.clone(), canon.clone())); | ||
| match canon.as_str() { | ||
| "gps_latitude" => lat_idx = Some(i), | ||
| "gps_longitude" => lon_idx = Some(i), | ||
| _ => {} | ||
| } | ||
| } | ||
| } | ||
| println!("GPS-ish channels found: {}", gps_hits.len()); | ||
| for (i, name, canon) in &gps_hits { | ||
| println!(" [{}] name={:?} canonical_id={}", i, name, canon); | ||
| } | ||
| println!("detect_gps_channels result: {:?}", (lat_idx, lon_idx)); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| //! Quick diagnostic: do "GPS Latitude" / "GPS Longitude" resolve to canonical | ||
| //! GPS IDs in the OECUA registry the way the Track Map widget expects? | ||
|
|
||
| use ultralog::adapters::registry; | ||
|
|
||
| fn main() { | ||
| let names = [ | ||
| "GPS Latitude", | ||
| "GPS Longitude", | ||
| "gps latitude", | ||
| "GPS Lat", | ||
| "Latitude", | ||
| "Lon", | ||
| ]; | ||
| println!("adapters loaded: {}", registry::get_adapters().len()); | ||
| for name in names { | ||
| match registry::get_channel_metadata(name) { | ||
| Some(meta) => println!( | ||
| " {:<14} -> canonical_id={:<14} display={:<14} vendor={}", | ||
| format!("\"{}\"", name), | ||
| meta.canonical_id, | ||
| meta.display_name, | ||
| meta.vendor | ||
| ), | ||
| None => println!(" \"{}\" -> NOT FOUND", name), | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This registers a dev-only tool as a first-class binary, and it duplicates
examples/inject_fake_gps_mlg.rs— the two copies have already diverged (Moscow oval vs. the Vladivostok kart circuit). Please keep just theexamples/version and drop this[[bin]]so the tool isn't built into release artifacts.Also, the doc comment in the
src/bin/copy referencesfirmware/Lib/demo_gen.cin "the canlogger repo", which isn't part of this project — please remove or clarify that reference in whichever copy survives.