Skip to content

docs: rebuild the buzzer sequence table from beeper.c - #11940

Open
Raffi1202 wants to merge 1 commit into
iNavFlight:maintenance-10.xfrom
Raffi1202:docs/buzzer-sequence-table
Open

Raffi1202 wants to merge 1 commit into
iNavFlight:maintenance-10.xfrom
Raffi1202:docs/buzzer-sequence-table

Conversation

@Raffi1202

Copy link
Copy Markdown

Problem

The tone sequence table in docs/Buzzer.md does not match beeperTable[] in src/main/io/beeper.c. Anyone using it to identify a beep gets the wrong answer:

  • Index 1 (HW_FAILURE) is missing entirely. Every entry below it is therefore listed one number too low.
  • RX_LOST and RX_LOST_LANDING are swapped. The doc has 1 RX_LOST_LANDING / 2 RX_LOST; the source has 2 RX_LOST / 3 RX_LOST_LANDING.
  • Four names are stale: GYRO_CALIBRATED is RUNTIME_CALIBRATION, ACC_CALIBRATION is ACTION_SUCCESS, ACC_CALIBRATION_FAIL is ACTION_FAIL, and the two NULL rows are GPS_STATUS and MULTI_BEEPS.
  • Entries 17 to 25 are absent: SYSTEM_INIT, ON_USB, the three LAUNCH_MODE* entries, both CAM_CONNECTION* entries, ALL and PREFERED.

The names matter beyond the table: they are what the beeper CLI command accepts, so beeper -ACC_CALIBRATION from the docs does not do anything.

Change

The table is rebuilt from beeperTable[] in src/main/io/beeper.c: index, the CLI name from the entry's name field, and the pattern from the referenced sequence array. Descriptions are kept from the old table where the entry still exists; the new ones are derived from where the source calls them, for example ACTION_SUCCESS from config.c:382 (settings saved), imu.c:829 (ACC calibration) and compass.c:438 (compass calibration).

Documentation only, no code change.

Test

Not applicable - no code changes. The table was generated by parsing beeperTable[] and the beep_* sequence arrays out of src/main/io/beeper.c on maintenance-10.x, then compared entry by entry against the previous table.

Flash / RAM

No change: documentation only.

Docs

This PR is the documentation change: docs/Buzzer.md.

The table had drifted from the source. Index 1 (HW_FAILURE) was missing
entirely, so every entry below it was listed one number too low and
RX_LOST / RX_LOST_LANDING were swapped. Four names were stale
(GYRO_CALIBRATED, ACC_CALIBRATION, ACC_CALIBRATION_FAIL, and two NULL
placeholders that are GPS_STATUS and MULTI_BEEPS), and entries 17 to 25
were absent.

Numbers, names and patterns now come from beeperTable[] in
src/main/io/beeper.c, using the CLI names the beeper command accepts.
@qodo-code-review

Copy link
Copy Markdown
Contributor

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can start a comment with 'qodo' or '@qodo' to chat about any finding

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Synchronize buzzer sequence documentation with beeper table

📝 Documentation 🕐 10-20 Minutes

Grey Divider

AI Description

• Rebuilds buzzer indexes, CLI names, and tone patterns from canonical source.
• Restores missing hardware, launch-mode, camera, USB, and selector entries.
• Corrects stale names, swapped receiver-loss sequences, and event descriptions.
Diagram

graph TD
  TONES["Tone arrays"] -->|referenced by| SOURCE["beeperTable"] -->|entries| DOCS["Buzzer table"] -->|guides| USERS["INAV users"]
  SOURCE -->|names| CLI["beeper CLI"] -->|commands| USERS
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Generate or validate the table automatically
  • ➕ Prevents future index, name, and sequence drift
  • ➕ Makes source-table changes detectable during documentation checks
  • ➖ Requires maintaining a parser or structured documentation generator
  • ➖ Human-written event descriptions still require manual curation

Recommendation: The manual source-aligned rebuild is appropriate for this focused correction and preserves useful descriptions. A follow-up validation script would be worthwhile if the table changes frequently, but it should not block this documentation fix.

Files changed (1) +26 / -16

Documentation (1) +26 / -16
Buzzer.mdRebuild the buzzer sequence reference from canonical definitions +26/-16

Rebuild the buzzer sequence reference from canonical definitions

• Replaces the stale sequence list with all 26 entries from 'beeperTable[]', including corrected indexes, CLI names, timing patterns, and descriptions. Restores previously omitted hardware-failure, USB, launch-mode, camera-connection, and selector entries.

docs/Buzzer.md

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.

1 participant