Add dual-battery telemetry and drone PowerSource#273
Merged
Conversation
Prepare for X7 configurations that can run two batteries in parallel. - BatteryTel / BatteryBQ40Z50Tel: add second_battery (field 2, same type as battery) for the second parallel battery; documented as unset when only a single battery is used - Add PowerSource enum (unspecified/single/parallel, extensible to topside power) and DroneInfo.power_source (field 13) so clients can determine the power configuration without waiting for telemetry Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
sindrehan
approved these changes
Jun 24, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Prepares the protocol for X7 configurations that can run two batteries in parallel, and lets clients learn the drone's power configuration up front (without waiting for telemetry).
BatteryTel(telemetry.proto)Battery second_battery = 2for the second parallel batteryBatteryBQ40Z50Tel(telemetry.proto)BatteryBQ40Z50 second_battery = 2for the second parallel batteryPowerSourceenum (message_formats.proto)UNSPECIFIED/SINGLE_BATTERY/PARALLEL_BATTERIESDroneInfo(message_formats.proto)PowerSource power_source = 13Second battery
second_batteryreuses the existing types (Battery/BatteryBQ40Z50) so the second battery reports the same information as the first. It has message presence in proto3, so on single-battery drones it is simply left unset — documented on both messages.PowerSource enum
Exposed via
DroneInfo.power_source(field 13) so clients can determine the power configuration (parallel batteries on the X7) directly fromDroneInfo. The enum is intentionally extensible — e.g. a futurePOWER_SOURCE_TOPSIDEfor topside power.POWER_SOURCE_UNSPECIFIEDto follow the repo's enum convention (and proto3 best practice); its comment documents the "unknown / not determined" meaning.Validation
protolintpassesprotoccompiles cleanlyDroneInfofield numbers verified unique/contiguous (1–13)Notes
🤖 Generated with Claude Code