mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-26 15:20:34 +08:00
Simulator: Make battery discharging configurable.
This commit is contained in:
@@ -122,6 +122,23 @@ void Simulator::write_airspeed_data(void *buf)
|
||||
_airspeed.writeData(buf);
|
||||
}
|
||||
|
||||
void Simulator::parameters_update(bool force)
|
||||
{
|
||||
bool updated;
|
||||
struct parameter_update_s param_upd;
|
||||
|
||||
orb_check(_param_sub, &updated);
|
||||
|
||||
if (updated) {
|
||||
orb_copy(ORB_ID(parameter_update), _param_sub, ¶m_upd);
|
||||
}
|
||||
|
||||
if (updated || force) {
|
||||
// update C++ param system
|
||||
updateParams();
|
||||
}
|
||||
}
|
||||
|
||||
int Simulator::start(int argc, char *argv[])
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
Reference in New Issue
Block a user