mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 02:53:35 +08:00
esc_report: add actuator_function
This commit is contained in:
@@ -78,6 +78,8 @@ public:
|
||||
|
||||
static int max_output_value() { return uavcan::equipment::esc::RawCommand::FieldTypes::cmd::RawValueType::max(); }
|
||||
|
||||
esc_status_s &esc_status() { return _esc_status; }
|
||||
|
||||
private:
|
||||
/**
|
||||
* ESC status message reception will be reported via this callback.
|
||||
|
||||
@@ -1003,6 +1003,10 @@ void UavcanMixingInterfaceESC::mixerChanged()
|
||||
if (_mixing_output.useDynamicMixing()) {
|
||||
for (unsigned i = 0; i < MAX_ACTUATORS; ++i) {
|
||||
rotor_count += _mixing_output.isFunctionSet(i);
|
||||
|
||||
if (i < esc_status_s::CONNECTED_ESC_MAX) {
|
||||
_esc_controller.esc_status().esc[i].actuator_function = (uint8_t)_mixing_output.outputFunction(i);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user