mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-03-11 17:13:56 -03:00
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;
|
return true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#if HAL_RALLY_ENABLED
|
||||||
if (strcmp(name, "rally.dat") == 0) {
|
if (strcmp(name, "rally.dat") == 0) {
|
||||||
mtype = MAV_MISSION_TYPE_RALLY;
|
mtype = MAV_MISSION_TYPE_RALLY;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return false;
|
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:
|
case MAV_MISSION_TYPE_FENCE:
|
||||||
return MissionItemProtocol_Fence::get_item_as_mission_item(idx, item);
|
return MissionItemProtocol_Fence::get_item_as_mission_item(idx, item);
|
||||||
#endif
|
#endif
|
||||||
|
#if HAL_RALLY_ENABLED
|
||||||
case MAV_MISSION_TYPE_RALLY:
|
case MAV_MISSION_TYPE_RALLY:
|
||||||
return MissionItemProtocol_Rally::get_item_as_mission_item(idx, item);
|
return MissionItemProtocol_Rally::get_item_as_mission_item(idx, item);
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -279,6 +281,7 @@ uint32_t AP_Filesystem_Mission::get_num_items(enum MAV_MISSION_TYPE mtype) const
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if HAL_RALLY_ENABLED
|
||||||
case MAV_MISSION_TYPE_RALLY: {
|
case MAV_MISSION_TYPE_RALLY: {
|
||||||
auto *rally = AP::rally();
|
auto *rally = AP::rally();
|
||||||
if (rally == nullptr) {
|
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();
|
return rally->get_rally_total();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user