Skip to content

refactor: making the log analysis frontend more nice and adding param… - #1939

Open
OmkarSarkar204 wants to merge 2 commits into
ArduPilot:masterfrom
OmkarSarkar204:log-frontend-improvement
Open

refactor: making the log analysis frontend more nice and adding param…#1939
OmkarSarkar204 wants to merge 2 commits into
ArduPilot:masterfrom
OmkarSarkar204:log-frontend-improvement

Conversation

@OmkarSarkar204

@OmkarSarkar204 OmkarSarkar204 commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Log analysis frontend restructure and adding parameter recommendation

Description

Checklist

  • Run pre-commit checks locally
  • Verified by a human programmer
  • All commits are signed off (use git commit --signoff)
  • Code follows our coding standards
  • Documentation updated if needed
  • No breaking changes or properly documented

Testing

Describe how you tested these changes:

  • Unit tests pass
  • Integration tests pass
  • Manual testing performed
  • Tested on flight controller hardware

@OmkarSarkar204

Copy link
Copy Markdown
Contributor Author

This will have some conflicts but it will be resolved once this is merged #1904

@OmkarSarkar204
OmkarSarkar204 force-pushed the log-frontend-improvement branch 5 times, most recently from 4c18b04 to 24287f1 Compare August 15, 2026 14:49
@OmkarSarkar204

Copy link
Copy Markdown
Contributor Author

A small preview :)

image

clicking the buttons will redirect to the respected param page

@OmkarSarkar204
OmkarSarkar204 force-pushed the log-frontend-improvement branch from 24287f1 to b5048be Compare August 15, 2026 14:54
@amilcarlucas

Copy link
Copy Markdown
Collaborator

This is looking good.

…ter changes to respective steps

Signed-off-by: Omkar Sarkar <omkarsarkar24@gmail.com>
Signed-off-by: Omkar Sarkar <omkarsarkar24@gmail.com>
@OmkarSarkar204
OmkarSarkar204 force-pushed the log-frontend-improvement branch from df3ee60 to c7f8bed Compare August 22, 2026 03:46
@OmkarSarkar204
OmkarSarkar204 marked this pull request as ready for review August 22, 2026 04:01
Copilot AI lite review requested due to automatic review settings August 22, 2026 04:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Refactors log analysis “quality” results to carry more context (related config step + suggested parameter fixes) and updates the Tkinter UI to let users navigate to steps and apply recommended parameter changes from the log quality report.

Changes:

  • Extend LogQualityResult / QualityIssue with related_step, param_name, and suggested_value to support parameter recommendations.
  • Thread related_step through multiple quality models and enhance bitmask diagnostics with computed suggested values.
  • Update the Tkinter log quality report UI to show “Fix” and “Go to Step” actions and integrate with the parameter editor workflow.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
ardupilot_methodic_configurator/log_analysis/data_model_quality_vibe.py Passes related_step into results for VIBE quality checks.
ardupilot_methodic_configurator/log_analysis/data_model_quality_pm.py Passes related_step into results for PM quality checks.
ardupilot_methodic_configurator/log_analysis/data_model_quality_mode.py Passes related_step into results and propagates it in absence diagnosis.
ardupilot_methodic_configurator/log_analysis/data_model_quality_imu.py Passes related_step into results for IMU quality checks.
ardupilot_methodic_configurator/log_analysis/data_model_quality_gnss.py Passes related_step into results for GNSS/GPS quality checks.
ardupilot_methodic_configurator/log_analysis/data_model_quality_fft.py Adds parameter recommendation fields for INS batch logging and passes related_step.
ardupilot_methodic_configurator/log_analysis/data_model_quality_battery.py Adds related_step to absence results and adjusts UI-facing text.
ardupilot_methodic_configurator/log_analysis/data_model_quality_base.py Extends build_result() and adds suggested parameter value computation for LOG_BITMASK.
ardupilot_methodic_configurator/log_analysis/data_model_log_quality.py Extends datamodels to carry parameter fix metadata and related step.
ardupilot_methodic_configurator/log_analysis/data_model_log_analysis.py Collects “related parameter values” from issues to power fix recommendations in UI.
ardupilot_methodic_configurator/frontend_tkinter_parameter_editor.py Adds “Analyse a .bin log” button and hooks navigation/upload flow back to report.
ardupilot_methodic_configurator/frontend_tkinter_log_quality.py Adds “Fix” / “Go to Step” actions, review dialog, and step absorption logic in report.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +181 to +182
if self.navigate_callback is not None:
self.navigate_callback(step)
Comment on lines +142 to +150
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)
show_tooltip(value_lbl, "\n".join(f"- {r}" for r in reasons))
return self.build_result(issues, name, related_step=step)

def _diagnose_absence(self) -> LogQualityResult:
name = self.resolve_message_step("BAT", "Battery")[1]
Comment on lines +52 to +54
return LogQualityResult(
available=False, state=LogQualityState.WARNING, reason=reason, issues=issues, name=name, related_step=step
)
Comment on lines +209 to +212
proposed |= int(issue.suggested_value) # type: ignore[arg-type]
proposed_value = float(proposed)
else:
proposed_value = param_issues[0].suggested_value # type: ignore[assignment]
Comment on lines +287 to +292
absorbed_by_step: dict[str, list[StepValidationResult]] = {}
for step_result in self.summary.step_results:
for q in self.summary.quality_results:
if q.related_step and q.related_step == step_result.step:
absorbed_by_step.setdefault(q.related_step, []).append(step_result)
break
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 32549897007

Coverage decreased (-0.4%) to 90.385%

Details

  • Coverage decreased (-0.4%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 233 coverage regressions across 11 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

233 previously-covered lines in 11 files lost coverage.

Top 10 Files by Coverage Loss Lines Losing Coverage Coverage
frontend_tkinter_log_quality.py 131 21.86%
frontend_tkinter_parameter_editor.py 38 93.7%
log_analysis/data_model_quality_imu.py 20 19.61%
log_analysis/data_model_quality_battery.py 14 69.01%
log_analysis/data_model_quality_base.py 11 76.19%
log_analysis/data_model_quality_fft.py 7 24.24%
log_analysis/data_model_quality_gnss.py 5 48.28%
log_analysis/data_model_quality_vibe.py 3 36.36%
log_analysis/data_model_log_analysis.py 2 93.51%
log_analysis/data_model_quality_pm.py 1 41.18%

Coverage Stats

Coverage Status
Relevant Lines: 17629
Covered Lines: 15934
Line Coverage: 90.39%
Relevant Branches: 5240
Covered Branches: 4400
Branch Coverage: 83.97%
Branches in Coverage %: No
Coverage Strength: 2.69 hits per line

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants