mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-22 07:44:03 -04:00
SITL: populate rangefinder ranges for inbuilt sims
These values are returned for the SITL rangefinder backend, type=100
This commit is contained in:
parent
51246fda45
commit
e6e45eda97
@ -950,6 +950,13 @@ void Aircraft::update_external_payload(const struct sitl_input &input)
|
||||
external_payload_mass += sprayer->payload_mass();
|
||||
}
|
||||
|
||||
{
|
||||
const float range = rangefinder_range();
|
||||
for (uint8_t i=0; i<RANGEFINDER_MAX_INSTANCES; i++) {
|
||||
rangefinder_m[i] = range;
|
||||
}
|
||||
}
|
||||
|
||||
// update i2c
|
||||
if (i2c) {
|
||||
i2c->update(*this);
|
||||
|
Loading…
Reference in New Issue
Block a user