mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 03:33:34 +08:00
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:
@@ -154,20 +154,14 @@ int Roboclaw::initializeUART()
|
||||
}
|
||||
}
|
||||
|
||||
bool Roboclaw::updateOutputs(bool stop_motors, uint16_t outputs[MAX_ACTUATORS],
|
||||
bool Roboclaw::updateOutputs(uint16_t outputs[MAX_ACTUATORS],
|
||||
unsigned num_outputs, unsigned num_control_groups_updated)
|
||||
{
|
||||
float right_motor_output = ((float)outputs[0] - 128.0f) / 127.f;
|
||||
float left_motor_output = ((float)outputs[1] - 128.0f) / 127.f;
|
||||
|
||||
if (stop_motors) {
|
||||
setMotorSpeed(Motor::Right, 0.f);
|
||||
setMotorSpeed(Motor::Left, 0.f);
|
||||
|
||||
} else {
|
||||
setMotorSpeed(Motor::Right, right_motor_output);
|
||||
setMotorSpeed(Motor::Left, left_motor_output);
|
||||
}
|
||||
setMotorSpeed(Motor::Right, right_motor_output);
|
||||
setMotorSpeed(Motor::Left, left_motor_output);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ public:
|
||||
void Run() override;
|
||||
|
||||
/** @see OutputModuleInterface */
|
||||
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;
|
||||
|
||||
void setMotorSpeed(Motor motor, float value); ///< rev/sec
|
||||
|
||||
Reference in New Issue
Block a user