Skip to content

Handle multi-instance MAVLink and BIN log series consistently in Log Analysis#1330

Draft
billbonney with Copilot wants to merge 5 commits into
masterfrom
copilot/check-bin-log-messages-multi-instance
Draft

Handle multi-instance MAVLink and BIN log series consistently in Log Analysis#1330
billbonney with Copilot wants to merge 5 commits into
masterfrom
copilot/check-bin-log-messages-multi-instance

Conversation

Copilot AI commented Apr 18, 2026

Copy link
Copy Markdown

Log Analysis relied on BIN FMTU/UNIT metadata (#) for instance splitting, but MAVLink multi-instance messages (notably BATTERY_STATUS in MAVLink2) were not exposed as indexed series. This change makes MAVLink instance handling first-class while preserving existing BIN indexed behavior (e.g. IMU).

  • MAVLink instance detection in TLOG parser

    • Marks BATTERY_STATUS.id as the instance/index field during descriptor construction.
    • Propagates the detected index column into storage type metadata.
  • Storage model support for parser-defined index fields

    • Extended LogdataStorage::addDataType(...) with optional indexColumn metadata.
    • Tracks per-type m_indexFieldIndex and updates m_maxIndex from incoming rows.
    • Uses safe integer conversion when reading row index values.
  • Unified indexed-series expansion in plot/type listing

    • getFmtValues() now expands indexed series from either:
      • BIN metadata (FMTU/UNIT with #), or
      • parser-provided index column metadata (MAVLink path).
    • This exposes instance-qualified series for MAVLink in the same style as BIN indexed types.
// TLOG: treat BATTERY_STATUS.id as instance key
if ((desc.m_name == "BATTERY_STATUS") && (qstrcmp(fieldInfo.name, "id") == 0)) {
    desc.m_indexFieldIndex = desc.m_labels.size();
}

// Storage: carry index metadata with type registration
addDataType(desc.m_name, desc.m_ID, desc.m_length, desc.m_format, desc.m_labels,
            desc.m_timeStampIndex, desc.m_indexFieldIndex);

Copilot AI changed the title [WIP] Check that BIN log messages are multi-instance Handle multi-instance MAVLink and BIN log series consistently in Log Analysis Apr 18, 2026
Copilot AI requested a review from billbonney April 18, 2026 14:54
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.

Check BIN log messages are multi instance.

2 participants