AP_BattMonitor: fix mppt sequence bug

closes https://github.com/ArduPilot/ardupilot/issues/18283
This commit is contained in:
Tom Pittenger 2021-08-11 11:29:42 -07:00 committed by Andrew Tridgell
parent bff899e8f2
commit 00cc8a4042
1 changed files with 1 additions and 1 deletions

View File

@ -223,7 +223,7 @@ void AP_BattMonitor_MPPT_PacketDigital::send_command(const PacketType type, cons
const uint8_t index = get_device_index(serialnumber);
uint8_t sequence = 0;
if (index < ARRAY_SIZE(MPPT_devices)) {
txFrame.data[0] = ++MPPT_devices[index].sequence;
sequence = ++MPPT_devices[index].sequence;
}
txFrame.data[0] = sequence;