Small fixes - #1974
Conversation
There was a problem hiding this comment.
Pull request overview
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Extends the log-quality workflow into a richer “quality + analysis” pipeline, adds tuning-report visualization, and updates models/tests to support parameter-fix and navigation flows.
Changes:
- Introduces analysis result types and per-subsystem analysis models (Battery/ESC/IMU/VIBE) and wires them into
analyze_log(). - Adds new Tkinter windows for detailed analysis and tuning-report plotting, and integrates them with the parameter editor + log quality UI.
- Updates configuration-step parameter computation plumbing and expands/adjusts tests accordingly.
Reviewed changes
Copilot reviewed 35 out of 35 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_frontend_tkinter_parameter_editor.py | Updates test expectations for the new log report window constructor + internal state. |
| tests/test_frontend_tkinter_log_analysis.py | Adds coverage for pairing logic and the new LogAnalysisReportWindow behaviors. |
| tests/test_data_model_tuning_report.py | Adds parsing test for truncating malformed CSV rows to header length. |
| tests/test_data_model_quality_models.py | Adds targeted tests for new ESC analysis checks. |
| tests/test_data_model_parameter_editor.py | Aligns context-input structure with updated vehicle_components shape. |
| tests/test_data_model_log_analysis.py | Updates tests to new model registry API (quality_and_analysis_models). |
| tests/test_data_model_imu_analysis.py | Adds comprehensive IMU quality + analysis tests. |
| tests/test_data_model_configuration_step.py | Updates mocks/assertions for combined forced+derived computation API. |
| tests/test_data_model_battery_analysis.py | Adds comprehensive Battery quality + analysis tests. |
| tests/acceptance_only_changed_get_uploaded_usage.py | Updates acceptance wiring for new log report window state fields. |
| ardupilot_methodic_configurator/log_analysis/utils.py | Extends step lookup to include add_parameters. |
| ardupilot_methodic_configurator/log_analysis/data_model_tuning_report.py | Adds tuning_report.csv parsing + forward-fill model. |
| ardupilot_methodic_configurator/log_analysis/data_model_quality_vibe.py | Adds VIBE analysis model and related-step propagation. |
| ardupilot_methodic_configurator/log_analysis/data_model_quality_pm.py | Migrates PM model to shared base and propagates related-step. |
| ardupilot_methodic_configurator/log_analysis/data_model_quality_mode.py | Migrates MODE model to shared base and propagates related-step. |
| ardupilot_methodic_configurator/log_analysis/data_model_quality_imu.py | Adds IMU analysis model and related-step propagation. |
| ardupilot_methodic_configurator/log_analysis/data_model_quality_gnss.py | Migrates GPS model to shared base and propagates related-step. |
| ardupilot_methodic_configurator/log_analysis/data_model_quality_fft.py | Improves FFT absence issue with actionable suggested_value and related-step. |
| ardupilot_methodic_configurator/log_analysis/data_model_quality_esc.py | Adds ESC analysis model and new parameter/telemetry checks. |
| ardupilot_methodic_configurator/log_analysis/data_model_quality_err.py | Migrates ERR model to shared base. |
| ardupilot_methodic_configurator/log_analysis/data_model_quality_battery.py | Adds Battery analysis model and moves “analysis-like” checks out of quality. |
| ardupilot_methodic_configurator/log_analysis/data_model_quality_base.py | Introduces BaseLogModel with shared expected-value derivation helpers. |
| ardupilot_methodic_configurator/log_analysis/data_model_quality_arm.py | Migrates ARM model to shared base. |
| ardupilot_methodic_configurator/log_analysis/data_model_log_quality.py | Extends QualityIssue with param + suggested_value, and results with related_step. |
| ardupilot_methodic_configurator/log_analysis/data_model_log_analysis_result.py | Adds structured analysis outcome/result dataclasses. |
| ardupilot_methodic_configurator/log_analysis/data_model_log_analysis.py | Wires quality+analysis model registry and tracks related_parameter_values. |
| ardupilot_methodic_configurator/log_analysis/backend_log_extraction.py | Adjusts multiplier resolution to avoid double-scaling for fixed-point fields. |
| ardupilot_methodic_configurator/frontend_tkinter_tuning_report.py | Adds interactive tuning parameter graph window (Matplotlib + Tkinter). |
| ardupilot_methodic_configurator/frontend_tkinter_parameter_editor.py | Adds “Analyse .bin log” entrypoint and return-to-report workflow. |
| ardupilot_methodic_configurator/frontend_tkinter_log_quality.py | Adds “Continue to Analysis” and “Fix/Go to Step” flows from quality report. |
| ardupilot_methodic_configurator/frontend_tkinter_log_analysis.py | Adds detailed analysis window, link aggregation, hardware formatting, fix workflow. |
| ardupilot_methodic_configurator/data_model_parameter_editor.py | Fixes vehicle_components snapshot shape for log analysis inputs. |
| ardupilot_methodic_configurator/data_model_configuration_step.py | Switches to combined forced+derived computation method. |
| ardupilot_methodic_configurator/backend_filesystem_configuration_steps.py | Adds compute_forced_and_derived_parameters() helper. |
| ardupilot_methodic_configurator/backend_filesystem.py | Uses combined forced+derived computation and improves error reporting. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| for param_name, current, proposed, reasons in fixes: | ||
| row = ttk.Frame(rows_frame) | ||
| row.pack(fill=tk.X, pady=4) | ||
| ttk.Label(row, text=param_name, width=18, font=("TkDefaultFont", 11, "bold")).pack(side=tk.LEFT) | ||
| ttk.Label(row, text=str(int(current)), foreground="gray").pack(side=tk.LEFT, padx=(0, 6)) | ||
| ttk.Label(row, text="->").pack(side=tk.LEFT, padx=(0, 6)) | ||
| value_lbl = ttk.Label(row, text=str(int(proposed)), foreground="darkgreen", font=("TkDefaultFont", 11, "bold")) | ||
| value_lbl.pack(side=tk.LEFT) |
181e1f2 to
0346356
Compare
6614be4 to
f0dd065
Compare
Handle empty or malformed tuning_report.csv files without allowing uncaught exceptions to escape from the tuning graph button callback. Only update displayed parameter values and close the review dialog after a parameter upload succeeds. Failed uploads now preserve the proposed changes for retry and keep the report state accurate. Remove the duplicate unattached Skip button construction from the parameter editor. Signed-off-by: Dr.-Ing. Amilcar do Carmo Lucas <amilcar.lucas@iav.de>
… mismatches Collect current parameter values from every quality-model result so the log-quality report can offer Fix actions for battery, IMU, ESC, FFT, and other parameter-related issues. Also ensure MOT_BAT_VOLT_MAX derivation mismatches are appended as analysis outcomes instead of being silently discarded. Signed-off-by: Dr.-Ing. Amilcar do Carmo Lucas <amilcar.lucas@iav.de>
Suppress zero-error ESC reports and require meaningful telemetry coverage before reporting zero RPM during armed periods. Expose actionable analysis recommendations through the parameter review and upload workflow, with regression coverage for both ESC detection paths and parameter fixes. Signed-off-by: Dr.-Ing. Amilcar do Carmo Lucas <amilcar.lucas@iav.de>
Restrict ESC current imbalance analysis to armed telemetry windows and skip DShot output-rate checks when the vehicle uses ordinary PWM. Add regression coverage for PWM configurations and ESC analysis behavior. Signed-off-by: Dr.-Ing. Amilcar do Carmo Lucas <amilcar.lucas@iav.de>
Truncate tuning_report.csv rows that contain more cells than the header defines so every parameter series remains aligned with configuration steps and can be plotted safely.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Amilcar Lucas <amilcar.lucas@iav.de>
…logs Format parameter values without truncating decimals in the log-quality parameter-change review dialog. Add coverage for integral and fractional display values. Signed-off-by: Dr.-Ing. Amilcar do Carmo Lucas <amilcar.lucas@iav.de>
Treat upload callbacks returning None as successful side-effect operations and abort only when they explicitly return False. Tighten callback type annotations, remove obsolete StopIteration handling, and add regression coverage for quality and analysis parameter fixes.
Remove unnecessary type casts from log-analysis frontend tests and clean up the unused typing import.
Add the missing BaseLogModel analyse interface, avoid variable type shadowing in the quality report, and document untyped Matplotlib calls with narrow mypy suppressions.
…ring Introduce dedicated quality and analysis base classes to reduce coupling with configuration-step infrastructure. Register subsystems with stable keys and pair quality results with analysis results by key instead of list position. Update frontend pairing tests accordingly.
Treat NaN and infinite numeric telemetry as invalid data during quality and performance checks. Prevent invalid values from being reported as healthy or causing numeric conversion errors. Add regression tests for battery and PM telemetry.
f0dd065 to
34d6075
Compare
Store DataFlash fixed-point values in their compact raw representation and scale them lazily for analysis. Apply compatible FMTU multipliers during ingestion, while recording stored and scaled units explicitly. Migrate analysis models to canonical scaled values, convert timestamps only at result boundaries, and document the storage and scaling policy.
…teps Inject parameter derivation through the analysis context and move subsystem component metadata into the model registry. Update architecture documentation and regression coverage.
Extract PM validation, log record conversion, and subsystem execution helpers. Bundle parameter-derivation inputs to remove wide method signatures.
☂️ Code Coverage
Overall Coverage
New FilesNo new covered files... Modified FilesNo covered modified files...
|
Coverage Report for CI Build 32757700414Coverage increased (+0.4%) to 89.391%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions404 previously-covered lines in 14 files lost coverage.
Coverage Stats💛 - Coveralls |
Test Results 4 files ± 0 4 suites ±0 45m 38s ⏱️ -28s Results for commit ee46bce. ± Comparison against base commit 6980784. This pull request removes 3 and adds 25 tests. Note that renamed tests count towards both. |
|
@OmkarSarkar204 can you review and test this? |
Description
Fixes on top of Omkar's work.
Checklist
git commit --signoff)Testing
Describe how you tested these changes: