Plane: create generic vehicle management and move runcam to it
This commit is contained in:
parent
7f6c7fc370
commit
eca398e7a2
@ -1094,6 +1094,10 @@ const AP_Param::Info Plane::var_info[] = {
|
|||||||
// @Path: mode_takeoff.cpp
|
// @Path: mode_takeoff.cpp
|
||||||
GOBJECT(mode_takeoff, "TKOFF_", ModeTakeoff),
|
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
|
AP_VAREND
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -345,6 +345,8 @@ public:
|
|||||||
k_param_logger = 253, // Logging Group
|
k_param_logger = 253, // Logging Group
|
||||||
|
|
||||||
// 254,255: reserved
|
// 254,255: reserved
|
||||||
|
|
||||||
|
k_param_vehicle = 257, // vehicle common block of parameters
|
||||||
};
|
};
|
||||||
|
|
||||||
AP_Int16 format_version;
|
AP_Int16 format_version;
|
||||||
@ -568,7 +570,7 @@ public:
|
|||||||
#if EFI_ENABLED
|
#if EFI_ENABLED
|
||||||
// EFI Engine Monitor
|
// EFI Engine Monitor
|
||||||
AP_EFI efi;
|
AP_EFI efi;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
extern const AP_Param::Info var_info[];
|
extern const AP_Param::Info var_info[];
|
||||||
|
@ -31,3 +31,4 @@ Plane::Plane(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Plane plane;
|
Plane plane;
|
||||||
|
AP_Vehicle& vehicle = plane;
|
||||||
|
@ -137,6 +137,9 @@ void Plane::init_ardupilot()
|
|||||||
camera_mount.init();
|
camera_mount.init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// run all the vehicle initialization routines
|
||||||
|
init_vehicle();
|
||||||
|
|
||||||
#if LANDING_GEAR_ENABLED == ENABLED
|
#if LANDING_GEAR_ENABLED == ENABLED
|
||||||
// initialise landing gear position
|
// initialise landing gear position
|
||||||
g2.landing_gear.init();
|
g2.landing_gear.init();
|
||||||
|
Loading…
Reference in New Issue
Block a user