mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-08 17:08:28 -04:00
Copter: replace HAVE_AP_TERRAIN with AP_TERRAIN_AVAILABLE
This commit is contained in:
parent
b158b7e5a9
commit
8e65e5bff0
@ -732,7 +732,7 @@ static AP_Parachute parachute(relay);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// terrain handling
|
||||
#if HAVE_AP_TERRAIN
|
||||
#if AP_TERRAIN_AVAILABLE
|
||||
AP_Terrain terrain(ahrs);
|
||||
#endif
|
||||
|
||||
@ -1185,7 +1185,7 @@ static void one_hz_loop()
|
||||
|
||||
check_usb_mux();
|
||||
|
||||
#if HAVE_AP_TERRAIN
|
||||
#if AP_TERRAIN_AVAILABLE
|
||||
terrain.update();
|
||||
#endif
|
||||
}
|
||||
|
@ -210,7 +210,7 @@ static NOINLINE void send_extended_status1(mavlink_channel_t chan)
|
||||
battery_current = battery.current_amps() * 100;
|
||||
}
|
||||
|
||||
#if HAVE_AP_TERRAIN
|
||||
#if AP_TERRAIN_AVAILABLE
|
||||
switch (terrain.status()) {
|
||||
case AP_Terrain::TerrainStatusDisabled:
|
||||
break;
|
||||
@ -576,7 +576,7 @@ bool GCS_MAVLINK::try_send_message(enum ap_message id)
|
||||
#endif
|
||||
|
||||
case MSG_TERRAIN:
|
||||
#if HAVE_AP_TERRAIN
|
||||
#if AP_TERRAIN_AVAILABLE
|
||||
CHECK_PAYLOAD_SIZE(TERRAIN_REQUEST);
|
||||
terrain.send_request(chan);
|
||||
#endif
|
||||
@ -834,7 +834,7 @@ GCS_MAVLINK::data_stream_send(void)
|
||||
send_message(MSG_HWSTATUS);
|
||||
send_message(MSG_SYSTEM_TIME);
|
||||
send_message(MSG_RANGEFINDER);
|
||||
#if HAVE_AP_TERRAIN
|
||||
#if AP_TERRAIN_AVAILABLE
|
||||
send_message(MSG_TERRAIN);
|
||||
#endif
|
||||
}
|
||||
@ -1307,7 +1307,7 @@ void GCS_MAVLINK::handleMessage(mavlink_message_t* msg)
|
||||
|
||||
case MAVLINK_MSG_ID_TERRAIN_DATA:
|
||||
case MAVLINK_MSG_ID_TERRAIN_CHECK:
|
||||
#if HAVE_AP_TERRAIN
|
||||
#if AP_TERRAIN_AVAILABLE
|
||||
terrain.handle_data(chan, msg);
|
||||
#endif
|
||||
break;
|
||||
|
@ -1088,7 +1088,7 @@ const AP_Param::Info var_info[] PROGMEM = {
|
||||
GOBJECT(sonar, "RNGFND", RangeFinder),
|
||||
#endif
|
||||
|
||||
#if HAVE_AP_TERRAIN
|
||||
#if AP_TERRAIN_AVAILABLE
|
||||
// @Group: TERRAIN
|
||||
// @Path: ../libraries/AP_Terrain/AP_Terrain.cpp
|
||||
GOBJECT(terrain, "TERRAIN_", AP_Terrain),
|
||||
|
Loading…
Reference in New Issue
Block a user