Plane: create generic vehicle management and move runcam to it

This commit is contained in:
Andy Piper 2019-12-01 17:02:40 +00:00 committed by Andrew Tridgell
parent 7f6c7fc370
commit eca398e7a2
4 changed files with 11 additions and 1 deletions

View File

@ -1094,6 +1094,10 @@ const AP_Param::Info Plane::var_info[] = {
// @Path: mode_takeoff.cpp
GOBJECT(mode_takeoff, "TKOFF_", ModeTakeoff),
// @Group:
// @Path: ../libraries/AP_Vehicle/AP_Vehicle.cpp
{ AP_PARAM_GROUP, "", Parameters::k_param_vehicle, (const void *)&plane, {group_info : AP_Vehicle::var_info} },
AP_VAREND
};

View File

@ -345,6 +345,8 @@ public:
k_param_logger = 253, // Logging Group
// 254,255: reserved
k_param_vehicle = 257, // vehicle common block of parameters
};
AP_Int16 format_version;
@ -568,7 +570,7 @@ public:
#if EFI_ENABLED
// EFI Engine Monitor
AP_EFI efi;
#endif
#endif
};
extern const AP_Param::Info var_info[];

View File

@ -31,3 +31,4 @@ Plane::Plane(void)
}
Plane plane;
AP_Vehicle& vehicle = plane;

View File

@ -137,6 +137,9 @@ void Plane::init_ardupilot()
camera_mount.init();
#endif
// run all the vehicle initialization routines
init_vehicle();
#if LANDING_GEAR_ENABLED == ENABLED
// initialise landing gear position
g2.landing_gear.init();