mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
AP_HAL_SITL: add support for simulated RichenPower generator
This commit is contained in:
parent
8e708a0a32
commit
6056cc9d54
@ -348,6 +348,9 @@ int SITL_State::sim_fd(const char *name, const char *arg)
|
||||
}
|
||||
rplidara2 = new SITL::PS_RPLidarA2();
|
||||
return rplidara2->fd();
|
||||
} else if (streq(name, "richenpower")) {
|
||||
sitl_model->set_richenpower(&_sitl->richenpower_sim);
|
||||
return _sitl->richenpower_sim.fd();
|
||||
}
|
||||
|
||||
AP_HAL::panic("unknown simulated device: %s", name);
|
||||
@ -439,6 +442,8 @@ int SITL_State::sim_fd_write(const char *name)
|
||||
AP_HAL::panic("No rplidara2 created");
|
||||
}
|
||||
return rplidara2->write_fd();
|
||||
} else if (streq(name, "richenpower")) {
|
||||
return _sitl->richenpower_sim.write_fd();
|
||||
}
|
||||
AP_HAL::panic("unknown simulated device: %s", name);
|
||||
}
|
||||
|
@ -44,6 +44,7 @@
|
||||
// #include <SITL/SIM_Frsky_SPortPassthrough.h>
|
||||
#include <SITL/SIM_PS_RPLidarA2.h>
|
||||
|
||||
#include <SITL/SIM_RichenPower.h>
|
||||
#include <AP_HAL/utility/Socket.h>
|
||||
|
||||
class HAL_SITL;
|
||||
|
Loading…
Reference in New Issue
Block a user