mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-03-08 22:53:57 -04:00
AP_OSD: fix code causing errors when OSD is compiled out
This fixes the code causing problem in compiling out OSD
This commit is contained in:
parent
ff3c4b8bda
commit
4b7b5a4d90
@ -97,13 +97,16 @@ MSPCommandResult AP_MSP_Telem_DJI::msp_process_out_esc_sensor_data(sbuf_t *dst)
|
||||
if (!displaying_stats_screen()) {
|
||||
telem.get_highest_motor_temperature(highest_temperature);
|
||||
} else {
|
||||
#if OSD_ENABLED
|
||||
AP_OSD *osd = AP::osd();
|
||||
if (osd == nullptr) {
|
||||
return MSP_RESULT_ERROR;
|
||||
}
|
||||
WITH_SEMAPHORE(osd->get_semaphore());
|
||||
highest_temperature = osd->get_stats_info().max_esc_temp;
|
||||
#endif
|
||||
}
|
||||
|
||||
const struct PACKED {
|
||||
uint8_t temp;
|
||||
uint16_t rpm;
|
||||
|
@ -217,12 +217,13 @@ const AP_Param::GroupInfo AP_OSD::var_info[] = {
|
||||
AP_SUBGROUPINFO(param_screen[1], "6_", 22, AP_OSD, AP_OSD_ParamScreen),
|
||||
#endif
|
||||
|
||||
#if OSD_ENABLED
|
||||
// additional tables to go beyond 63 limit
|
||||
AP_SUBGROUPINFO2(screen[0], "1_", 27, AP_OSD, AP_OSD_Screen),
|
||||
AP_SUBGROUPINFO2(screen[1], "2_", 28, AP_OSD, AP_OSD_Screen),
|
||||
AP_SUBGROUPINFO2(screen[2], "3_", 29, AP_OSD, AP_OSD_Screen),
|
||||
AP_SUBGROUPINFO2(screen[3], "4_", 30, AP_OSD, AP_OSD_Screen),
|
||||
|
||||
#endif
|
||||
AP_GROUPEND
|
||||
};
|
||||
|
||||
|
@ -380,7 +380,7 @@ public:
|
||||
static const uint8_t NUM_PARAMS = 9;
|
||||
static const uint8_t SAVE_PARAM = NUM_PARAMS + 1;
|
||||
|
||||
#if HAL_WITH_OSD_BITMAP || HAL_WITH_MSP_DISPLAYPORT
|
||||
#if OSD_ENABLED && (HAL_WITH_OSD_BITMAP || HAL_WITH_MSP_DISPLAYPORT)
|
||||
void draw(void) override;
|
||||
#endif
|
||||
#if HAL_GCS_ENABLED
|
||||
|
Loading…
Reference in New Issue
Block a user