mirror of https://github.com/ArduPilot/ardupilot
AP_Filesystem: correct compilation with rally disabled
This commit is contained in:
parent
0060999e69
commit
b1897cd9a4
|
@ -221,10 +221,12 @@ bool AP_Filesystem_Mission::check_file_name(const char *name, enum MAV_MISSION_T
|
|||
return true;
|
||||
}
|
||||
#endif
|
||||
#if HAL_RALLY_ENABLED
|
||||
if (strcmp(name, "rally.dat") == 0) {
|
||||
mtype = MAV_MISSION_TYPE_RALLY;
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -245,10 +247,10 @@ bool AP_Filesystem_Mission::get_item(uint32_t idx, enum MAV_MISSION_TYPE mtype,
|
|||
case MAV_MISSION_TYPE_FENCE:
|
||||
return MissionItemProtocol_Fence::get_item_as_mission_item(idx, item);
|
||||
#endif
|
||||
|
||||
#if HAL_RALLY_ENABLED
|
||||
case MAV_MISSION_TYPE_RALLY:
|
||||
return MissionItemProtocol_Rally::get_item_as_mission_item(idx, item);
|
||||
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -279,6 +281,7 @@ uint32_t AP_Filesystem_Mission::get_num_items(enum MAV_MISSION_TYPE mtype) const
|
|||
#endif
|
||||
}
|
||||
|
||||
#if HAL_RALLY_ENABLED
|
||||
case MAV_MISSION_TYPE_RALLY: {
|
||||
auto *rally = AP::rally();
|
||||
if (rally == nullptr) {
|
||||
|
@ -286,7 +289,8 @@ uint32_t AP_Filesystem_Mission::get_num_items(enum MAV_MISSION_TYPE mtype) const
|
|||
}
|
||||
return rally->get_rally_total();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue