From 3fd28658570340708ef27a1de06d3fe45d1fc12e Mon Sep 17 00:00:00 2001 From: Michael du Breuil Date: Tue, 30 May 2023 09:22:35 -0700 Subject: [PATCH] Tools: AP_Periph: fix building of hwesc telem This was broken by the APD support --- Tools/AP_Periph/can.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools/AP_Periph/can.cpp b/Tools/AP_Periph/can.cpp index 6ae3c8e2cf..43972a15d0 100644 --- a/Tools/AP_Periph/can.cpp +++ b/Tools/AP_Periph/can.cpp @@ -1600,7 +1600,7 @@ void AP_Periph_FW::hwesc_telem_update() const HWESC_Telem::HWESC &t = hwesc_telem.get_telem(); uavcan_equipment_esc_Status pkt {}; - pkt.esc_index = g.esc_number; + pkt.esc_index = g.esc_number[0]; // only supports a single ESC pkt.voltage = t.voltage; pkt.current = t.current; pkt.temperature = C_TO_KELVIN(MAX(t.mos_temperature, t.cap_temperature));