mixer: remove used flag stop_outputs

dshot: fix motor test on CANnode

Also includes fixes for the DShot driver since stop_outputs is removed. The esc info command has been removed because it doesn't work with AM32, can only be used via command line, and complicates the driver
This commit is contained in:
Jacob Dahl
2025-07-11 08:53:52 -06:00
committed by Alex Klimaj
parent 6a1cefd7a6
commit 09ebd21e55
37 changed files with 120 additions and 228 deletions
+1 -5
View File
@@ -473,16 +473,12 @@ bool MixingOutput::update()
void
MixingOutput::limitAndUpdateOutputs(float outputs[MAX_ACTUATORS], bool has_updates)
{
bool stop_motors = !_throttle_armed && !_actuator_test.inTestMode();
if (_armed.lockdown || _armed.manual_lockdown) {
// overwrite outputs in case of lockdown with disarmed values
for (size_t i = 0; i < _max_num_outputs; i++) {
_current_output_value[i] = _disarmed_value[i];
}
stop_motors = true;
} else if (_armed.force_failsafe) {
// overwrite outputs in case of force_failsafe with _failsafe_value values
for (size_t i = 0; i < _max_num_outputs; i++) {
@@ -513,7 +509,7 @@ MixingOutput::limitAndUpdateOutputs(float outputs[MAX_ACTUATORS], bool has_updat
}
/* now return the outputs to the driver */
if (_interface.updateOutputs(stop_motors, _current_output_value, _max_num_outputs, has_updates)) {
if (_interface.updateOutputs(_current_output_value, _max_num_outputs, has_updates)) {
actuator_outputs_s actuator_outputs{};
setAndPublishActuatorOutputs(_max_num_outputs, actuator_outputs);
+1 -3
View File
@@ -79,14 +79,12 @@ public:
/**
* Callback to update the (physical) actuator outputs in the driver
* @param stop_motors if true, all motors must be stopped (if false, individual motors
* might still be stopped via outputs[i] == disarmed_value)
* @param outputs individual actuator outputs in range [min, max] or failsafe/disarmed value
* @param num_outputs number of outputs (<= max_num_outputs)
* @param num_control_groups_updated number of actuator_control groups updated
* @return if true, the update got handled, and actuator_outputs can be published
*/
virtual bool updateOutputs(bool stop_motors, uint16_t outputs[MAX_ACTUATORS],
virtual bool updateOutputs(uint16_t outputs[MAX_ACTUATORS],
unsigned num_outputs, unsigned num_control_groups_updated) = 0;
/** called whenever the mixer gets updated/reset */
+1 -1
View File
@@ -86,7 +86,7 @@ public:
was_scheduled = true;
}
bool updateOutputs(bool stop_motors, uint16_t outputs_[MAX_ACTUATORS],
bool updateOutputs(uint16_t outputs_[MAX_ACTUATORS],
unsigned num_outputs_, unsigned num_control_groups_updated) override
{
memcpy(outputs, outputs_, sizeof(outputs));