mirror of https://github.com/ArduPilot/ardupilot
SIM_FlightAxis: add env variable for ip address
This commit is contained in:
parent
3a1faf6f54
commit
fa0754bd90
|
@ -134,9 +134,13 @@ FlightAxis::FlightAxis(const char *frame_str) :
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *colon = strchr(frame_str, ':');
|
const char *colon = strchr(frame_str, ':');
|
||||||
|
const char *env = getenv("REALFLIGHT_IPADDR");
|
||||||
if (colon) {
|
if (colon) {
|
||||||
controller_ip = colon+1;
|
controller_ip = colon+1;
|
||||||
}
|
}
|
||||||
|
else if (env) {
|
||||||
|
controller_ip = env;
|
||||||
|
}
|
||||||
for (uint8_t i=0; i<ARRAY_SIZE(sim_defaults); i++) {
|
for (uint8_t i=0; i<ARRAY_SIZE(sim_defaults); i++) {
|
||||||
AP_Param::set_default_by_name(sim_defaults[i].name, sim_defaults[i].value);
|
AP_Param::set_default_by_name(sim_defaults[i].name, sim_defaults[i].value);
|
||||||
if (sim_defaults[i].save) {
|
if (sim_defaults[i].save) {
|
||||||
|
|
Loading…
Reference in New Issue