Skip to content

Commit

Permalink
AP_HAL_SITL: do not overwrite FETTecESC telemetry data w/SITL ESC data
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker authored and tridge committed Sep 1, 2021
1 parent 42c2f8d commit 129eb4c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions libraries/AP_HAL_SITL/RCOutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ void RCOutput::push(void)
memcpy(_sitlState->pwm_output, _pending, SITL_NUM_CHANNELS * sizeof(uint16_t));
_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;
}
Expand Down

0 comments on commit 129eb4c

Please sign in to comment.