From 102f4836236e497f2eed57d97b5d4ceedbcdd182 Mon Sep 17 00:00:00 2001 From: Andy Piper Date: Tue, 6 Aug 2024 19:29:09 +0100 Subject: [PATCH] AP_OSD: use highest ESC temp rather than motor temp --- libraries/AP_OSD/AP_OSD.cpp | 2 +- libraries/AP_OSD/AP_OSD_Screen.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/AP_OSD/AP_OSD.cpp b/libraries/AP_OSD/AP_OSD.cpp index 23d3dd8e56..34ee67df2b 100644 --- a/libraries/AP_OSD/AP_OSD.cpp +++ b/libraries/AP_OSD/AP_OSD.cpp @@ -506,7 +506,7 @@ void AP_OSD::update_stats() // max esc temp AP_ESC_Telem& telem = AP::esc_telem(); int16_t highest_temperature = 0; - telem.get_highest_motor_temperature(highest_temperature); + telem.get_highest_temperature(highest_temperature); _stats.max_esc_temp = MAX(_stats.max_esc_temp, highest_temperature); #endif } diff --git a/libraries/AP_OSD/AP_OSD_Screen.cpp b/libraries/AP_OSD/AP_OSD_Screen.cpp index e95363f1fe..947203c3ab 100644 --- a/libraries/AP_OSD/AP_OSD_Screen.cpp +++ b/libraries/AP_OSD/AP_OSD_Screen.cpp @@ -2013,11 +2013,11 @@ void AP_OSD_Screen::draw_esc_temp(uint8_t x, uint8_t y) int16_t etemp; if (esc_index > 0) { - if (!AP::esc_telem().get_motor_temperature(esc_index-1, etemp)) { + if (!AP::esc_telem().get_temperature(esc_index-1, etemp)) { return; } } - else if (!AP::esc_telem().get_highest_motor_temperature(etemp)) { + else if (!AP::esc_telem().get_highest_temperature(etemp)) { return; }