mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-07-27 00:48:23 +08:00
GZMixingInterfaceEsc: fill esc_status.actuator_function and esc_temperature
Signed-off-by: Silvan <silvan@auterion.com>
This commit is contained in:
@@ -117,7 +117,9 @@ void GZMixingInterfaceESC::motorSpeedCallback(const gz::msgs::Actuators &actuato
|
||||
for (int i = 0; i < limited_escs; i++) {
|
||||
esc_status.esc[i].timestamp = hrt_absolute_time();
|
||||
esc_status.esc[i].esc_rpm = actuators.velocity(i);
|
||||
esc_status.esc[i].esc_temperature = 50.f; // arbitrary, fixed ESC temperature
|
||||
esc_status.esc_online_flags |= 1 << i;
|
||||
esc_status.esc[i].actuator_function = (uint8_t)_mixing_output.outputFunction(i);
|
||||
|
||||
// This is a race condition with the failure detector, for smaller models it always resolves before
|
||||
// the failure detector runs, but for larger models (with more than 8 ESCs) the failure detector
|
||||
|
||||
Reference in New Issue
Block a user