mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-03-11 17:13:56 -03:00
AP_HAL_SITL: use parameter to enable/disable SITL ESC telem
this is the perfect telemetry stream; we don't want to override other telemetry streams
This commit is contained in:
parent
aa7ab28969
commit
ccf290246c
@ -88,18 +88,14 @@ void RCOutput::push(void)
|
||||
_corked = false;
|
||||
}
|
||||
|
||||
// do not overwrite FETTec simulation's ESC telemetry data:
|
||||
SITL::SIM *sitl = AP::sitl();
|
||||
if (sitl != nullptr &&
|
||||
sitl->fetteconewireesc_sim.enabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (esc_telem == nullptr) {
|
||||
esc_telem = new AP_ESC_Telem_SITL;
|
||||
}
|
||||
if (esc_telem != nullptr) {
|
||||
esc_telem->update();
|
||||
if (sitl && sitl->esc_telem) {
|
||||
if (esc_telem == nullptr) {
|
||||
esc_telem = new AP_ESC_Telem_SITL;
|
||||
}
|
||||
if (esc_telem != nullptr) {
|
||||
esc_telem->update();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user