SITL: make SIM_* variables available to simulator backends directly

This commit is contained in:
Andrew Tridgell 2016-06-17 08:35:08 +10:00
parent f05c698176
commit e360c6117e
2 changed files with 3 additions and 0 deletions

View File

@ -57,6 +57,8 @@ Aircraft::Aircraft(const char *home_str, const char *frame_str) :
min_sleep_time(5000)
#endif
{
// make the SIM_* variables available to simulator backends
sitl = (SITL *)AP_Param::find_object("SIM_");
parse_home(home_str, home, home_yaw);
location = home;
ground_level = home.alt*0.01;

View File

@ -98,6 +98,7 @@ public:
}
protected:
SITL *sitl;
Location home;
Location location;