mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-07 17:35:22 +08:00
Remove unnecessary C++11 usage in UAVCAN
This commit is contained in:
@@ -39,7 +39,6 @@
|
||||
|
||||
#include "esc.hpp"
|
||||
#include <systemlib/err.h>
|
||||
#include <algorithm>
|
||||
|
||||
|
||||
#define MOTOR_BIT(x) (1<<(x))
|
||||
@@ -118,7 +117,10 @@ void UavcanEscController::update_outputs(float *outputs, unsigned num_outputs)
|
||||
float scaled = (outputs[i] + 1.0F) * 0.5F * cmd_max;
|
||||
|
||||
// trim negative values back to minimum
|
||||
scaled = std::max(cmd_min, scaled);
|
||||
if (scaled < cmd_min) {
|
||||
scaled = cmd_min;
|
||||
perf_count(_perfcnt_scaling_error);
|
||||
}
|
||||
|
||||
if (scaled > cmd_max) {
|
||||
scaled = cmd_max;
|
||||
|
||||
Reference in New Issue
Block a user